[issue22379] Empty exception message of str.join

2014-09-11 Thread Yongzhi Pan
Changes by Yongzhi Pan : -- versions: +Python 3.5 Added file: http://bugs.python.org/file36604/str_join_exception_message_1.diff ___ Python tracker ___ __

[issue22224] docs.python.org is prone to political blocking in Russia

2014-09-11 Thread Donald Stufft
Donald Stufft added the comment: Just to close the gap on this, most of the PSF web properties that go through Fastly have been switched over to a set of IP addresses that are dedicated to the PSF. So if someone does an IP ban they are blocking us. I just made the switch in DNS so it'll take h

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2014-09-11 Thread Dan O'Reilly
Dan O'Reilly added the comment: Thanks, Antoine. I've opened issue22393. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue22393] multiprocessing.Pool shouldn't hang forever if a worker process dies unexpectedly

2014-09-11 Thread Dan O'Reilly
New submission from Dan O'Reilly: This is essentially a dupe of issue9205, but it was suggested I open a new issue, since that one ended up being used to fix this same problem in concurrent.futures, and was subsequently closed. Right now, should a worker process in a Pool unexpectedly get term

[issue22386] Python 3.4 logging.getLevelName() no longer maps string to level.

2014-09-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset a4c5effb8698 by Vinay Sajip in branch '3.4': Issue #22386: fixed regression. http://hg.python.org/cpython/rev/a4c5effb8698 New changeset 070fed5b7b9d by Vinay Sajip in branch 'default': Closes #22386: merged fix from 3.4. http://hg.python.org/cpytho

[issue21270] unittest.mock.call object has inherited count method

2014-09-11 Thread Michael Foord
Michael Foord added the comment: Thanks for this Kushal. It's not quite right though, count and index need to do the same as other attributes looked up with __getattr__. In fact delegating to __getattr__ is probably the easiest way of achieving that. (With the current patch the calls will be i

[issue16662] load_tests not invoked in package/__init__.py

2014-09-11 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 11, 2014, at 07:23 AM, STINNER Victor wrote: >The changeset d0ff527c53da5b925b61a8a70afc686ca6e05960 related to this issue >introduced a regression in test_unittest. The test now fails on >Windows. Darn. I don't have Windows handy to work out a fix. I

[issue22362] Warn about octal escapes > 0o377 in re

2014-09-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Well, here is a patch which makes re raise an exception on suspicious octals. -- Added file: http://bugs.python.org/file36602/re_octal_escape_overflow_raise.patch ___ Python tracker

[issue22382] sqlite3 connection built from apsw connection should raise IntegrityError, not DatabaseError

2014-09-11 Thread william tonkin
william tonkin added the comment: The following worked for me: --- util.c 2014-09-11 15:15:11.480266548 -0400 +++ util.c.fixed2014-09-11 15:17:19.214878592 -0400 @@ -54,7 +54,7 @@ (void)sqlite3_reset(st); } -errorcode = sqlite3_errcode(db); +errorcode = 0xffu

[issue22391] MSILIB truncates last character in summary information stream

2014-09-11 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +loewis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

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

2014-09-11 Thread Steve Dower
Steve Dower added the comment: Another alternative is to always leave the prefix there after calling resolve() (as opposed to the current behaviour which is to always remove it). If the Win32 API says that the path should include the prefix, then it should. There's no reliable way for a develo

[issue22362] Warn about octal escapes > 0o377 in re

2014-09-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think we should simply raise ValueError in 3.5. There's no reason to accept such invalid escapes. -- ___ Python tracker ___ _

[issue22359] Remove incorrect uses of recursive make

2014-09-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Martin, Matthias, do you think this would break any legitimate use? -- nosy: +loewis, pitrou stage: -> patch review type: compile error -> behavior ___ Python tracker

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

2014-09-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Really, the test for whether to keep or remove the prefix should be to > remove the prefix and try and resolve the path again. If it succeeds, > remove the prefix; otherwise, keep it. This can only really be done as > part of the resolve() call, which would

[issue22392] Clarify documentation of __getinitargs__

2014-09-11 Thread David Gilman
New submission from David Gilman: Implementations of __getinitargs__ return a tuple of the positional arguments for __init__. This wasn't initially apparent to me after reading the docs: I thought you were passing a tuple (args, kwargs) that would get called f(*args, **kwargs) and had to go

[issue22386] Python 3.4 logging.getLevelName() no longer maps string to level.

2014-09-11 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +larry priority: normal -> release blocker versions: +Python 3.5 ___ Python tracker ___ ___ Pytho

[issue21147] sqlite3 doesn't complain if the request contains a null character

2014-09-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue13968] Support recursive globs

2014-09-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue22391] MSILIB truncates last character in summary information stream

2014-09-11 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: +steve.dower, tim.golden, zach.ware ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2014-09-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: You should certainly create a new issue! -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue22390] test.regrtest should complain if a test doesn't remove temporary files

2014-09-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I will try to investigate these warnings. Run tests with the -vv option. -- ___ Python tracker ___

[issue22390] test.regrtest should complain if a test doesn't remove temporary files

2014-09-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I would prefer to fix tests instead of trying to remove arbitrary files. I'm > not sure that "fn.startswith(support.TESTFN)" check is safe enough. This allow other tests which leaks the same file to be reported too. support.TESTFN contains process ID so it

[issue22391] MSILIB truncates last character in summary information stream

2014-09-11 Thread Kevin Phillips
Kevin Phillips added the comment: I should mention that I did discover some source code on GitHub, presumably for this wrapper module, and I believe I found a few questionable parts in the logic for this library that may help explain the cause of this problem: https://github.com/python-git/pyt

[issue22364] Unify error messages of re and regex

2014-09-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > By the way, which is preferred, "cannot" or "can't"? The regex module always > uses "can't", but re module uses "cannot" except for "TypeError: can't use > a bytes pattern on a string-like object", I think. It's interesting question. Grepping in CPython sour

[issue22391] MSILIB truncates last character in summary information stream

2014-09-11 Thread Kevin Phillips
New submission from Kevin Phillips: I recently exploited a subtle bug with the msilib module's GetProperty method on the SummaryInformation class. When retrieving string-typed properties from the stream the last character in the string gets truncated, replaced by a null-byte. I am using Pytho

[issue22390] test.regrtest should complain if a test doesn't remove temporary files

2014-09-11 Thread STINNER Victor
STINNER Victor added the comment: I ran the test suite with the patch applied: 7 tests altered the execution environment: test_imp test_import test_pdb test_posix test_source_encoding test_support test_threaded_import I will try to investigate these warnings. -- __

[issue22390] test.regrtest should complain if a test doesn't remove temporary files

2014-09-11 Thread STINNER Victor
STINNER Victor added the comment: I would prefer to fix tests instead of trying to remove arbitrary files. I'm not sure that "fn.startswith(support.TESTFN)" check is safe enough. Maybe we should not remove TESTFN neither. You are supposed to be able to run tests without regrtest. --

[issue22390] test.regrtest should complain if a test doesn't remove temporary files

2014-09-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch. It warns if new files or directories are left after test run in current directory and removes those of them which starts with TESTFN (i.e. TESTFN_UNICODE, TESTFN + "2", TESTFN + ".py" and other names used in tests). -- keywords: +pat

[issue22336] _tkinter should use Python PyMem_Malloc() instead of Tcl ckalloc()

2014-09-11 Thread STINNER Victor
STINNER Victor added the comment: > And to me too. Please commit it, this is mainly your patch. Ok, thanks, done. -- ___ Python tracker ___ _

[issue22336] _tkinter should use Python PyMem_Malloc() instead of Tcl ckalloc()

2014-09-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9f1d3e6e6ce6 by Victor Stinner in branch 'default': Closes #22336: attemptckalloc() with PyMem_Malloc() in _tkinter http://hg.python.org/cpython/rev/9f1d3e6e6ce6 -- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open ->

[issue22387] Making tempfile.NamedTemporaryFile a class

2014-09-11 Thread Antony Lee
Antony Lee added the comment: Yes, but this will make the context-manager approach (with NamedTemporaryFile(closed=True): ) unusable, because the underlying file object will be closed before calling __enter__. I think the only reasonable way to implement this would be to have __enter__ return

[issue22336] _tkinter should use Python PyMem_Malloc() instead of Tcl ckalloc()

2014-09-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And to me too. Please commit it, this is mainly your patch. -- ___ Python tracker ___ ___ Python-b

[issue21199] Python on 64-bit Windows uses signed 32-bit type for read length

2014-09-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I added comments to test on Rietveld. -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python

[issue22382] sqlite3 connection built from apsw connection should raise IntegrityError, not DatabaseError

2014-09-11 Thread william tonkin
william tonkin added the comment: sqlite3 allows a connection to be built from an apsw.Connection(). Using an apsw.Connection() to build an sqlite3.connect() implies that the underlying sqlite database engine will have extended error codes turned on (the default if for them to be turned off.)

[issue22336] _tkinter should use Python PyMem_Malloc() instead of Tcl ckalloc()

2014-09-11 Thread STINNER Victor
STINNER Victor added the comment: tkinter_pymem_3.patch looks good to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue13968] Support recursive globs

2014-09-11 Thread STINNER Victor
STINNER Victor added the comment: > However perhaps we should consider as a bug if a test ran by regrtest doesn't > clean created files or directories => yes, I opened the issue #22390. -- ___ Python tracker

[issue22390] test.regrtest should complain if a test doesn't remove temporary files

2014-09-11 Thread STINNER Victor
New submission from STINNER Victor: A change in test_glob of issue #13968 started to fail because a previous test created temporary files but didn't remove them. test.regrtest should at least emit a warning if the temporary directory used to run tests is not empty before removing it.

[issue22389] Generalize contextlib.redirect_stdout

2014-09-11 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 11, 2014, at 02:25 PM, STINNER Victor wrote: >Why not adding a new redirect_stderr() function? With a little refactoring redirect_stdout into a subclass, that would work too. -- ___ Python tracker

[issue22389] Generalize contextlib.redirect_stdout

2014-09-11 Thread STINNER Victor
STINNER Victor added the comment: Why not adding a new redirect_stderr() function? -- nosy: +haypo ___ Python tracker ___ ___ Python-b

[issue22389] Generalize contextlib.redirect_stdout

2014-09-11 Thread Barry A. Warsaw
New submission from Barry A. Warsaw: redirect_stdout is almost exactly what I want, except I want to redirect stderr! redirect_stdout.__init__() should take a 'stream_name' argument (possibly keyword-only) which could be set to 'stderr'. I propose it's implemented as setattr(sys, stream_name

[issue21199] Python on 64-bit Windows uses signed 32-bit type for read length

2014-09-11 Thread Larry Hastings
Larry Hastings added the comment: Ping? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue22384] Tk.report_callback_exception kills process when run with pythonw.exe

2014-09-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: May be this patch would help. -- assignee: -> serhiy.storchaka keywords: +patch nosy: +serhiy.storchaka stage: -> patch review type: crash -> behavior versions: +Python 2.7, Python 3.5 Added file: http://bugs.python.org/file36600/tkinter_report_call

[issue22336] _tkinter should use Python PyMem_Malloc() instead of Tcl ckalloc()

2014-09-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > * Tkapp_CallDeallocArgs() ckfree() on memory allocated by PyMem_Malloc() => > wrong Oh, you are right, thanks. > (see my review on Rietveld). Perhaps you forgot to press the "Publish" button. -- Added file: http://bugs.python.org/file36599/tkinte

[issue21228] Missing enumeration of HTTPResponse Objects methods of urllib.request.urlopen's http.client.HTTPResponse?

2014-09-11 Thread Evens Fortuné
Evens Fortuné added the comment: I'm satisfied with this new patch. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue13968] Support recursive globs

2014-09-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Victor. The test was failed also when run it directly, omitting the test.regrtest module (which run a test inside temporary directory): ./python Lib/test/test_glob.py Now it is fixed. However perhaps we should consider as a bug if a test ran b

[issue13968] Support recursive globs

2014-09-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 180f5bf7d1b9 by Serhiy Storchaka in branch 'default': Issue #13968: Fixed newly added recursive glob test. http://hg.python.org/cpython/rev/180f5bf7d1b9 -- ___ Python tracker

[issue22388] Unify style of "Contributed by" notes

2014-09-11 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Here is a patch which converts "Contributed by" notes in whatsnews to most prevalent style. This means: * Previous sentence ends by a period and the "Contributed" is titled. * The note ends by a period and it is placed before closing parent. * The note is s

[issue22387] Making tempfile.NamedTemporaryFile a class

2014-09-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You can do this with a function too: def NTF(*args, closed=False, **kwargs): if closed: kwargs["delete"] = True ntf = NamedTemporaryFile(*args, **kwargs) if closed: ntf.close() return ntf -- nosy: +georg.brandl, nco

[issue21951] tcl test change crashes AIX

2014-09-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Victor for great investigation of this issue. -- ___ Python tracker ___ ___ Python-bugs-

[issue22336] _tkinter should use Python PyMem_Malloc() instead of Tcl ckalloc()

2014-09-11 Thread STINNER Victor
STINNER Victor added the comment: I read tkinter_pymem_2.patch. Remaining calls to ckalloc(): * they are only used to allocate events passed later to Tcl_ThreadQueueEvent(). Tcl_ThreadQueueEvent doc explicitly says that the memory must be allocated by Tcl_Alloc or ckalloc, so it's correct (Py

[issue21951] tcl test change crashes AIX

2014-09-11 Thread STINNER Victor
STINNER Victor added the comment: test_tcl now pass on AIX: http://buildbot.python.org/all/builders/PPC64%20AIX%203.x/builds/2592/steps/test/logs/stdio Thanks Serhiy for the fix. -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue21951] tcl test change crashes AIX

2014-09-11 Thread STINNER Victor
STINNER Victor added the comment: > Committed these two changes as separate patches. Thanks, it's clearer like that. -- ___ Python tracker ___ __

[issue13968] Support recursive globs

2014-09-11 Thread STINNER Victor
STINNER Victor added the comment: The test failed on a buildbot, I reopen the issue. http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.x/builds/10607/steps/test/logs/stdio == FAIL: test_selflink (test.test_glob.

[issue21147] sqlite3 doesn't complain if the request contains a null character

2014-09-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 430865e9ea9f by Serhiy Storchaka in branch '2.7': Issue #21147: sqlite3 now raises an exception if the request contains a null http://hg.python.org/cpython/rev/430865e9ea9f New changeset 517f216d45ea by Serhiy Storchaka in branch '3.4': Issue #21147

[issue22385] Allow 'x' and 'X' to accept bytes-like objects in string formatting

2014-09-11 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue13968] Support recursive globs

2014-09-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your review Nick. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue22387] Making tempfile.NamedTemporaryFile a class

2014-09-11 Thread Antony Lee
Antony Lee added the comment: The initial idea was to solve #14243 (NamedTemporaryFile would be more useful on Windows if you could close it without deleting) by adding a "closed" keyword argument to the constructor of a subclass, that would set "delete" to False and then close it, e.g. class

[issue13968] Support recursive globs

2014-09-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset ff4b9d654691 by Serhiy Storchaka in branch 'default': Issue #13968: The glob module now supports recursive search in http://hg.python.org/cpython/rev/ff4b9d654691 -- nosy: +python-dev ___ Python tracker

[issue22387] Making tempfile.NamedTemporaryFile a class

2014-09-11 Thread Eric V. Smith
Eric V. Smith added the comment: Can you explain why you want to subclass them? -- nosy: +eric.smith type: -> enhancement ___ Python tracker ___

[issue21228] Missing enumeration of HTTPResponse Objects methods of urllib.request.urlopen's http.client.HTTPResponse?

2014-09-11 Thread Martin Panter
Martin Panter added the comment: Fair enough, challenge accepted! Here is my attempt. I have explicitly made the info(), geturl() and getcode() methods available for all cases, and used Evens’s wording for the modified “msg” attribute, but dropped mentioning the “url” attribute. -- Ad

[issue21951] tcl test change crashes AIX

2014-09-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Committed these two changes as separate patches. -- stage: patch review -> commit review ___ Python tracker ___ __

[issue22336] _tkinter should use Python PyMem_Malloc() instead of Tcl ckalloc()

2014-09-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is updated patch which is synchronized with the tip after changes made in issue21951 and addresses my comments. -- Added file: http://bugs.python.org/file36596/tkinter_pymem_2.patch ___ Python tracker

[issue22387] Making tempfile.NamedTemporaryFile a class

2014-09-11 Thread Antony Lee
New submission from Antony Lee: Currently, tempfile.TemporaryFile and tempfile.NamedTemporaryFile are functions, not classes, despite what their names suggest, preventing subclassing. It would arguably be not so easy to make TemporaryFile a class, as its return value is whatever "_io.open" re

[issue21951] tcl test change crashes AIX

2014-09-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset ee969a717cb5 by Serhiy Storchaka in branch '2.7': Issue #21951: Use attemptckalloc() instead of ckalloc() in Tkinter. http://hg.python.org/cpython/rev/ee969a717cb5 New changeset 1223c882253f by Serhiy Storchaka in branch '3.4': Issue #21951: Use att

[issue22379] Empty exception message of str.join

2014-09-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue9951] introduce bytes.hex method

2014-09-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 11.09.2014 01:04, Nick Coghlan wrote: > > Nick Coghlan added the comment: > > Just as a recap of at least some of the *current* ways to do a bytes -> hex > conversion: > import codecs codecs.encode(b"abc", "hex") > b'616263' import binas

[issue22385] Allow 'x' and 'X' to accept bytes-like objects in string formatting

2014-09-11 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not particularly wild about the .precision syntax either, but I think the feature is generally useful. Adding bytes.__format__ is exactly what "special output for bytes" _is_, as far as format() is concerned. Another option would be to invent a new format

[issue22385] Allow 'x' and 'X' to accept bytes-like objects in string formatting

2014-09-11 Thread STINNER Victor
STINNER Victor added the comment: > ".precision": chunks output, placing a space after every bytes I dislike this option. There is already "%.s" in Python 2 and Python 3 (and printf of the C language) which truncates the string. If you need such special output, please write your own function.

[issue16662] load_tests not invoked in package/__init__.py

2014-09-11 Thread STINNER Victor
STINNER Victor added the comment: The changeset d0ff527c53da5b925b61a8a70afc686ca6e05960 related to this issue introduced a regression in test_unittest. The test now fails on Windows. Example: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/5065/steps/test/logs/stdi

[issue22385] Allow 'x' and 'X' to accept bytes-like objects in string formatting

2014-09-11 Thread Eric V. Smith
Eric V. Smith added the comment: I think this would need to be implemented by adding bytes.__format__. I can't think of a way to make it work on bytes-like objects in general. -- ___ Python tracker ___

[issue22386] Python 3.4 logging.getLevelName() no longer maps string to level.

2014-09-11 Thread Ned Deily
Changes by Ned Deily : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue22385] Allow 'x' and 'X' to accept bytes-like objects in string formatting

2014-09-11 Thread Ned Deily
Changes by Ned Deily : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue9951] introduce bytes.hex method

2014-09-11 Thread Chris Lasher
Chris Lasher added the comment: int has int.from_bytes and int.to_bytes. Currently, bytes has bytes.fromhex. Would the core developers please consider naming the method "bytes.tohex" instead of "bytes.hex", so there's at least a modicum of consistency in the method names of Python's builtin ty

[issue22381] update zlib in 2.7 to 1.2.8

2014-09-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 769126143656 by doko in branch '2.7': - Issue #22381: Update zlib to 1.2.8. http://hg.python.org/cpython/rev/769126143656 -- ___ Python tracker ___

[issue2943] Distutils should generate a better error message when the SDK is not installed

2014-09-11 Thread Piotr Dobrogost
Changes by Piotr Dobrogost : -- nosy: +piotr.dobrogost ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m