[issue22215] embedded NUL character exceptions

2014-09-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Simplified a code in getargs.c as suggested by Victor. -- Added file: http://bugs.python.org/file36556/valueerror_embedded_nul_character_3.patch ___ Python tracker rep...@bugs.python.org

[issue22215] embedded NUL character exceptions

2014-09-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file36556/valueerror_embedded_nul_character_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22215 ___

[issue22215] embedded NUL character exceptions

2014-09-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file36557/valueerror_embedded_nul_character_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22215 ___

[issue22302] Windows os.path.isabs UNC path bug

2014-09-06 Thread Akima
Akima added the comment: I just realised that monkeyfart!££ is actually a valid relative path name. What I said still holds, just replace monkeyfart!££ with elephant*dung? (which contains the invalid characters: *? ). -- ___ Python tracker

[issue22226] Refactor dict result handling in Tkinter

2014-09-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Terry. Fixed style in two methods, added a summary to Treeview.set() docstring and changed returns/sets to return/set. But I disagree with other suggestions. Return value of 3-arg call is insignificant implementation detail. In any case these

[issue22302] Windows os.path.isabs UNC path bug

2014-09-06 Thread Akima
Akima added the comment: eryksun: You have marked this bug as effecting Python 2.7. When I tested for the bug on 2.7.5 the problem didn't show up: Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information.

[issue13968] Support recursive globs

2014-09-06 Thread Nick Coghlan
Nick Coghlan added the comment: Looks good to me! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13968 ___ ___ Python-bugs-list mailing list

[issue22302] Windows os.path.isabs UNC path bug

2014-09-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is the consequence of recent backporting splitdrive() implementation from 3.x to 2.7. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22302 ___

[issue22215] embedded NUL character exceptions

2014-09-06 Thread STINNER Victor
STINNER Victor added the comment: The latest patch looks good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22215 ___ ___

[issue20188] ALPN support for TLS

2014-09-06 Thread Cory Benfield
Cory Benfield added the comment: Updating to mention a concern with ALPN implementation. HTTP/2 requires that a cipher with AEAD be negotiated. However, it also allows for offering a wider range of cipher suites: if an AEAD cipher is not present, this will allow fallback to HTTP/1.1. There's

[issue22346] asyncio documentation does not mention provisional status

2014-09-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset fefe7822e6b8 by Nick Coghlan in branch '3.4': Issue #22346: also include asyncio PEP 411 notice in 3.4 http://hg.python.org/cpython/rev/fefe7822e6b8 -- ___ Python tracker rep...@bugs.python.org

[issue22340] Fix Python 3 warnings in Python 2 tests

2014-09-06 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: patch review - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22340 ___ ___

[issue22295] Clarify available commands for package installation

2014-09-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset e8447da8791d by Nick Coghlan in branch '3.4': Issue #22295: Adopt 'python -m pip' as the preferred invocation http://hg.python.org/cpython/rev/e8447da8791d New changeset a969b42e6e2b by Nick Coghlan in branch 'default': Merge issue #22295 fix from

[issue22295] Clarify available commands for package installation

2014-09-06 Thread Nick Coghlan
Nick Coghlan added the comment: Switched to python -m pip. To deal with python3 vs python parallel system installs, I made the assumption that folks are using virtual environments explicitly, rather than diving into the arcana associated with using pip in conjunction with a system Python

[issue22343] Install bash activate script on Windows when using venv

2014-09-06 Thread Nick Coghlan
Nick Coghlan added the comment: +1 from me - Vinay? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22343 ___ ___ Python-bugs-list mailing list

[issue22299] resolve() on Windows makes some pathological paths unusable

2014-09-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Since both paths are valid and both paths refer to the same file, some developers may find this result counterintuitive. On the other hand the proposed solution is regular. If you input an extended path, you get an extended path as output. There are other

[issue22166] test_codecs leaks references

2014-09-06 Thread Nick Coghlan
Nick Coghlan added the comment: Ah, I think I've found a possible underlying culprit: there's a separate C level codec_search_cache on the interpreter object that is independent of encodings._cache. The attached patch eliminates the reference leaks entirely (using gc.get_referrers() to get a

[issue22166] test_codecs leaks references

2014-09-06 Thread Nick Coghlan
Nick Coghlan added the comment: Yep, it looks like the mess with the reference cycles in the tracebacks was just a secondary problem: the real culprit was the internal cache keeping everything else alive. Attached patch just adds clearing encodings._cache and the CPython internal cache to

[issue22348] Documentation of asyncio.StreamWriter.drain()

2014-09-06 Thread Martin Richard
New submission from Martin Richard: Hi, Following the discussion on the python-tulip group, I'd like to propose a patch for the documentation of StreamWriter.drain(). This patch aims to give a better description of what drain() is intended to do, and when to use it. In particular, it

[issue22348] Documentation of asyncio.StreamWriter.drain()

2014-09-06 Thread Martin Richard
Changes by Martin Richard mart...@martiusweb.net: -- hgrepos: -273 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22348 ___ ___ Python-bugs-list

[issue22166] test_codecs leaks references

2014-09-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'd much rather see a private function somewhere (in the _codecs module) to clear that private interpreter cache. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22166

[issue22166] test_codecs leaks references

2014-09-06 Thread Nick Coghlan
Nick Coghlan added the comment: Yeah, I'm wary of the GC hack as well. It's a nice way to prove that this the internal cache is the problem, but probably not something we want to commit. A codecs._forget_codec helper in the C module would be all that was needed to handle it. Other

[issue22166] test_codecs leaks references

2014-09-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 06.09.2014 15:03, Nick Coghlan wrote: A codecs._forget_codec helper in the C module would be all that was needed to handle it. Other implementations could then also use that to clear their own internal cache (if they have one). If you want to take

[issue22339] Incorrect behavior when subclassing enum.Enum

2014-09-06 Thread Kiss György
Kiss György added the comment: I found one thing which you can't do subclassing Enum what you can with metaclasses: enforcing type checking at class creation time. Values are passed to __new__ as positional arguments, so it's impossible to tell the difference between these two: class

[issue22299] resolve() on Windows makes some pathological paths unusable

2014-09-06 Thread Steve Dower
Steve Dower added the comment: Actually, I'd be inclined to never use the prefix within pathlib and then add it on if necessary when converting to a string. That would also solve a problem like: p = Path(C:\\) / ('a'*150) / ('a'*150) p.stat() FileNotFoundError: [WinError 3] The system

[issue22299] resolve() on Windows makes some pathological paths unusable

2014-09-06 Thread Steve Dower
Steve Dower added the comment: If anyone wanted to test that really long path, here's the incantation to create it: import os, pathlib os.mkdir(C:\\a) os.mkdir(C:\\a\\ + a*150) os.rename(C:\\a, C:\\ + a*150) p = pathlib.Path(C:\\) / (a*150) / (a*150) --

[issue22166] test_codecs leaks references

2014-09-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: May be just do not use the unique name? -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22166 ___

[issue22215] embedded NUL character exceptions

2014-09-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 25032ec29315 by Serhiy Storchaka in branch 'default': Issue #22215: Now ValueError is raised instead of TypeError when str or bytes http://hg.python.org/cpython/rev/25032ec29315 -- ___ Python tracker

[issue12067] Doc: remove errors about mixed-type comparisons.

2014-09-06 Thread Guido van Rossum
Guido van Rossum added the comment: - This bug should discuss doc updates, not question the rules. - The rules have evolved over time and the docs stayed behind. - We should definitely update the 2.7 docs as well as the 3.4 and 3.5 (in development) docs. The 2.7 docs need to be different

[issue22215] embedded NUL character exceptions

2014-09-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your review Victor. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22215 ___ ___

[issue22215] embedded NUL character exceptions

2014-09-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22215 ___

[issue22131] uuid.bytes optimization

2014-09-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Alex, Raymond, could you please make a review of my patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22131 ___

[issue22131] uuid.bytes optimization

2014-09-06 Thread Alex Gaynor
Alex Gaynor added the comment: Patch looks good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22131 ___ ___ Python-bugs-list mailing

[issue22226] Refactor dict result handling in Tkinter

2014-09-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: looks good to commit. -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6 ___

[issue22339] Incorrect behavior when subclassing enum.Enum

2014-09-06 Thread Ethan Furman
Ethan Furman added the comment: You could do the same kind of check in __new__, but consider this: class StrValues(MultiValueEnum): one = ('One' 'one', '1') two = ('two', 'Two', '2') In this scenario the 'Oneone' mistake would still not be

[issue19524] ResourceWarning when urlopen() forgets the HTTPConnection object

2014-09-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset c1fb19907cc4 by Serhiy Storchaka in branch '3.4': Issue #19524: Fixed resource leak in the HTTP connection when an invalid http://hg.python.org/cpython/rev/c1fb19907cc4 New changeset 43bf95480c3c by Serhiy Storchaka in branch 'default': Issue

[issue19524] ResourceWarning when urlopen() forgets the HTTPConnection object

2014-09-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution Martin. -- resolution: - fixed stage: patch review - resolved status: open - closed type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19524

[issue22343] Install bash activate script on Windows when using venv

2014-09-06 Thread Vinay Sajip
Vinay Sajip added the comment: I have no particular objection to this, and it's not a lot of work to make it happen. The POSIX scripts were left out in case the opposite view was advanced - that these scripts would be of no use to most people on Windows, and shouldn't be there cluttering up

[issue22166] test_codecs leaks references

2014-09-06 Thread Nick Coghlan
Nick Coghlan added the comment: This investigation also showed why the original tests that used a non-unique name didn't work: the codec was getting cached the first time through and hence not seeing the different codecs registered by other tests. MAL, my plan was to provide an API to forget a

[issue22131] uuid.bytes optimization

2014-09-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset f7b5038d3102 by Serhiy Storchaka in branch 'default': Issue #22131: Modernized the code of the uuid module. http://hg.python.org/cpython/rev/f7b5038d3102 New changeset d8c6b15a2ae3 by Serhiy Storchaka in branch '2.7': Issue #22131: Fixed a bug in

[issue22131] uuid.bytes optimization

2014-09-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Alex. -- assignee: - serhiy.storchaka resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22131

[issue22226] Refactor dict result handling in Tkinter

2014-09-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7b0fdc1e917a by Serhiy Storchaka in branch '2.7': Issue #6: Added private function _splitdict() in the Tkinter module. http://hg.python.org/cpython/rev/7b0fdc1e917a New changeset f89995a4ec11 by Serhiy Storchaka in branch '3.4': Issue #6:

[issue22226] Refactor dict result handling in Tkinter

2014-09-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Terry for your review. -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6

[issue22349] Remove more unnecessary version checks from distutils

2014-09-06 Thread Thomas Kluyver
New submission from Thomas Kluyver: Following on from issue 22200, this removes some more code in distutils that checks which Python version it's running on. As part of the standard library, distutils should always be running on the version of Python which it ships with. --

[issue22200] Remove distutils checks for Python version

2014-09-06 Thread Thomas Kluyver
Thomas Kluyver added the comment: I've made a patch removing some more of these version checks in issue 22349. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22200 ___

[issue22166] test_codecs leaks references

2014-09-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 06.09.2014 21:14, Nick Coghlan wrote: This investigation also showed why the original tests that used a non-unique name didn't work: the codec was getting cached the first time through and hence not seeing the different codecs registered by other

[issue22166] test_codecs leaks references

2014-09-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, the point here is to add a private API just for our test suite, not something users would want to call. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22166

[issue22299] resolve() on Windows makes some pathological paths unusable

2014-09-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'd be inclined to never use the prefix within pathlib and then add it on if necessary when converting to a string That may be very surprising when that prefix appears, though... At least with explicit methods the user would have to invoke them, instead of

[issue22323] Rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString()

2014-09-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hmm... sorry for the delay, there's no review link. Perhaps the patch is not against the latest default? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22323

[issue22299] resolve() on Windows makes some pathological paths unusable

2014-09-06 Thread Steve Dower
Steve Dower added the comment: It's no less expected than having OS functions fail because the path is too long. Using it to maintain dots at the end of directory/file names is a little less safe and may break some code. Maybe pathlib should strip these if there is no a prefix? (For example,

[issue22324] Use PyUnicode_AsWideCharString() instead of PyUnicode_AsUnicode()

2014-09-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The cache is released when the string is released. While the string exists it's wchar_t representation can be needed again. That is for what the cache exists. -- ___ Python tracker rep...@bugs.python.org

[issue22349] Remove more unnecessary version checks from distutils

2014-09-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7fece97e605d by Benjamin Peterson in branch '3.4': remove various dead version checks (closes #22349) http://hg.python.org/cpython/rev/7fece97e605d New changeset 688701337b1a by Benjamin Peterson in branch 'default': merge 3.4 (#22349)

[issue22299] resolve() on Windows makes some pathological paths unusable

2014-09-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: If most (or all) of the file handling functions in Python are using *W() APIs and can support the prefix, I'd rather add it in silently if only to avoid the long path issue. This would only work for fully-qualified paths, right? Not relative ones. I'm all

[issue22166] test_codecs leaks references

2014-09-06 Thread Nick Coghlan
Nick Coghlan added the comment: Targeted API to forget a particular codec name. Normally we don't care about the caching (as evidenced by the fact it took 14+ years to want this feature). The intent with this API is to be able to selective purge a particular codec when we either care about

[issue5309] distutils doesn't parallelize extension module compilation

2014-09-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Updated patch: - add the -j option to the build command as well (even though it's only used by build_ext) - in setup.py, only force parallel compilation if make was called with -j -- Added file:

[issue12067] Doc: remove errors about mixed-type comparisons.

2014-09-06 Thread Martin Panter
Martin Panter added the comment: The point about “a != b” deferring to “not a.__eq__(b)” is not documented anywhere that I am aware of. In fact the opposite is currently documented at https://docs.python.org/release/3.4.0/reference/datamodel.html#richcmpfuncs, so maybe this needs to be fixed,

[issue5309] distutils doesn't parallelize extension module compilation

2014-09-06 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5309 ___ ___

[issue5309] distutils doesn't parallelize extension module compilation

2014-09-06 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: - Is support for infinite jobs planned? (GNU make supports it for -j without number argument.) - self.parallel = int(self.parallel) would raise ValueError when a non-number is passed. I suggest to print user-friendly error message.

[issue22299] resolve() on Windows makes some pathological paths unusable

2014-09-06 Thread Steve Dower
Steve Dower added the comment: This would only work for fully-qualified paths, right? Not relative ones. Correct, and I think we're most of the way there with how drives are handled. Since the prefix only works with absolute paths, why not treat it as part of the drive name? --

[issue11572] bring Lib/copy.py to 100% coverage

2014-09-06 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- components: +Library (Lib) nosy: +berker.peksag type: - enhancement versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11572

[issue11822] Improve disassembly to show embedded code objects

2014-09-06 Thread Nick Coghlan
Nick Coghlan added the comment: Sorry for the long delay in doing anything with this patch. Unfortunately, trunk has moved on quite a bit since this patch was submitted, and it's no longer directly applicable. However, the basic principle is sound, so this is a new patch that aligns with the

[issue22350] nntplib file write failure causes exception from QUIT command

2014-09-06 Thread Martin Panter
New submission from Martin Panter: The following code triggers an NNTPProtocolError, as long as the body is large enough to cause an intermediate flush of the output file. The reason I think is that the body() method aborts in the middle of reading the BODY response, and when the context

[issue21468] NNTPLib connections become corrupt after long periods of activity

2014-09-06 Thread Martin Panter
Martin Panter added the comment: Perhaps this is similar to Issue 22350 which I just raised. Whenever the NNTP context manager exits, a QUIT command is called, and if the context manager is exiting due to a protocol error or some other exception not handled by the protocol, the code will try

[issue22351] NNTP constructor exception leaves socket for garbage collector

2014-09-06 Thread Martin Panter
New submission from Martin Panter: If the nntplib.NNTP constructor fails, it often leaves the connection and socket open until the garbage collector cleans them up and emits a ResourceWarning: try: ... NNTP(localhost) ... except Exception as err: ... print(repr(err)) ...

[issue12067] Doc: remove errors about mixed-type comparisons.

2014-09-06 Thread Guido van Rossum
Guido van Rossum added the comment: That's a pretty new feature. Someone probably forgot to clean up all the places where it was documented. On Sat, Sep 6, 2014 at 4:18 PM, Martin Panter rep...@bugs.python.org wrote: Martin Panter added the comment: The point about “a != b” deferring to

[issue22352] Ensure opcode names and args fit in disassembly output

2014-09-06 Thread Nick Coghlan
New submission from Nick Coghlan: While exploring display options for issue 11822, I found that the new matrix multiplication opcode names (BINARY_MATRIX_MULTIPLY and INPLACE_MATRIX_MULTIPLY) don't fit in the nominal field width in the disassembly output (which is currently 20 characters).

[issue11822] Improve disassembly to show embedded code objects

2014-09-06 Thread Nick Coghlan
Nick Coghlan added the comment: I didn't want to add a second argument to turn off the new behaviour, so I changed it such that passing a value 0 for nested turns off the new feature entirely. Levels = 0 enable it, defining which level to start with. The default level is 0 so there's no