[issue14102] argparse: add ability to create a man page

2012-12-03 Thread Christoph Sieghart
Changes by Christoph Sieghart : -- nosy: +sigi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue15004] add weakref support to types.SimpleNamespace

2012-12-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: You shouldn't have to export something named __weakref__. Furthermore, the test should check that weakrefs work, not that an attribute exists. -- nosy: +pitrou ___ Python tracker

[issue15004] add weakref support to types.SimpleNamespace

2012-12-03 Thread Christian Heimes
Christian Heimes added the comment: The patch LGTM except for the extra code reformatting. However it's too late for 3.3. -- nosy: +christian.heimes versions: +Python 3.4 -Python 3.3 ___ Python tracker ___

[issue16602] weakref can return an object with 0 refcount

2012-12-03 Thread Christian Heimes
Christian Heimes added the comment: Thank you very much for bringing the issue to our attention. I've removed 2.6 and 3.1 because they are in security fix mode and this issue poses no security threat. -- nosy: +christian.heimes stage: -> needs patch versions: +Python 3.4 -Python 2.6,

[issue16602] weakref can return an object with 0 refcount

2012-12-03 Thread Eugene Toder
New submission from Eugene Toder: An interaction between weakrefs and trashcan can cause weakref to return the object it's pointing to after object's refcount is already 0. Given that the object is usually increfed and decrefed, this leads to double dealloc and crashing or hanging. Tested 2.6.

[issue15031] Split .pyc parsing from module loading

2012-12-03 Thread Philip Jenvey
Philip Jenvey added the comment: >From the perspective of Jython we'd want the easiest way to hook into this as >possible of course, but I think that overriding marshal to handle a $py.class >or whatever format would be a misappropriation of the marshal module Jython actually has a slow, preli

[issue16218] Python launcher does not support unicode characters

2012-12-03 Thread STINNER Victor
STINNER Victor added the comment: > New changeset c25635b137cc by Victor Stinner in branch 'default': > Issue #16455: On FreeBSD and Solaris, if the locale is C, the > http://hg.python.org/cpython/rev/c25635b137cc This changeset should fix this issue on FreeBSD and Solaris: see the issue #16455

[issue16455] Decode command line arguments from ASCII on FreeBSD and Solaris if the locale is C

2012-12-03 Thread STINNER Victor
STINNER Victor added the comment: > New changeset c25635b137cc by Victor Stinner in branch 'default': > Issue #16455: On FreeBSD and Solaris, if the locale is C, the > http://hg.python.org/cpython/rev/c25635b137cc This changeset should fix #16218 on FreeBSD and Solaris (these OS should now deco

[issue16455] Decode command line arguments from ASCII on FreeBSD and Solaris if the locale is C

2012-12-03 Thread STINNER Victor
STINNER Victor added the comment: > We have two options, I don't know which one is the best (safer). Force ASCII is safer. Python should announce that it does not "understand" non-ASCII bytes on the command line. I also chose this option because isalpha(0xe9) returns 0 (even if mbstowcs(0xe9)

[issue16455] Decode command line arguments from ASCII on FreeBSD and Solaris if the locale is C

2012-12-03 Thread STINNER Victor
Changes by STINNER Victor : -- title: sys.getfilesystemencoding() is not the locale encoding on FreeBSD and OpenSolaris when the locale is not set -> Decode command line arguments from ASCII on FreeBSD and Solaris if the locale is C ___ Python track

[issue16455] sys.getfilesystemencoding() is not the locale encoding on FreeBSD and OpenSolaris when the locale is not set

2012-12-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset c25635b137cc by Victor Stinner in branch 'default': Issue #16455: On FreeBSD and Solaris, if the locale is C, the http://hg.python.org/cpython/rev/c25635b137cc -- nosy: +python-dev ___ Python tracker

[issue12268] file readline, readlines & readall methods can lose data on EINTR

2012-12-03 Thread Gary Miguel
Changes by Gary Miguel : -- nosy: +Gary.Miguel ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue16601] Restarting iteration over tarfile continues from where it left off.

2012-12-03 Thread Michael Birtwell
Michael Birtwell added the comment: Here's a patch on the tarfile's unittest module. -- Added file: http://bugs.python.org/file28203/test-tarfile-restart-iteration.patch ___ Python tracker

[issue16490] "inspect.getargspec()" and "inspect.getcallargs()" don't work for builtins

2012-12-03 Thread Larry Hastings
Larry Hastings added the comment: http://mail.python.org/pipermail/python-dev/2012-December/122920.html -- ___ Python tracker ___ ___

[issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context

2012-12-03 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +georg.brandl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue16601] Restarting iteration over tarfile continues from where it left off.

2012-12-03 Thread R. David Murray
R. David Murray added the comment: Thanks for the patch. Could you either include a test or post code that demonstrates the problem, please? -- nosy: +r.david.murray ___ Python tracker ___

[issue16601] Restarting iteration over tarfile continues from where it left off.

2012-12-03 Thread Michael Birtwell
Michael Birtwell added the comment: Embarrassingly as soon as I uploaded that patch I found a problem with it. I hadn't taken in to account the special case for the first member. Here's a replacement patch -- type: -> behavior Added file: http://bugs.python.org/file28202/fix-tarfile-

[issue16601] Restarting iteration over tarfile continues from where it left off.

2012-12-03 Thread Michael Birtwell
New submission from Michael Birtwell: If you partially iterate over a tarfile then try and restart iteration of that tarfile it will continue from where it left off rather than restarting from the beginning. I've only tried this with the tarfile implementation in python 2.7 but the 3.x code l

[issue16507] Patch selectmodule.c to support WSAPoll on Windows

2012-12-03 Thread Richard Oudkerk
Richard Oudkerk added the comment: Attached is an alternative patch which only touches selectmodule.c. It still does not support WinXP. Note that in this version register() and modify() do not ignore the POLLPRI flag if it was *explicitly* passed. But I am not sure how best to deal with POL

[issue9974] tokenizer.untokenize not invariant with line continuations

2012-12-03 Thread Simon Law
Changes by Simon Law : -- nosy: +sfllaw ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/m

[issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context

2012-12-03 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks! I will try it out shortly. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue16582] Tkinter calls SystemExit with string

2012-12-03 Thread Abraham Karplus
Abraham Karplus added the comment: I'd be fine with having it fixed just in 3.4, as it is easy enough to work around for now. (Call deletecommand('exit') and then createcommand('exit', working_exit_function) with working_exit function being the patched version of _exit.) -- _

[issue4833] Explicit directories for zipfiles

2012-12-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Actually now creating directories in zipfile is possible with ZipFile.writestr(special_zip_info, b''). However a special method (like ZipFile.mkdir(name)) can be useful. -- nosy: +serhiy.storchaka stage: -> needs patch versions: +Python 3.4 ___

[issue14099] ZipFile.open() should not reopen the underlying file

2012-12-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry, not issue16304, but issue16034. The commit messages were wrong. -- ___ Python tracker ___ _

[issue14099] ZipFile.open() should not reopen the underlying file

2012-12-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > This idiom currently works and should not be broken. Hmm. This seems doubtful to me, but if it is used, then I agree, it shouldn't be broken. > I guess that the slowdown by seek() is neglectable compared to this. Even one function call can have effect on

[issue14099] ZipFile.open() should not reopen the underlying file

2012-12-03 Thread Stepan Kasal
Stepan Kasal added the comment: I'm not sure when I'll get to this, sorry. Hopefully sometime soon. -- ___ Python tracker ___ ___ Pyth

[issue16569] Preventing errors of simultaneous access in zipfile

2012-12-03 Thread Stepan Kasal
Stepan Kasal added the comment: > but I'm afraid it's impossible to do without performance regression due to > seek before every read. I agree that this is key question. I would hope that the performance hit wouldn't be so bad, unless there are actually two decompressions running concurrently

[issue14099] ZipFile.open() should not reopen the underlying file

2012-12-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think some benchmarks will needed to see how it will affect the performance. Please update your patch to current sources. The module code was changed last months. -- ___ Python tracker

[issue16076] xml.etree.ElementTree.Element is no longer pickleable

2012-12-03 Thread Daniel Shahaf
Daniel Shahaf added the comment: Attached patch for your consideration. I've tested pickling/unpickling and comparing the resulting object attribute by attribute (.tag, .attrib, .text, .tail for equality; and recursively .getchildren()), and 'make test' --- all seems to work. If the approach

[issue14099] ZipFile.open() should not reopen the underlying file

2012-12-03 Thread Stepan Kasal
Stepan Kasal added the comment: Re: children counting You need to know the number of open children and whether the parent ZipFile object is still open. As soon as both all children and the parent ZipFile are closed, the underlying fp (corresponding to the file name given initially) shall be cl

[issue16569] Preventing errors of simultaneous access in zipfile

2012-12-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Actually, it is not yet forbidden, and two of the tests in the zipfile.py > test suite do actually rely on this misfeature. Indeed. I missed that. Actually these tests work by accident, due to the fact that the contents of the zipfile is placed in the fil

[issue16569] Preventing errors of simultaneous access in zipfile

2012-12-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Test: file24624/Proposed-fix-of-issue14099-second.patch -- ___ Python tracker ___ ___ Python-bugs

[issue16569] Preventing errors of simultaneous access in zipfile

2012-12-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Test: http://bugs.python.org/file24624/Proposed-fix-of-issue14099-second.patch file24624 -- ___ Python tracker ___ _

[issue16569] Preventing errors of simultaneous access in zipfile

2012-12-03 Thread Stepan Kasal
Stepan Kasal added the comment: I agree that reading from a file open for write should be forbidden, no matter whether ZipFile was called with fp or a name. Actually, it is not yet forbidden, and two of the tests in the zipfile.py test suite do actually rely on this misfeature. The first chunk

[issue6669] TarFile.getmembers fails at struct.unpack: unpack requires a string argument of length 4

2012-12-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also related issue4844 and issue14315 for zipfile. -- nosy: +serhiy.storchaka versions: +Python 3.4 -Python 3.3 ___ Python tracker ___

[issue5701] ZipFile returns compressed data stream when encountering unsupported compression method

2012-12-03 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka resolution: -> duplicate stage: test needed -> committed/rejected status: open -> closed superseder: -> zipfile should raise an exception for unsupported compression methods ___ Python tracke

[issue16531] Allow IPNetwork to take a tuple

2012-12-03 Thread Andrew Svetlov
Changes by Andrew Svetlov : -- nosy: +asvetlov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue16511] IDLE configuration file: blank height and width fields trip up IDLE

2012-12-03 Thread Andrew Svetlov
Changes by Andrew Svetlov : -- nosy: +asvetlov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue16499] CLI option for isolated mode

2012-12-03 Thread Andrew Svetlov
Changes by Andrew Svetlov : -- nosy: +asvetlov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue16496] Simplify and optimize random_seed()

2012-12-03 Thread Andrew Svetlov
Changes by Andrew Svetlov : -- nosy: +asvetlov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue16495] bytes_decode() unnecessarily examines encoding

2012-12-03 Thread Andrew Svetlov
Changes by Andrew Svetlov : -- nosy: +asvetlov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue16494] Add a method on importlib.SourceLoader for creating bytecode file format/container

2012-12-03 Thread Andrew Svetlov
Changes by Andrew Svetlov : -- nosy: +asvetlov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue16492] Add a load_parents argument to importlib.find_loader()

2012-12-03 Thread Andrew Svetlov
Changes by Andrew Svetlov : -- nosy: +asvetlov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue16599] unittest: Access test result from tearDown

2012-12-03 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue16582] Tkinter calls SystemExit with string

2012-12-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The code was changed in the changeset e8a2a5e4c7b0. > def _exit(code='0'): >- import sys >- sys.exit(getint(code)) >+ raise SystemExit, code I think it is a bug and should be fixed. -- nosy: +gvanrossum, serhiy.storchaka __

[issue16583] Tkinter nested SystemExit

2012-12-03 Thread Andrew Svetlov
Andrew Svetlov added the comment: Fixed. Thanks for report. As tkinter code is not processed via 2to3 tool now, I've fixed tkinter/__init__.py and like to close the issue. If there are problems in 2to3 please open new ticket dedicated to 2to3 tool only, not related to tkinter. -- com

[issue16583] Tkinter nested SystemExit

2012-12-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset b742bbf6b07f by Andrew Svetlov in branch '3.2': Issue #16583: Prevent nesting SystemExit in tkinter.CallWrapper http://hg.python.org/cpython/rev/b742bbf6b07f New changeset 96b6e6522a1d by Andrew Svetlov in branch '3.3': Merge issue #16583: Prevent n

[issue14099] ZipFile.open() should not reopen the underlying file

2012-12-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This issue looks as a duplicate or a superseder of issue10631. See also issue16569. seek() for every read should significantly decrease performance. It may be worth to prohibit the simultaneous reading of different files from the archive. In any case the ch

[issue10631] ZipFile and current directory change

2012-12-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch from issue14099 is intended to fix this issue. -- nosy: +alanmcintyre ___ Python tracker ___ ___

[issue16582] Tkinter calls SystemExit with string

2012-12-03 Thread Andrew Svetlov
Andrew Svetlov added the comment: Thanks for report. The patch is really trivial, but I don't sure if it can be applied to released python versions. -- keywords: +patch nosy: +asvetlov Added file: http://bugs.python.org/file28198/issue16582.diff ___

[issue16416] Mac OS X: don't use the locale encoding but UTF-8 to encode and decode filenames

2012-12-03 Thread STINNER Victor
STINNER Victor added the comment: The issue should now be fixed in Python 3.2, 3.3 and 3.4. -- resolution: -> fixed status: open -> closed versions: +Python 3.2, Python 3.3 ___ Python tracker _

[issue16416] Mac OS X: don't use the locale encoding but UTF-8 to encode and decode filenames

2012-12-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset af6fd3ca6de9 by Victor Stinner in branch '3.2': Issue #16416: Fix compilation error http://hg.python.org/cpython/rev/af6fd3ca6de9 -- ___ Python tracker ___

[issue16597] file descriptor not being closed with context manager on IOError when device is full

2012-12-03 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file28197/bufferedio_finally_close.patch ___ Python tracker ___ ___ Python-bu

[issue16597] file descriptor not being closed with context manager on IOError when device is full

2012-12-03 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file28196/bufferedio_finally_close.patch ___ Python tracker ___ ___ Python-

[issue16597] file descriptor not being closed with context manager on IOError when device is full

2012-12-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch which calls close() on underlying stream even if flush() raises an exception. I am not sure that I correctly set a context exception. There is no other examples in the code. -- keywords: +patch nosy: +benjamin.peterson, pitrou, stutz

[issue16600] small py3k issue in rlcompleter

2012-12-03 Thread Robert McGibbon
Robert McGibbon added the comment: nevermind. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue16600] small py3k issue in rlcompleter

2012-12-03 Thread Robert McGibbon
Changes by Robert McGibbon : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue16600] small py3k issue in rlcompleter

2012-12-03 Thread Robert McGibbon
Changes by Robert McGibbon : -- title: small py3k bug in rlcompleter -> small py3k issue in rlcompleter ___ Python tracker ___ ___ Pyt

[issue16587] Py_Initialize breaks wprintf on Windows

2012-12-03 Thread STINNER Victor
STINNER Victor added the comment: > _setmode(self->fd, O_BINARY) change was done in Python 3.2: see the issue > #10841 The main reason was to be able to read binary file from sys.stdin using the CGI module: see the issue #4953. In _O_TEXT mode, 0x0A byte is replaced with 0x0A 0x0D (or the oppos

[issue16416] Mac OS X: don't use the locale encoding but UTF-8 to encode and decode filenames

2012-12-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset c838c9b117f1 by Victor Stinner in branch '3.2': Issue #16416: On Mac OS X, operating system data are now always http://hg.python.org/cpython/rev/c838c9b117f1 New changeset 26c4748351cb by Victor Stinner in branch '3.3': (Merge 3.2) Issue #16416: On

[issue16579] .pyw disturb multiprocessing behavior

2012-12-03 Thread Alex stein
Alex stein added the comment: It seems like you’re right. I redirect the sys.stdout and the problem is solved. Thank you for your help. -- status: open -> closed ___ Python tracker __

[issue16599] unittest: Access test result from tearDown

2012-12-03 Thread Daniel Urban
Changes by Daniel Urban : -- stage: -> needs patch type: -> enhancement versions: +Python 3.4 -Python 2.7, Python 3.1, Python 3.2, Python 3.3 ___ Python tracker ___ ___

[issue16600] small py3k bug in rlcompleter

2012-12-03 Thread Robert McGibbon
Changes by Robert McGibbon : -- title: rlcompleter -> small py3k bug in rlcompleter ___ Python tracker ___ ___ Python-bugs-list mailin

[issue16600] rlcompleter

2012-12-03 Thread Robert McGibbon
New submission from Robert McGibbon: I'm not really sure how what the format for filing bugs with python is, so I'm sorry in advance if I've done something wrong. There is a very small py3k bug in the readline completer (rlcompleter.py). Specifically, if you look at line 105 (http://hg.python

[issue16599] unittest: Access test result from tearDown

2012-12-03 Thread anatoly techtonik
New submission from anatoly techtonik: A common usage pattern is to prevent clean up in tearDown() if the test failed. However, it requires a hack: http://stackoverflow.com/questions/4414234/getting-pythons-unittest-results-in-a-teardown-method. Would be nice to have an officially documented f

[issue16597] file descriptor not being closed with context manager on IOError when device is full

2012-12-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The bug only in C implementation. >>> import _pyio >>> f = _pyio.open("/dev/full", "wb") >>> f.write(b"Write to full device") 20 >>> f.close() Traceback (most recent call last): File "", line 1, in File "/home/serhiy/py/cpython/Lib/_pyio.py", line 732, in

[issue16597] file descriptor not being closed with context manager on IOError when device is full

2012-12-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: >>> f = open("/dev/full", "wb", buffering=0) >>> f.write(b"Write to full device") Traceback (most recent call last): File "", line 1, in OSError: [Errno 28] No space left on device >>> f.close() >>> f.closed True >>> f = open("/dev/full", "wb") >>> f.write(b

[issue11797] 2to3 does not correct "reload"

2012-12-03 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue16568] allow constructors to be documented separately from class

2012-12-03 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue2897] include structmember.h in Python.h

2012-12-03 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue4805] Make python code compilable with a C++ compiler

2012-12-03 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue10712] 2to3 fixer for deprecated unittest method names

2012-12-03 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue16595] Add resource.prlimit

2012-12-03 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue11344] Add os.path.splitpath(path) function

2012-12-03 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri