[issue22215] "embedded NUL character" exceptions

2014-08-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: BDFL have approved the idea (http://permalink.gmane.org/gmane.comp.python.devel/149000). Could anyone please make the review of concrete patch? -- ___ Python tracker __

[issue22215] "embedded NUL character" exceptions

2014-08-19 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22090] Decimal and float formatting treat '%' differently for infinities and nans.

2014-08-19 Thread Mark Dickinson
Mark Dickinson added the comment: The decimal.py part LGTM. (The rest looks good, too, but I haven't tested it.) This seems like one of those bugs that probably isn't worth backporting to 3.4, but given the projected longevity of 2.7 it might be worth applying there. --

[issue21163] asyncio doesn't warn if a task is destroyed during its execution

2014-08-19 Thread STINNER Victor
STINNER Victor added the comment: I don't understand how keeping a strong refrence would fix anything. You only provided one example (async-gc-bug.py) which uses Queue objects but keep weak references to them. Keeping strong references to tasks is not the right fix. You must keep strong reference

[issue22227] Simplify tarfile iterator

2014-08-19 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: TarFile iteration can be simplified by using a generator instead of iterator class. Attached patch get rid of the TarIter class and decrease sources size by 16 lines. -- components: Library (Lib) files: tarfile_tariter.diff keywords: patch messages

[issue21163] asyncio doesn't warn if a task is destroyed during its execution

2014-08-19 Thread Marco Paolini
Marco Paolini added the comment: > I don't understand how keeping a strong refrence would fix anything. You > only provided one example (async-gc-bug.py) which uses Queue objects but > keep weak references to them. Keeping strong references to tasks is not the > right fix. You must keep strong re

[issue22228] Adapt bash readline operate-and-get-next function

2014-08-19 Thread Lele Gaifax
New submission from Lele Gaifax: Bash implements an handy extension to the history/readline library called "operate-and-get-next" bound by default to Ctrl-O that lets you repeat an arbitrary sequence of input lines possibly editing some of them. This patch adapts the extension to the Python re

[issue22208] tarfile can't add in memory files (reopened)

2014-08-19 Thread Lars Gustäbel
Lars Gustäbel added the comment: tarfile needs to know the size of a file object beforehand because the tar header is written first followed by the file object's data. If the file object is not based on a real file descriptor, tarfile cannot simply use os.fstat() but the user has to pass the s

[issue1742205] ZipFile.writestr writes incorrect extended local headers

2014-08-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For now zip -T doesn't complain. -- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka ___ Python tracker ___ __

[issue15795] Zipfile.extractall does not preserve file permissions

2014-08-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The TarFile.extract() method has the set_attrs parameter which controls similar behavior but is less flexible. It would be good to unify zipfile and tarfile abilities. set_attrs also controls setting file owner and time. When we restore unsafe uid/gid/sticky

[issue15125] argparse: positional arguments containing - in name not handled well

2014-08-19 Thread Keith Hughitt
Keith Hughitt added the comment: Any progress on this issue? Still persists in Python 3.4.1. -- nosy: +khughitt ___ Python tracker ___ ___

[issue1757072] Zipfile robustness

2014-08-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Original issue was fixed in cc3255a707c7. Issue reported in msg73317 was fixed in issue14315. Is there something left about this issue? -- nosy: +serhiy.storchaka status: open -> pending ___ Python tracker

[issue20042] Python Launcher, Windows, fails on scripts w/ non-latin names

2014-08-19 Thread eryksun
eryksun added the comment: The problem is skip_whitespace mistakenly calls isspace instead of iswspace. http://hg.python.org/cpython/file/c0e311e010fc/PC/launcher.c#l48 isspace has undefined behavior when the argument is "not EOF or in the range of 0 through 0xFF": http://msdn.microsoft.com/

[issue22219] python -mzipfile fails to add empty folders to created zip

2014-08-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think zipfile should add an entry for directories as zip tool does. Here is a patch. In additional it fixes zipfile -c for some corner cases (when arguments end with /, . or .. component). -- stage: needs patch -> patch review

[issue20291] Argument Clinic should understand *args and **kwargs parameters

2014-08-19 Thread Nick Coghlan
Nick Coghlan added the comment: Yes, I agree we should follow the Python level semantics, and only capture the excess positional arguments. For the record, the four builtins I flagged as needing this in order to add introspection information: __build_class__ - 2 positional only args, arbitrary

[issue15696] Correct __sizeof__ support for mmap

2014-08-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4aba144b752d by Serhiy Storchaka in branch '2.7': Issue #15696: Add a __sizeof__ implementation for mmap objects on Windows. http://hg.python.org/cpython/rev/4aba144b752d New changeset ca4a22256bf8 by Serhiy Storchaka in branch '3.4': Issue #15696:

[issue15513] Correct __sizeof__ support for pickle

2014-08-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Required patch is already committed. Here is updated patch. -- stage: -> patch review versions: +Python 3.4, Python 3.5 -Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file36415/pickle_sizeof-3.4.patch _

[issue22229] wsgiref doesn't appear to ever set REMOTE_HOST in the environ

2014-08-19 Thread Alex Gaynor
New submission from Alex Gaynor: Based on a reading of the code: https://github.com/python/cpython/blob/master/Lib/wsgiref/simple_server.py#L88-L90 is where REMOTE_HOST is set. However, `address_string` always returns `self.client_address[0]` (https://github.com/python/cpython/blob/master/Lib

[issue18595] zipfile: symlinks etc.

2014-08-19 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- versions: +Python 3.5 -Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue22230] 'python -mzipfile -c' does not zip empty directories

2014-08-19 Thread Ryan Wilson
New submission from Ryan Wilson: Running command: $ mkdir foo; python -mzipfile -c foo.zip foo; python -mzipfile -e foo.zip dest ls: cannot access dest: No such file or directory This is because 'foo.zip' is empty since running 'python -mzipfile -c foo.zip foo' does not zip empty directories.

[issue22230] 'python -mzipfile -c' does not zip empty directories

2014-08-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a duplicate of issue22219. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> python -mzipfile fails to add empty folders to created zip ___ Pytho

[issue22228] Adapt bash readline operate-and-get-next function

2014-08-19 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: +BreamoreBoy, Rosuav ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue15696] Correct __sizeof__ support for mmap

2014-08-19 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.5 -Python 3.3 ___ Python tracker ___ ___

[issue19884] Importing readline produces erroneous output

2014-08-19 Thread Geoffrey Spear
Changes by Geoffrey Spear : -- nosy: +geoffreyspear ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue22208] tarfile can't add in memory files (reopened)

2014-08-19 Thread Mark Grandi
Mark Grandi added the comment: I was just thinking that if os.stat fails, then you try getting the size by just calling len() on it, as stuff like io.BytesIO and io.StringIO will respond to that. But if we are not changing the behavior of the API, at the very least there needs to be documenta

[issue21389] The repr of BoundMethod objects sometimes incorrectly identifies the bound function

2014-08-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: That seems reasonable. Can you please write tests for the new behavior, though, and also fix test_defaultdict? -- ___ Python tracker ___ ___

[issue22208] tarfile can't add in memory files (reopened)

2014-08-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: The example given by Lars shows that it's not that easy to come up with the right code. Why not make it easier? -- nosy: +pitrou ___ Python tracker ___

[issue20328] mailbox: add method to delete mailbox

2014-08-19 Thread Jonathan Dowland
Jonathan Dowland added the comment: Hi David, whilst writing my patch I've tried to keep an open mind as to users of the methods, but I do have my own purpose in the back of my mind, and that's an archive mail tool which I would like to delete mail folders if, after performing an archive opera

[issue19628] maxlevels -1 on compileall for unlimited recursion

2014-08-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: Why can't we just reuse the "-l" option? -- nosy: +benjamin.peterson ___ Python tracker ___ ___ P

[issue19628] maxlevels -1 on compileall for unlimited recursion

2014-08-19 Thread Claudiu Popa
Claudiu Popa added the comment: Backward compatibility reasons, I guess. compileall -l completely deactivates the recursion, so using -l for controlling the number of levels seems to overwrite its original meaning. -- ___ Python tracker

[issue22179] Idle. Search dialog found text not highlited on Windows

2014-08-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: As it is now, show_hit should have a comment something like this: # On Windows, selection highight is visible while the dialog is open. # A 'hit' tag is used while the dialog is open (see #22179). # The 'hit' tag should be deleted when this dialog is closed. # T

[issue19628] maxlevels -1 on compileall for unlimited recursion

2014-08-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset a62368778d6c by Benjamin Peterson in branch 'default': allow recursion depth to be specified (closes #19628) http://hg.python.org/cpython/rev/a62368778d6c -- nosy: +python-dev resolution: -> fixed stage: commit review -> resolved status: op

[issue22211] Remove VMS specific code in expat.h & xmlrole.h

2014-08-19 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +christian.heimes ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue20328] mailbox: add method to delete mailbox

2014-08-19 Thread R. David Murray
R. David Murray added the comment: Well, if you can delete subfolders, then you aren't deleting the main folder, either (unless it is empty?). So isn't this really a 'delete_messages' method? In which case, how does it differ from the 'clear' method? Only in that it deletes the folder if it

[issue7283] test_site failure when .local/lib/pythonX.Y/site-packages hasn't been created yet

2014-08-19 Thread Ned Deily
Ned Deily added the comment: Closing, since this problem apparently no longer occurs -- resolution: -> out of date stage: needs patch -> resolved status: open -> closed ___ Python tracker __

[issue12006] strptime should implement %V or %u directive from libc

2014-08-19 Thread Alex Willmer
Changes by Alex Willmer : Added file: http://bugs.python.org/file36417/12006_3.5_complete.patch ___ Python tracker ___ ___ Python-bugs-list ma

[issue12006] strptime should implement %V or %u directive from libc

2014-08-19 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: +BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue21308] PEP 466: backport ssl changes

2014-08-19 Thread Alex Gaynor
Alex Gaynor added the comment: New patch additionally backports the Tools/ssl/ directory from Python3, which has two utilities for generating some of the code used. Thanks to Benjamin for catching this. -- Added file: http://bugs.python.org/file36418/ssl-backport.diff

[issue21308] PEP 466: backport ssl changes

2014-08-19 Thread Alex Gaynor
Alex Gaynor added the comment: Last version had some stray stuff due to the fact that I don't know how to use version control. New version should resolve that. -- Added file: http://bugs.python.org/file36419/ssl-backport.diff ___ Python tracker

[issue8797] urllib2 basicauth broken in 2.6.5: RuntimeError: maximum recursion depth exceeded in cmp

2014-08-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset c1edc4e43eb1 by Senthil Kumaran in branch '2.7': Fix Issue #8797: Raise HTTPError on failed Basic Authentication immediately. Initial patch by Sam Bull. http://hg.python.org/cpython/rev/c1edc4e43eb1 New changeset 30e8a8f22a2a by Senthil Kumaran in

[issue21308] PEP 466: backport ssl changes

2014-08-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: Running test_ssl gives this: % ./python Lib/test/regrtest.py test_ssl test_ssl Exception in thread Thread-104: Traceback (most recent call last): File "/home/benjamin/dev/python/2.7/Lib/threading.py", line 810, in __bootstrap_inner self.run() Fil

[issue21308] PEP 466: backport ssl changes

2014-08-19 Thread Alex Gaynor
Alex Gaynor added the comment: On what platform? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue21308] PEP 466: backport ssl changes

2014-08-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: Gentoo Linux. Openssl 1.0.1i On Tue, Aug 19, 2014, at 19:29, Alex Gaynor wrote: > > Alex Gaynor added the comment: > > On what platform? > > -- > > ___ > Python tracker > > _

[issue22231] httplib: unicode url will cause an ascii codec error when combined with a utf-8 string header

2014-08-19 Thread Bob Chen
New submission from Bob Chen: Try to run these two script below, and you will understand what I'm talking about. If you specified an url and it happened to be an unicode string(which is quite common in python because python processes string as unicode and you could possibly get it from somewh

[issue21308] PEP 466: backport ssl changes

2014-08-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: In load_cert_chain, you may find it convenient to not Py_DECREF and Py_CLEAR keyfile_bytes and certfile_bytes, which aren't PyObject *. -- ___ Python tracker __

[issue21389] The repr of BoundMethod objects sometimes incorrectly identifies the bound function

2014-08-19 Thread Steven Barker
Steven Barker added the comment: OK, I've written some tests of the new bound method repr functionality, which I'm attaching as a patch against the current tip. I test the basic repr output, all the cases the old code got wrong (inherited methods, overridden methods, methods called via super,