[issue41740] Improve error message for string concatenation via `sum`

2020-09-07 Thread Phillip M. Feldman
Phillip M. Feldman added the comment: I'd forgotten about ''.join; this is a good solution. I withdraw my comment. On Mon, Sep 7, 2020 at 3:25 PM Steven D'Aprano wrote: > > Steven D'Aprano added the comment: > > Marco, sum should be as fast as pos

[issue41740] string concatenation via `sum`

2020-09-07 Thread Phillip M. Feldman
New submission from Phillip M. Feldman : I'm not sure whether this is a bug or a feature request, but it seems as though the following should produce the same result: In [1]: 'a' + 'b' + 'c' Out[1]: 'abc' In [2]: sum(('a', 'b',

[issue41536] pathlib's Path("NUL:").resolve() throws an error on windows

2020-08-12 Thread Phillip Mackintosh
New submission from Phillip Mackintosh : I'm looking for the equivalent windows functionality to the posix `/dev/null` file, and I discovered `NUL:` This snippet works on a windows OS, proving that it is indeed a writable file: `Path('NUL:').write_text('abcd

[issue16397] UserString doesn't combine nicely with strings

2019-12-08 Thread Phillip Schanely
Change by Phillip Schanely : -- nosy: +pschanely ___ Python tracker <https://bugs.python.org/issue16397> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34028] Python 3.7.0 wont compile with SSL Support 1.1.0 > alledged missing X509_VERIFY_PARAM_set1_host() support

2019-06-10 Thread Phillip Middleton
Phillip Middleton added the comment: I have the same issue installing v3.7.3 on RHEL6.8. The standard version came with openssl v1.0.1c, which would not configure. I installed openssl 1.0.2s in /usr/local and created a file /etc/profile.d/openssl.sh adding the following lines: # /etc

[issue36266] Which module could not be found?

2019-03-13 Thread Phillip M. Feldman
Phillip M. Feldman added the comment: 'Should include "_ssl" somewhere in the message?' Exactly so. If a given import statement imports 30 items, it would be helpful to know which one caused the hickup. Thanks! On Wed, Mar 13, 2019 at 12:28 PM Steve Dower wrote: &g

[issue36266] Which module could not be found?

2019-03-13 Thread Phillip M. Feldman
Phillip M. Feldman added the comment: Hello Steve, I'm buying only 50 percent of this. The Python interpreter must know what module it was trying to import, and can at least be able to report that. Phillip On Tue, Mar 12, 2019 at 8:42 AM Steve Dower wrote: > > Steve Dower

[issue36266] Which module could not be found?

2019-03-11 Thread Phillip M. Feldman
New submission from Phillip M. Feldman : I have a module that contains an import statement that imports a large number of items. This import was failing with the following error message: ImportError: DLL load failed: The specified module could not be found. The message would be so much more

[issue34417] imp.find_module reacts badly to iterator

2018-08-21 Thread Phillip M. Feldman
Phillip M. Feldman added the comment: My apologies for the tone of my remark. I am grateful to you and others who donate their time to develop the code. I'm attaching the wrapper code that I created to work around the problem. Phillip def expander(paths='./*'): "&qu

[issue34417] imp.find_module reacts badly to iterator

2018-08-20 Thread Phillip M. Feldman
Phillip M. Feldman added the comment: It appears that the `importlib` package has the same issue: One can't provide an iterator for the path. When searching a large folder tree for an item that is likely to be found early in the search process (i.e., at a high level in the folder tree)

[issue34417] imp.find_module reacts badly to iterator

2018-08-16 Thread Phillip M. Feldman
New submission from Phillip M. Feldman : `imp.find_module` goes down in flames if one tries to pass an iterator rather than a list of folders. Firstly, the message that it produces is somewhat misleading: RuntimeError: sys.path must be a list of directory names Secondly, it would be

[issue34299] argparse description formatting

2018-07-31 Thread Phillip M. Feldman
Phillip M. Feldman added the comment: That works. Thanks! I think that this boils down to a documentation issue. The following says that the default behavior is to line-wrap the help messages. At least to me, this doesn't imply that whitespace is getting eaten. RawDescriptionHelpForm

[issue34299] argparse description formatting

2018-07-31 Thread Phillip M. Feldman
New submission from Phillip M. Feldman : With `argparse`, I'm providing a triple-quoted string via the `description` argument of the constructor. When I invoke the script with the -h or --help argument, all formatting in the triple-quoted string is lost, i.e., all paragraphs ar

[issue31717] Socket documentation threading misstep?

2017-10-06 Thread Phillip
Phillip added the comment: I could definitely understand that. After all, if it's slightly askew (or strikes some as such) it forces critical thinking, which is good. I didn't think calling run() was indicative of the three likely pathways to handle the client socket in the following

[issue31717] Socket documentation threading misstep?

2017-10-06 Thread Phillip
New submission from Phillip : Very small, but, https://docs.python.org/2/howto/sockets.html https://docs.python.org/3/howto/sockets.html have : while True: # accept connections from outside (clientsocket, address) = serversocket.accept() # now do something with the clientsocket

[issue16832] Expose cache validity checking support in ABCMeta

2013-05-25 Thread Phillip J. Eby
Phillip J. Eby added the comment: All that being said, I took out some time to get actual numbers, and found my original guesstimate of overhead was incorrect; it's only 3 times slower, not "orders of magnitude". ;-) And even on a relatively old machine, that 3 times slower amou

[issue16832] Expose cache validity checking support in ABCMeta

2013-05-25 Thread Phillip J. Eby
Phillip J. Eby added the comment: Antoine Pitrou added the comment: > -1. Exposing a function allows to modify the underlying implementation > without breaking any API. This doesn't make any sense. Once you've exposed an API that gives out a value for this, you can't chan

[issue16832] Expose cache validity checking support in ABCMeta

2013-05-25 Thread Phillip J. Eby
Phillip J. Eby added the comment: Please expose this as an attribute of the class or module, not as a function. A function is orders of magnitude slower than attribute access, and the entire point of exposing this is to allow caches to be invalidated. In order to be useful for cache

[issue17636] Modify IMPORT_FROM to fallback on sys.modules

2013-05-04 Thread Phillip J. Eby
Phillip J. Eby added the comment: It looks like maybe basic2 should be importing basic, not basic2. Otherwise, you might as well just import basic2 directly and be done with it. ;-) Likewise, I think indirect should be importing from indirect2, not from itself? i.e., I'd expect that te

[issue17636] Modify IMPORT_FROM to fallback on sys.modules

2013-04-14 Thread Phillip J. Eby
Phillip J. Eby added the comment: On Sun, Apr 14, 2013 at 3:51 AM, Nick Coghlan wrote: > Your analysis is one of the pieces that was missing, Unfortunately, I just noticed it's actually incorrect in a pretty important part In my original example, I said, "because of the circulari

[issue17636] Modify IMPORT_FROM to fallback on sys.modules

2013-04-05 Thread Phillip J. Eby
Phillip J. Eby added the comment: I don't care much one way or the other about it being considered a bug in 2.x, but it might be worth considering a bug in 3.x. Either way, though, the language reference for "from import" should reflect the change, and "alternative implem

[issue17636] Modify IMPORT_FROM to fallback on sys.modules

2013-04-05 Thread Phillip J. Eby
Phillip J. Eby added the comment: ...and I thought of *one* more way to trigger the changed behavior, which looks like: #b.py from .b import util import .a util = util.util #b/util.py def util(): pass (with the other files the same as before). I'm including it only for completeness&

[issue17636] Modify IMPORT_FROM to fallback on sys.modules

2013-04-05 Thread Phillip J. Eby
Phillip J. Eby added the comment: Actually, after a little reflection, I can see that there are more complex conditions to analyze, if 'b' doesn't import 'b.util', but some other module imports b and sets b.util. But that's just freaking insane and whoever does t

[issue17636] Modify IMPORT_FROM to fallback on sys.modules

2013-04-05 Thread Phillip J. Eby
Phillip J. Eby added the comment: On Fri, Apr 5, 2013 at 9:07 AM, Kristján Valur Jónsson wrote: > But I can think of contrived examples where this could break things: > #a.py: > from .b import util > > #b.py > from . import a > from .util import util > > Because o

[issue14905] zipimport.c needs to support namespace packages when no 'directory' entry exists

2013-04-01 Thread Phillip J. Eby
Phillip J. Eby added the comment: Just a note: the zip files produced by the distutils and friends (sdist, bdist_dumb, eggs) do not include entries for plain directories. I would guess that this is also true for wheels at the moment, unless something was specifically done to work around this

[issue16679] Wrong URL path decoding

2012-12-15 Thread Phillip J. Eby
Phillip J. Eby added the comment: > Wouldn't it be possible to amend PEP ? Sure... except then it would also be necessary to amend PEP , and also all WSGI applications already written that assume this, any time in the last nine years. This is a known and intended consistent

[issue16220] wsgiref does not call close() on iterable response

2012-10-13 Thread Phillip J. Eby
Phillip J. Eby added the comment: FYI, this looks like a bug in wsgiref.handlers.BaseHandler.finish_response(), which should probably be using a try/finally to ensure .close() gets called. (Which would catch a failed write() to the client.) I'm kind of amazed this has gone undetected

[issue15502] Meta path finders and path entry finders are different, but share an ABC

2012-08-02 Thread Phillip J. Eby
Phillip J. Eby added the comment: Per Nick's request that I redirect this here instead of #15295... (w/already-fixed things deleted): Hope I'm not too late to the bikeshed painting party; just wanted to chip in with the suggestion of "self-contained package" for no

[issue15295] Import machinery documentation

2012-08-02 Thread Phillip J. Eby
Phillip J. Eby added the comment: Hope I'm not too late to the bikeshed painting party; just wanted to chip in with the suggestion of "self-contained package" for non-namespace packages. (i.e., a self-contained package is one that cannot be split across different sys.path ent

[issue5931] Python runtime name hardcoded in wsgiref.simple_server

2012-07-07 Thread Phillip J. Eby
Phillip J. Eby added the comment: On Sat, Jul 7, 2012 at 2:37 PM, Terry J. Reedy wrote: > Phillip, this is a trivial wsgiref patch. Do you have any opinion? > Nope. -- ___ Python tracker <http://bugs.python.org/

[issue12641] Remove -mno-cygwin from distutils

2012-05-24 Thread Phillip J. Eby
Phillip J. Eby added the comment: Just adding a data point: I use the "mingw32" compiler setting with the Cygwin GCC installation, to compile extensions for standard Windows Python (*not* Cygwin Python). It would be good if any change doesn't break this scenario -- assuming i

[issue14221] re.sub backreferences to numbered groups produce garbage

2012-03-07 Thread Phillip Feldman
New submission from Phillip Feldman : The first example below works; the second one produces output containing garbage characters. (This came up while I was creating a set of examples for a tutorial on regular expressions). import re text= "The cat ate the rat." print("before

[issue13926] pydoc - stall when requesting a list of available modules in the online help utility

2012-02-02 Thread Phillip J. Eby
Phillip J. Eby added the comment: I don't have the code you're talking about in front of me; just wanted to give you a lead on the likely cause. -- ___ Python tracker <http://bugs.python.o

[issue13926] pydoc - stall when requesting a list of available modules in the online help utility

2012-02-02 Thread Phillip J. Eby
Phillip J. Eby added the comment: The problem might be that you're iterating over more than just the top level; if you look for submodules then the parent package has to be imported... and that might make that window load, if there's module-level code in the package __init__ that

[issue13584] argparse doesn't respect double quotes

2011-12-15 Thread Phillip M. Feldman
Phillip M. Feldman added the comment: Hello Steven, I'm embarrassed to report that I can't reproduce the problem. The input line is parsed correctly if I enclose the string 'Demo IO' in double quotes. It is parsed incorrectly if I enclose it in single quotes, but it loo

[issue13584] argparse doesn't respect double quotes

2011-12-11 Thread Phillip Feldman
New submission from Phillip Feldman : I tried switching from `optparse` to `argparse`, but ended up reverting back because `argparse` does not respect double quotes. For example, `optparse` correctly parses the following, while `argparse` does not: python myprog.py --ng --INP="De

[issue13185] Why does Python interpreter care about curvy quotes in comments?

2011-10-17 Thread Phillip M. Feldman
Phillip M. Feldman added the comment: I'm beginning to understand the reasoning. This is quite a bit more complex than I initially thought, and I appreciate the explanations. Phillip On Sun, Oct 16, 2011 at 10:53 PM, Raymond Hettinger wrote: > > Raymond Hettinger added the com

[issue13185] Why does Python interpreter care about curvy quotes in comments?

2011-10-16 Thread Phillip M. Feldman
Phillip M. Feldman added the comment: Hello Martin, This is a fine example of the so-called "is-ought" controversy. The error message is indeed telling me exactly what the problem is, but the underlying problem is that this scheme was poorly thought out. Clearly, the stripping o

[issue13185] Why does Python interpreter care about curvy quotes in comments?

2011-10-14 Thread Phillip Feldman
Changes by Phillip Feldman : -- versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/issue13185> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13185] Why does Python interpreter care about curvy quotes in comments?

2011-10-14 Thread Phillip Feldman
New submission from Phillip Feldman : When I try to run a Python script that contains curvy quotes inside comments, the interpreter gets upset: SyntaxError: Non-ASCII character '\x92' in file ... on line 20198, but no encoding declared; see http://www.python.org/peps/pep-0263.html f

[issue12961] itertools: unlabelled balls in boxes

2011-09-24 Thread Phillip Feldman
Phillip Feldman added the comment: Raymond- I think that you may have overestimated the complexity of the problem. In about 5 hours, I coded, debugged, and documented a set of generator functions to solve the general formulation (including box limits) for three occupancy problems

[issue12961] itertools: unlabelled balls in boxes

2011-09-20 Thread Phillip Feldman
Phillip Feldman added the comment: With the exception of the "empty boxes forbidden" category, I've come across all of these at one time or another, many in the context of error control coding (data communications). Much of the early work on occupancy problems was motivated

[issue12961] itertools: unlabelled balls in boxes

2011-09-20 Thread Phillip Feldman
Phillip Feldman added the comment: Ideally, I'd like to see support for all combinations of the following occupancy problem features: - Labeled and unlabeled boxes - Labeled and unlabeled balls - Empty boxes allowed and empty boxes forbidden - Boxes with no capacity limits and with cap

[issue12961] itertools: unlabelled balls in boxes

2011-09-20 Thread Phillip Feldman
Phillip Feldman added the comment: Mark: I disagree with your claim that "in its basic form, this is covered by itertools.combinations". If you open the attached text on elementary combinatorics and go to page 11, you will see a table that lays out six of the eight most basi

[issue12961] itertools: unlabelled balls in boxes

2011-09-17 Thread Phillip Feldman
Phillip Feldman added the comment: "The itertools module should only have a few of the most generally useful, especially in combination with other tools." Balls-in-boxes _is_ one of the most basic of the canonical combinatorial problems. You can verify this by opening a

[issue12961] unlabelled balls in boxes

2011-09-12 Thread Phillip M. Feldman
Phillip M. Feldman added the comment: Here's an example of a problem from an entirely different domain: An error control coding scheme can correct up to 3 errors in the header of a packet and up to one error in the body of a packet. A given message is divided into four consecutive pa

[issue12961] unlabelled balls in boxes

2011-09-12 Thread Phillip M. Feldman
Phillip M. Feldman added the comment: Hello Mark, This is a fair question. Suppose that I have three boxes with capacity limits of 3, 2, and 1, and that there are three balls in total. Two of the possible distributions are the following: 2, 0, 1 2, 1, 0 Capacity limits of the individual

[issue12961] unlabelled balls in boxes

2011-09-11 Thread Phillip Feldman
New submission from Phillip Feldman : The current set of combinatorial functions in `itertools` does not include unlabelled balls in labeled boxes and unlabelled balls in unlabelled boxes. If the boxes have no capacity limits (i.e., can store an unlimited number of balls), then the

[issue6703] cross platform failure and silly test in doctest

2011-09-09 Thread Phillip J. Eby
Phillip J. Eby added the comment: No, I only consolidated the two copies of the code to a single function, in order to more easily add the PEP 302 support. The feature was already there. -- ___ Python tracker <http://bugs.python.org/issue6

[issue10935] wsgiref.handlers.BaseHandler and subclasses of str

2011-06-04 Thread Phillip J. Eby
Phillip J. Eby added the comment: That change to the spec is fine, though you might also want to add something like, "Like all other WSGI specification types", since *all* types specified in WSGI are 'type()' not 'isinstance()'. --

[issue11968] wsgiref's wsgi application sample code does not work

2011-05-07 Thread Phillip J. Eby
Phillip J. Eby added the comment: Yes, the 'b' is a docs error. I previously removed this in: http://hg.python.org/cpython-fullhistory/rev/2697326d4a77 It appears to have been reverted during a merge, here: http://hg.python.org/cpython-fullhistory/rev/88d04f0143c7 My brows

[issue5135] Expose simplegeneric function in functools module

2011-03-25 Thread Phillip J. Eby
Phillip J. Eby added the comment: Just as an FYI, it *is* possible to do generic functions that work with Python's ABCs (PEAK-Rules supports it for Python 2.6), but it requires caching, and a way of handling ambiguities. In PEAK-Rules' case, unregistering is simply ignored, and

[issue11671] Security hole in wsgiref.headers.Headers

2011-03-25 Thread Phillip J. Eby
Phillip J. Eby added the comment: > It is not uncommon that developers provide web applications to the public in which the HTTP response headers are not filtered for newlines but are controlled by the user. Really? Which applications, and which response headers? > Therefore, I sugg

[issue5800] make wsgiref.headers.Headers accept empty constructor

2011-03-06 Thread Phillip J. Eby
Phillip J. Eby added the comment: Looks good to me. -- ___ Python tracker <http://bugs.python.org/issue5800> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10935] wsgiref.handlers.BaseHandler and subclasses of str

2011-01-21 Thread Phillip J. Eby
Phillip J. Eby added the comment: 1. WSGI is a *Python* spec, not a *CPython* spec, so CPython implementation details have little bearing on how the spec should work. Most non-CPython implementations have a native string type optimized for their runtime or VM (i.e. Jython and IronPython

[issue10935] wsgiref.handlers.BaseHandler and subclasses of str

2011-01-21 Thread Phillip J. Eby
Phillip J. Eby added the comment: Implicit knowledge in your own head about what might or might not be a good idea to program is not the same thing as a specification. "type(x) is str" is a good specification in this context, while "string subclasses, but only if they'

[issue10935] wsgiref.handlers.BaseHandler and subclasses of str

2011-01-20 Thread Phillip J. Eby
Phillip J. Eby added the comment: PyString_AsString() only "works on subclasses" if their internal representation is the same as type str. So we can't say "subclass of str" without *also* specifying that the subclass store its contents in exactly the same way

[issue10935] wsgiref.handlers.BaseHandler and subclasses of str

2011-01-19 Thread Phillip J. Eby
Phillip J. Eby added the comment: One of the original reasons was to make it easier for server authors writing C code to interface with WSGI. C APIs that operate on lists and dicts often do not do what you would expect, when called on a subclass. Essentially, this could lead to an app that

[issue10935] wsgiref.handlers.BaseHandler and subclasses of str

2011-01-19 Thread Phillip J. Eby
Phillip J. Eby added the comment: Doesn't matter how unpythonic it is: the spec calls for exact types and has done so for six years already, so it's a bit late to do anything about it. (And any version of Python that allowed string subclasses was in violation of the spec and there

[issue10751] REMOTE_USER and Remote-User collision in wsgiref

2011-01-04 Thread Phillip J. Eby
Phillip J. Eby added the comment: You say it "would" do this. Have you actually *tested* it? Looking at the code in wsgiref again, I don't think it does what you think it does. The '_' substitution is done to keyword arguments for header *parameters* only; it&#x

[issue10751] REMOTE_USER and Remote-User collision in wsgiref

2011-01-04 Thread Phillip J. Eby
Phillip J. Eby added the comment: I'm still baffled. How does this matter to anything? The HTTP headers you describe would end up in an HTTP_REMOTE_USER environment variable, with no impact on REMOTE_USER. REMOTE_USER could only be set by an actual web server, not via an HTTP header.

[issue10751] REMOTE_USER and Remote-User collision in wsgiref

2011-01-02 Thread Phillip J. Eby
Phillip J. Eby added the comment: I don't understand. HTTP_REMOTE_USER is not the name of a standard CGI variable - it's REMOTE_USER. It would help if you could show code for what client/proxy/server combination has this problem, what happens when that code runs, and what you want

[issue10715] uninformative error message

2010-12-20 Thread Phillip M. Feldman
Phillip M. Feldman added the comment: Why was this removed? On Mon, Dec 20, 2010 at 8:30 PM, Alexander Belopolsky < rep...@bugs.python.org> wrote: > > Changes by Alexander Belopolsky : > > > Removed file: http://bugs.python.

[issue10715] uninformative error message

2010-12-20 Thread Phillip M. Feldman
Phillip M. Feldman added the comment: I eventually determined that a call to `subprocess.Popen` was responsible for the message, but could have determined this much more quickly if the message had included the name of the file that could not be opened (executed). Phillip On Mon, Dec 20, 2010

[issue10155] Add fixups for encoding problems to wsgiref

2010-12-17 Thread Phillip J. Eby
Phillip J. Eby added the comment: So, do you have any suggestions for a specific change to the patch? -- ___ Python tracker <http://bugs.python.org/issue10

[issue10715] uninformative error message

2010-12-15 Thread Phillip Feldman
New submission from Phillip Feldman : The error message "OSError: [Errno 2] No such file or directory" would be far more helpful if it specified the name of the file or directory that cannot be found. -- messages: 124108 nosy: Phillip.M.Feldman priority: normal severity: nor

[issue10367] "python setup.py sdist upload --show-response" can fail with "UnboundLocalError: local variable 'result' referenced before assignment"

2010-12-03 Thread Phillip J. Eby
Phillip J. Eby added the comment: The urgency was only that I didn't want the other contributors to this issue to feel as though the bar on their contributions were being raised higher every time they jumped the previous bar. IOW, I did it to make them feel like somebody was doing *some

[issue10367] "python setup.py sdist upload --show-response" can fail with "UnboundLocalError: local variable 'result' referenced before assignment"

2010-12-03 Thread Phillip J. Eby
Phillip J. Eby added the comment: Whoops, my bad... I misread Eric's earlier message as throwing it back onto *Daniel* to produce a test, not that *he* (Eric) was working on the test. IOW, I thought that progress had been stalled a second time on this, and went ahead to pick up the

[issue10367] "python setup.py sdist upload --show-response" can fail with "UnboundLocalError: local variable 'result' referenced before assignment"

2010-12-03 Thread Phillip J. Eby
Phillip J. Eby added the comment: Committed Daniel's patch to r86978 in the 2.7 maintenance branch. (The 2.x trunk still has this bug, but is permanently closed to new checkins.) -- stage: needs patch -> committed/rejected versions: -3rd party, Python 3.1, Py

[issue10367] "python setup.py sdist upload --show-response" can fail with "UnboundLocalError: local variable 'result' referenced before assignment"

2010-12-03 Thread Phillip J. Eby
Phillip J. Eby added the comment: Given that this is a pure bugfix to revert a problem in 2.7 -- where no *new* development is being done -- a test isn't actually needed for this patch. There is no point in holding up a distutils1 fix for distutils2's benefit. Daniel: thanks for

[issue1859] textwrap doesn't linebreak on "\n"

2010-11-23 Thread Phillip M. Feldman
Phillip M. Feldman added the comment: I would like to unsubscribe from this thread, but haven't been able to figure out how to do it. Phillip On Mon, Nov 22, 2010 at 11:50 PM, Georg Brandl wrote: > > Georg Brandl added the comment: > > Yes, please do apply. You don&#x

[issue5800] make wsgiref.headers.Headers accept empty constructor

2010-11-21 Thread Phillip J. Eby
Phillip J. Eby added the comment: Yes, please consider the type->isinstance part of the change rejected. I just got done reverting a bunch of those in 3.2. Where WSGI specifies types, it means "type() is", not "isinstance". (The 3.x version of wsgiref does not need

[issue10367] "python setup.py sdist upload --show-response" can fail with "UnboundLocalError: local variable 'result' referenced before assignment"

2010-11-20 Thread Phillip J. Eby
Phillip J. Eby added the comment: It looks to me as though this patch reintroduces issue9199, as it passes multiple arguments to self.announce() once again. The patch needs to be made against the SVN version of Python, not the released version

[issue9199] distutils upload command crashes when displaying server response

2010-11-09 Thread Phillip J. Eby
Phillip J. Eby added the comment: Confirmed - issue10367 is not a dupe. This bug was that a *successful* upload would crash; issue10367 occurs only in the HTTPError case, and isn't fixed by this issue's patch. Reclosing this and reopening 10367. -- stage: commit review -&

[issue10367] "python setup.py sdist upload --show-response" can fail with "UnboundLocalError: local variable 'result' referenced before assignment"

2010-11-09 Thread Phillip J. Eby
Phillip J. Eby added the comment: Btw, a quick review of the 3.x trunk code for this shows that it does *not* have this problem; this is specific to 2.7 and AFAICT *only* 2.7. (This problem was introduced in r73436, btw, as of the move to urllib2 vs. httplib

[issue10367] "python setup.py sdist upload --show-response" can fail with "UnboundLocalError: local variable 'result' referenced before assignment"

2010-11-09 Thread Phillip J. Eby
Phillip J. Eby added the comment: To better show what the problem is, here's a change that would fix the problem (albeit in an ugly way): --- upload.py 2010-07-07 20:16:33.0 -0400 +++ /home/pje/upload.new2010-11-09 14:30:21.0 -0500 @@ -167,6 +

[issue10155] Add fixups for encoding problems to wsgiref

2010-11-03 Thread Phillip J. Eby
Phillip J. Eby added the comment: Committed to Py3K in r86146, with added docs and a larger list of transcodable CGI variables. -- ___ Python tracker <http://bugs.python.org/issue10

[issue9199] distutil upload command crashes when displaying server response

2010-07-08 Thread Phillip J. Eby
New submission from Phillip J. Eby : When showing a server response (--show-response), the upload command crashes with the following traceback: Traceback (most recent call last): File "setup.py", line 94, in scripts = scripts, File "/usr/lib/python2.7/distutils/core.py

[issue8694] python3 FAQ mentions unicode()

2010-05-11 Thread Nathan Phillip Brink
New submission from Nathan Phillip Brink : http://docs.python.org/py3k/faq/programming.html#what-does-unicodeerror-ascii-decoding-encoding-error-ordinal-not-in-range-128-mean When I try to use unicode() from within python3, the call fails. I would actually expect that the FAQ should contain

[issue7250] wsgiref.handlers.CGIHandler caches os.environ, leaking info between requests

2010-03-01 Thread Phillip J. Eby
Phillip J. Eby added the comment: Will I be able to do what? I have a kludgy test and a patch in my checkout, I was just waiting for word back from you (since Feb 19) on whether that would be ok. -- ___ Python tracker <http://bugs.python.

[issue7250] wsgiref.handlers.CGIHandler caches os.environ, leaking info between requests

2010-02-18 Thread Phillip J. Eby
Phillip J. Eby added the comment: What sort of test did you have in mind? To test the desired outcome, it seems we'd need to poison os.environ, reload wsgiref.handlers, remove the poison, and then make sure it didn't get in. That seems a bit like overkill (as well as hard to

[issue6792] Distutils-based installer does not detect 64bit versions of Python

2009-12-27 Thread Phillip J. Eby
Phillip J. Eby added the comment: ISTM there may be two ways to fix this problem; one was to change the .exe header produced by bdist_wininst, but in retrospect, it can't fix this because it's likely Windows' 64-to-32 bit conversion (Wow6432Node) that's changing the regist

[issue7411] allow import from file having name containing hyphen or blank

2009-11-29 Thread Phillip M. Feldman
New submission from Phillip M. Feldman : It appears that there is currently no way to import from a file whose name contains a hyphen or blank. This makes it difficult to encode a version number or date in the file name. The solution that I favor would be to allow the name of the file to be

[issue1859] textwrap doesn't linebreak on "\n"

2009-11-29 Thread Phillip M. Feldman
Phillip M. Feldman added the comment: As a temporary workaround, you can use the `wrap` function in my strnum module (http://pypi.python.org/pypi/strnum/2.4). Phillip -- nosy: +pfeld...@verizon.net ___ Python tracker <http://bugs.python.

[issue1488943] difflib.Differ() doesn't always add hints for tab characters

2009-11-19 Thread Phillip Hellewell
Phillip Hellewell added the comment: Please apply the patch ASAP. This bug is affecting downstream product viewvc in a very adverse way. See http://viewvc.tigris.org/issues/show_bug.cgi?id=436 It's sad that I spent several hours tracking down this bug only to find out that henryl fou

[issue7250] wsgiref.handlers.CGIHandler caches os.environ, leaking info between requests

2009-11-04 Thread Phillip J. Eby
Phillip J. Eby added the comment: I've forwarded the suggested fix to the GAE team; it is to add this line: os_environ = {} # Handle GAE and other multi-run CGI use cases to the class body of CGIHandler. This should also be done in the Python stdlib. Btw, this fix can al

[issue7250] wsgiref.handlers.CGIHandler caches os.environ, leaking info between requests

2009-11-03 Thread Phillip J. Eby
Phillip J. Eby added the comment: Hm. In retrospect, CGIHandler should probably just set os_environ to an empty dictionary in its class body (thereby not using the cached environ), and this would then work correctly for repeated uses. This would be a clean bugfix and wouldn't affect beh

[issue7250] wsgiref.handlers.CGIHandler caches os.environ, leaking info between requests

2009-11-03 Thread Phillip J. Eby
Phillip J. Eby added the comment: This is not an issue with CGI, but an issue with using an inappropriate WSGI handler for a long-running process environment that only emulates CGI. That is, in a true CGI environment, there can't be *multiple* requests made to CGIHandler, and so it can&#

[issue3079] sys.exit() called from optparse - bad, bad, bad

2009-10-15 Thread Phillip M. Feldman
Phillip M. Feldman added the comment: Thanks for the response! I can indeed catch SystemExit, but I would like to be able to take one action (terminate the program) if the user supplied an unknown option, and another action (prompt for a new value) if the user supplied a bad value for an

[issue3079] sys.exit() called from optparse - bad, bad, bad

2009-10-15 Thread Phillip M. Feldman
Phillip M. Feldman added the comment: The current behavior of optparse is contrary to how most of Python works. optparse should throw a named exception that can be trapped and identified by the calling program. Doing a SystemExit is unacceptable. I can't believe that this is such a hard

[issue7064] Python 2.6.3 / setuptools 0.6c9: extension module builds fail with KeyError

2009-10-12 Thread Phillip J. Eby
Phillip J. Eby added the comment: FYI, a fix allowing setuptools to work with 2.6.3 is now checked in, and will be released soon (preferably in a few days, unless new bugs turn up). If you are experiencing issues with this and would like to try the fixed version(s), please see the announcement

[issue7064] Python 2.6.3 / setuptools 0.6c9: extension module builds fail with KeyError

2009-10-05 Thread Phillip J. Eby
Phillip J. Eby added the comment: I appreciate the change being made. The specific code in setuptools is relying on an erroneous reading of get_ext_filename()'s docstring (which as of 2.3 at least, implied to me at least that it is always called with an extension's full dotted name)

[issue6663] re.findall does not always return a list of strings

2009-08-07 Thread Phillip M. Feldman
Phillip M. Feldman added the comment: You are right-- the documentation does say this, although it took me a while to understand what it means. Thanks! It seems as though there's a flaw in the design here, because there should be some mechanism for grouping elements of a regular expre

[issue6663] re.findall does not always return a list of strings

2009-08-06 Thread Phillip M. Feldman
New submission from Phillip M. Feldman : As per the Python documentation, the following regular expression should produce a list containing the strings '6.7', 7.33', and '9': re.findall('(-?\d+[.]\d+)|(-?\d+[.]?)|(-?[.]\d+)', 'asdf6.77.33ff9&#

[issue6652] missing cmath functions

2009-08-05 Thread Phillip M. Feldman
New submission from Phillip M. Feldman : The online documentation describes functions cmath.phase and cmath.polar, but when I try to import these, I get "cannot import name" errors. -- assignee: georg.brandl components: Documentation messages: 91330 nosy: georg.bra

[issue6132] Implement the GIL with critical sections in Windows

2009-05-29 Thread Phillip Sitbon
Phillip Sitbon added the comment: Tabified new code and removed one C++-style comment. -- Added file: http://bugs.python.org/file14114/thread_nt.h.patch ___ Python tracker <http://bugs.python.org/issue6

[issue6132] Implement the GIL with critical sections in Windows

2009-05-29 Thread Phillip Sitbon
Changes by Phillip Sitbon : Removed file: http://bugs.python.org/file14096/thread_nt.h.patch ___ Python tracker <http://bugs.python.org/issue6132> ___ ___ Python-bug

[issue6132] Implement the GIL with critical sections in Windows

2009-05-28 Thread Phillip Sitbon
Phillip Sitbon added the comment: > I'm not competent to review Windows-specific stuff, but > some style notes: > - your indentation is inconsistent with the original file > (you should use tabs) > - please don't use any C++-style comments Thanks- I was only suppl

[issue6132] Implement the GIL with critical sections in Windows

2009-05-27 Thread Phillip Sitbon
Changes by Phillip Sitbon : Added file: http://bugs.python.org/file14097/LockingTest.py ___ Python tracker <http://bugs.python.org/issue6132> ___ ___ Python-bugs-list m

[issue6132] Implement the GIL with critical sections in Windows

2009-05-27 Thread Phillip Sitbon
New submission from Phillip Sitbon : At the suggestion of others on the Python-Dev list, I'm going to outline what I've been doing with the GIL and where I see possiblity for improvement. Discussion: http://mail.python.org/pipermail/python-dev/2009-May/089746.html Detail: Currently

  1   2   >