[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

[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

[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

[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] 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-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: 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-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

[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

[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:

[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

[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

[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:

[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

[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

[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

[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

[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

[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-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-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-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

[issue1739468] Add a -z interpreter flag to execute a zip file

2007-08-27 Thread Phillip J. Eby
Phillip J. Eby added the comment: Patch implementing an alternate approach: support automatically importing __main__ when sys.argv[0] is an importable path. This allows zip files, directories, and any future importable locations (e.g. URLs) to be used on the command line. Note that this also

[issue1739468] Add a -z interpreter flag to execute a zip file

2007-08-27 Thread Phillip J. Eby
Changes by Phillip J. Eby: _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1739468> _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue1004] MultiMethods with type annotations in 3000

2007-10-24 Thread Phillip J. Eby
Phillip J. Eby added the comment: Interested, yes. Have time for at the moment, no. :( Seems unlikely I'll have time before 2008Q1 at this point. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python

[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-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

[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-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

[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

[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()'. --

[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

[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

[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 +

[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

[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 -&

[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:

[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

[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

[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

[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

[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

[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

[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

[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: 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: 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

[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-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

[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.

[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

[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-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

[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

[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-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-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-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

[issue1180] Option to ignore or substitute ~/.pydistutils.cfg

2008-06-25 Thread Phillip J. Eby
Phillip J. Eby <[EMAIL PROTECTED]> added the comment: I'm good with it; the issue with the comment in core.py was my only remaining objection. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3348] Cannot start wsgiref simple server in Py3k

2008-07-22 Thread Phillip J. Eby
Phillip J. Eby <[EMAIL PROTECTED]> added the comment: The encoding must be latin-1, not utf-8, and the stream must be binary mode, not text. I have no idea how to deal with the test suite, and don't have time at the moment to investigate. ___ Pyt

[issue3348] Cannot start wsgiref simple server in Py3k

2008-07-22 Thread Phillip J. Eby
Phillip J. Eby <[EMAIL PROTECTED]> added the comment: For the "why Latin-1", read the WSGI spec's explanation of how strings should be handled in Python implementations where 'str' is unicode. I suppose that you *could* make it a text stream with Latin-1

[issue3348] Cannot start wsgiref simple server in Py3k

2008-07-22 Thread Phillip J. Eby
Phillip J. Eby <[EMAIL PROTECTED]> added the comment: HTTP is defined as a stream of bytes; the fact that you can specify encodings for headers and content is a different level of the spec. WSGI wants to basically be as transparent a mapping as possible between HTTP and Pytho

[issue3442] wsgiref.validate.InputWrapper.readline does not accept optional "length" argument

2008-07-25 Thread Phillip J. Eby
Phillip J. Eby <[EMAIL PROTECTED]> added the comment: Any package which is using the length argument to readline() is in violation of PEP 333 and should be fixed. The argument is intentionally not supported by wsgiref.validate, since its purpose is to catch incorrect programs that are vio

[issue3348] Cannot start wsgiref simple server in Py3k

2008-09-06 Thread Phillip J. Eby
Phillip J. Eby <[EMAIL PROTECTED]> added the comment: Not any time soon; I don't currently use Py3K and can't even vouch for the correctness of the posted patch within Py3K. (i.e., what really happened to the message class?) Sorry; all I can really do here is clarify WSGI-r

[issue3834] wsgiref.validator.InputWrapper readline method has wrong signature

2008-09-11 Thread Phillip J. Eby
Phillip J. Eby <[EMAIL PROTECTED]> added the comment: Per PEP 333: """The optional "size" argument to readline() is not supported, as it may be complex for server authors to implement, and is not often used in practice.""" The whole point of this

[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

[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.

[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

[issue1576] First draft of a post import hook

2007-12-09 Thread Phillip J. Eby
Phillip J. Eby added the comment: It also needs to hold the import lock during both the "register" and "notify" operations. In addition, the "notify" operation needs to be exposed for calling from Python (so that lazy module implementations can interop).

[issue1886] Permit to easily use distutils "--formats=tar, gztar, bztar" on all systems

2008-01-21 Thread Phillip J. Eby
Phillip J. Eby added the comment: On systems where the gzip or bz2 modules aren't installed, this patch can raise a tarfile.CompressionError, which should be caught and handled correctly. The import of tarfile should also be inside the relevant function (as is done for make_zipfile) inste

[issue2439] Patch to add a get_data function to pkgutil

2008-03-20 Thread Phillip J. Eby
Phillip J. Eby <[EMAIL PROTECTED]> added the comment: Hi Paul. AFAICT, this doesn't look like it will actually work for filesystem data. get_loader() will return None for "regular", filesystem-installed modules, at least in Python 2.5. Perhaps you should add

[issue2439] Patch to add a get_data function to pkgutil

2008-03-20 Thread Phillip J. Eby
Phillip J. Eby <[EMAIL PROTECTED]> added the comment: Oops, my bad. I'm thinking of an entirely unrelated get_loader() function. Meanwhile, I misread your patch entirely, and thought you had some dead code for os.path processing that is in fact live. So there is "another"

[issue2439] Patch to add a get_data function to pkgutil

2008-03-20 Thread Phillip J. Eby
Phillip J. Eby <[EMAIL PROTECTED]> added the comment: reload() is implemented by calling the PEP 302 load_module() method on the existing module object. __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2439] Patch to add a get_data function to pkgutil

2008-03-21 Thread Phillip J. Eby
Phillip J. Eby <[EMAIL PROTECTED]> added the comment: An easy way to test it: just change your load_module() to raise an AssertionError if the module is already in sys.modules, and the main body of the test to make two get_data() calls for the same

[issue2439] Patch to add a get_data function to pkgutil

2008-03-21 Thread Phillip J. Eby
Phillip J. Eby <[EMAIL PROTECTED]> added the comment: Why does it need to be a valid loader? It's a mock, not a real loader. But if it really bothers you, have it increment a global in the module or something, and put the assertion in the test proper. Heck, have it update a cou

[issue2439] Patch to add a get_data function to pkgutil

2008-03-21 Thread Phillip J. Eby
Phillip J. Eby <[EMAIL PROTECTED]> added the comment: But I'm getting a failure on that test, and the other one, too: $ ./python Lib/test/test_pkgutil.py test_alreadyloaded (__main__.PkgutilTests) ... FAIL test_getdata_filesys (__main__.PkgutilTests) ... FAIL test_getdata_pep30

[issue1180] Option to ignore or substitute ~/.pydistutils.cfg

2008-04-26 Thread Phillip J. Eby
Phillip J. Eby <[EMAIL PROTECTED]> added the comment: Both versions of the patch have a problem, in that the Distribution object is looking for an option directly in sys.argv. At the very least, this should be looking at the 'script_args' attribute of the Distribution instead

[issue1180] Option to ignore or substitute ~/.pydistutils.cfg

2008-04-27 Thread Phillip J. Eby
Phillip J. Eby <[EMAIL PROTECTED]> added the comment: I much prefer the simpler of the two patches - better to monkeypatch in the tests than adding complications to the already over-complicated distutils.dist. I don't find monkeypatching in tests to be horrible at all, but if it rea

[issue1180] Option to ignore or substitute ~/.pydistutils.cfg

2008-04-28 Thread Phillip J. Eby
Phillip J. Eby <[EMAIL PROTECTED]> added the comment: It looks like you can drop the change to distutils.core, too, since it's just a change in the comment, and the changed comment is inaccurate, AFAICT. Apart from that, it looks good. __ Trac

[issue1180] Option to ignore or substitute ~/.pydistutils.cfg

2008-04-29 Thread Phillip J. Eby
Phillip J. Eby <[EMAIL PROTECTED]> added the comment: Oh, I thought you meant that it overrides *which* config files -- i.e., implied that it was handling --no-user-config. __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue4330] wsgiref.validate doesn't accept arguments to readline

2008-11-15 Thread Phillip J. Eby
Phillip J. Eby <[EMAIL PROTECTED]> added the comment: No, it shouldn't. The purpose of wsgiref.validate is to validate spec compliance, and the use of a readline() argument means that the program doing the invocation is not valid, per the spec. wsgiref.validate is correctly re

[issue4330] wsgiref.validate doesn't accept arguments to readline

2008-11-15 Thread Phillip J. Eby
Phillip J. Eby <[EMAIL PROTECTED]> added the comment: Uh, Ian, do you not remember being the person who *wrote* this code a few years ago? This is the old paste.lint with a little renaming. Of course it can be used with existing code -- code that complies with the WSGI spec. It

[issue4330] wsgiref.validate doesn't accept arguments to readline

2008-11-16 Thread Phillip J. Eby
Phillip J. Eby <[EMAIL PROTECTED]> added the comment: Then obviously it makes no sense to update wsgiref before the spec. ISTM the correct way to deal with this is update the cgi module to include a WSGI-compatible API. ___ Python tracker <[EMAIL

[issue4617] SyntaxError when free variable name is also an exception target

2008-12-12 Thread Phillip J. Eby
Phillip J. Eby added the comment: I could argue either way on this one; it's true that deleting a nested-scope variable is sometimes desirable, but it also seems to me like closing over an except: variable is a Potentially Bad Idea. In neither case, however, do I think it's appropria

[issue4718] wsgiref package totally broken

2008-12-22 Thread Phillip J. Eby
Phillip J. Eby added the comment: If you want to change to using bytes, you're going to have to take it to the Web-SIG and hash out a revision to PEP 333, which at the moment requires the use of strings, period. This has nothing to do with the desirability of bytes vs. strings; I am sure

[issue4718] wsgiref package totally broken

2008-12-22 Thread Phillip J. Eby
Phillip J. Eby added the comment: At 03:37 PM 12/22/2008 +, Antoine Pitrou wrote: >So, not accepting bytes in py3k is clearly a violation of the PEP! On the contrary. Please read the two paragraphs *after* the one you quoted. ___ Python tracker &l

[issue4718] wsgiref package totally broken

2008-12-22 Thread Phillip J. Eby
Phillip J. Eby added the comment: To be quite clear: this change requires discussion on the Web-SIG and an appropriate revision of the PEP. Ideally, the patch should include the necessary PEP revision. The Web-SIG discussion regarding a switch to bytes should also take into consideration the

[issue4718] wsgiref package totally broken

2008-12-23 Thread Phillip J. Eby
Phillip J. Eby added the comment: Antoine, you have three choices here: 1. Follow the PEP, 2. Take it to the Web-SIG and get the appropriate discussion, consensus, and PEP revision, or 3. Drop wsgiref from the current release of Py3K until #2 can be done. Which would you prefer? Please note

[issue4718] wsgiref package totally broken

2008-12-24 Thread Phillip J. Eby
Phillip J. Eby added the comment: Graham: thanks for pointing that out; I completely forgot we already *had* the migration discussion on the Web-SIG! It just slipped my mind because I didn't have any 3.0 work on the horizon. Dmitry: A question about the new patch. Are bytearra

[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',

[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

[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

[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

[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

[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-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

[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

[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

[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

[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)

  1   2   >