[issue24510] Make _PyCoro_GetAwaitableIter a public API

2015-06-26 Thread Nick Coghlan
Nick Coghlan added the comment: +1 for deferring to 3.6 (version field adjusted accordingly) One nice aspect of marking private APIs by convention rather than having them enforced by the compiler is that the folks that *really* need them can ignore our recommendation and accept the fact they

[issue24511] Add methods for async protocols

2015-06-26 Thread Nick Coghlan
Nick Coghlan added the comment: As per the discussion on issue 24510, we can wait until 3.6 to decide the details of a public C level API for the PEP 492 machinery. -- versions: -Python 3.5 ___ Python tracker rep...@bugs.python.org

[issue2771] Test issue

2015-06-26 Thread testbpo
Changes by testbpo g5881...@trbvm.com: Added file: http://bugs.python.org/file39819/issue18958-2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2771 ___

[issue24513] decimal test version mismatch

2015-06-26 Thread Stefan Krah
Stefan Krah added the comment: I'm saying that decimal has already been tested against the most recent test cases. For (non-technical) reasons that I don't want to go into right now, I'd prefer to postpone the update though. -- resolution: - later status: open - closed

[issue24513] decimal test version mismatch

2015-06-26 Thread Rusi
Rusi added the comment: On Fri, Jun 26, 2015 at 4:29 PM, Stefan Krah rep...@bugs.python.org wrote: Stefan Krah added the comment: For libmpdec (and thus _decimal) I've always used the latest version of dectest.zip. Upgrading decimaltestdata/* will not make any difference. Not sure Stefan

[issue20387] tokenize/untokenize roundtrip fails with tabs

2015-06-26 Thread Dingyuan Wang
Dingyuan Wang added the comment: I mean the patch only restores tabs in indentation. The reports above should be corrected. Tabs between tokens and other race conditions can't be restored exactly providing the token stream. This won't affect the syntax. I wonder if it's also a bug or a

[issue2771] Test issue

2015-06-26 Thread testbpo
Changes by testbpo g5881...@trbvm.com: Added file: http://bugs.python.org/file39817/testtestpatch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2771 ___

[issue19176] DeprecationWarning for doctype() method when subclassing _elementtree.XMLParser

2015-06-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- versions: +Python 2.7, Python 3.4, Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19176 ___

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2015-06-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch addresses Martin's comments. -- versions: +Python 3.6 Added file: http://bugs.python.org/file39821/UserDict_self_and_dict_keywords_3.patch ___ Python tracker rep...@bugs.python.org

[issue19176] DeprecationWarning for doctype() method when subclassing _elementtree.XMLParser

2015-06-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch that also fixes other issues with doctype. 1) Direct call of doctype() issues a warning. 2) Parser's doctype() is not called if target's doctype() is called. -- Added file: http://bugs.python.org/file39820/inherit-doctype.v3.patch

[issue24485] Function source inspection fails on closures

2015-06-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: The test suite must lack, and therefore needs, a simple testcase as in test.py. In 3.4 and 3.5, getsource() joins the list of lines returned by getsourcelines(). In both versions, getsourcelines uses findsource(), which seems to be unchanged. In 3.5, the

[issue21217] inspect.getsourcelines finds wrong lines when lambda used argument to decorator

2015-06-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: I strongly suspect that ac86e5b2d45b is the cause of the regression reported in #24485. def outer(): def inner(): inner1 from inspect import getsource print(getsource(outer)) omits the body of inner. Ditto if outer is a method. All is okay if

[issue24515] docstring of isinstance

2015-06-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree that the tuple explanation if ok. But Return whether an object is an instance of a class or of a subclass thereof. (3.5) seems wrong. I believe 'subclass' should be 'superclass'. class C: pass class Csub(C): pass isinstance(C(), Csub) False

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-06-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: I view having a string __name__ attribute as part of quacking like a module (or class or function). Hence pseudonames like 'lambda' (lambda expression) or pyshell#n (the module name for interactive input, where n is the line number). Is there a good reason

[issue24498] Should ptags and eptags be removed from repo?

2015-06-26 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- components: +Demos and Tools stage: - needs patch title: Shoudl ptags and eptags be removed from repo? - Should ptags and eptags be removed from repo? type: - enhancement versions: +Python 3.6 ___

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-06-26 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24492 ___ ___ Python-bugs-list

[issue20281] time.strftime %z format specifier is the same as %Z

2015-06-26 Thread R. David Murray
R. David Murray added the comment: Because there's a different issue for making strftime system independent, issue 3173. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20281 ___

[issue24485] Function source inspection fails on closures

2015-06-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: I verified (Win7, but should be irrelevant) that test.py works on 2.7.10 and 3.4.3. The failure in 3.5.0b2 is omitting the body of inner. Add another line to inner and both are omitted, so 'body' seems correct Add another line to outer, and nothing is

[issue24517] %z does not work in time.strftime()

2015-06-26 Thread R. David Murray
R. David Murray added the comment: Yes, but the Microsoft C runtime doesn't use that interface, and it is currently the C runtime that we use to implement strftime. This could change, but that's an enhancement. See issue 3173 for example. -- ___

[issue24517] %z does not work in time.strftime()

2015-06-26 Thread dendory
New submission from dendory: Using `%z` gives the same result as using `%Z` in `time.strftime()`: Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. import time

[issue24517] %z does not work in time.strftime()

2015-06-26 Thread R. David Murray
R. David Murray added the comment: That's a platform peculiarity. See issue 20281. -- nosy: +r.david.murray resolution: - duplicate stage: - resolved status: open - closed superseder: - time.strftime %z format specifier is the same as %Z ___

[issue24517] %z does not work in time.strftime()

2015-06-26 Thread dendory
dendory added the comment: Uh? But that's completely besides the point. Windows provides timezone offset information in a different way than Linux does (through the Registry) but it's still available. It's trivial to do in .NET for example:

[issue20281] time.strftime %z format specifier is the same as %Z

2015-06-26 Thread dendory
dendory added the comment: Why is the focus on documentation entries when the real work should be on trying to make this function to work on all platforms? I understand that Windows's implementation of strftime() defines %z and %Z to return the same thing, but timezone information is still

[issue24515] docstring of isinstance

2015-06-26 Thread Luc Saffre
New submission from Luc Saffre: The docstring of built-in function 'isinstance' should explain that if the classinfo is a tuple, the object must be instance of *any* (not *all*) of the class objects. -- assignee: docs@python components: Documentation messages: 245841 nosy: Luc Saffre,

[issue24500] provide context manager to redirect C output

2015-06-26 Thread Zahari Dim
Zahari Dim added the comment: Well, the simple minded example I posted has so many bugs (many of which I don't understand, for example why it destroys the stdout of an interpreter permanently) that I really think this feature is necessary. -- ___

[issue24515] docstring of isinstance

2015-06-26 Thread Steven D'Aprano
Steven D'Aprano added the comment: It already does: The form using a tuple, isinstance(x, (A, B, ...)), is a shortcut for isinstance(x, A) or isinstance(x, B) or ... (etc.). If it were all, it would use and, not or. I don't think any change is needed. Do you have a suggestion for new wording?

[issue24514] tarfile fails to extract archive (handled fine by gnu tar and bsdtar)

2015-06-26 Thread Lars Gustäbel
Lars Gustäbel added the comment: The problem is that the tar archive has empty uid and gid fields, i.e. 7 spaces terminated with a null-byte. I attached a patch that solves the problem. -- keywords: +patch Added file: http://bugs.python.org/file39815/issue24514.diff

[issue24514] tarfile fails to extract archive (handled fine by gnu tar and bsdtar)

2015-06-26 Thread Philippe
Philippe added the comment: lars: you are my hero! you rock. I picture you being able to read through tar binary headers while you sleep. I am in awe. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24514

[issue24514] tarfile fails to extract archive (handled fine by gnu tar and bsdtar)

2015-06-26 Thread Lars Gustäbel
Lars Gustäbel added the comment: You're welcome :-D -- assignee: - lars.gustaebel priority: normal - low stage: - patch review type: - behavior versions: +Python 3.5, Python 3.6 ___ Python tracker rep...@bugs.python.org

[issue24514] tarfile fails to extract archive (handled fine by gnu tar and bsdtar)

2015-06-26 Thread Philippe
Philippe added the comment: I verified that the patch issue24514.diff (adding .rstrip() ) works also on Python 2.7. I verified it also works on Python 3.4 I ran it on 2.7 against a fairly large test suite of tar files without problems. This is a +1 for me. Lars: Do you think you could apply

[issue24516] SSL create_default_socket purpose insufficiently documented

2015-06-26 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24516 ___ ___ Python-bugs-list

[issue21217] inspect.getsourcelines finds wrong lines when lambda used argument to decorator

2015-06-26 Thread Meador Inge
Meador Inge added the comment: I think that the only way we can solve this is to revert the patch for this issue. I agree with this. It seems like doing this analysis at the bytecode level is the wrong approach. Perhaps the syntactical analysis being used before should be beefed up to

[issue24515] docstring of isinstance

2015-06-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: Right. Close this unless something else is offered. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24515 ___

[issue24515] docstring of isinstance

2015-06-26 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Fri, Jun 26, 2015 at 09:20:18PM +, Terry J. Reedy wrote: I agree that the tuple explanation if ok. But Return whether an object is an instance of a class or of a subclass thereof. (3.5) seems wrong. I believe 'subclass' should be 'superclass'.

[issue21217] inspect.getsourcelines finds wrong lines when lambda used argument to decorator

2015-06-26 Thread Yury Selivanov
Yury Selivanov added the comment: Here's an update on #24485 regression. Looks like getsource() is now using code objects instead of tokenizer to determine blocks first/last lines. The problem with this particular case is that inner function's code object is completely independent from

[issue24485] Function source inspection fails on closures

2015-06-26 Thread Yury Selivanov
Yury Selivanov added the comment: Thanks, Terry. I posted some findings to #21217. -- nosy: +ncoghlan, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24485 ___

[issue24518] json.dumps should accept key function for ``sort_keys``

2015-06-26 Thread Catherine Devlin
New submission from Catherine Devlin: Right now, json.dumps can be called with True or False, but it would be easy to also support accepting a key function, which then could be used to control the order of keys arbitrarily in the serialized JSON output. -- components: Library (Lib)

[issue24514] tarfile fails to extract archive (handled fine by gnu tar and bsdtar)

2015-06-26 Thread Philippe
Philippe added the comment: Note: the traceback above are from calling taropen on the gunzipped tar.gz The error are similar but a tar less informative when using the tgz and open. -- ___ Python tracker rep...@bugs.python.org

[issue24456] audioop.adpcm2lin Buffer Over-read

2015-06-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: - needs patch versions: +Python 3.4, Python 3.5, Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24456 ___

[issue24457] audioop.lin2adpcm Buffer Over-read

2015-06-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: - needs patch versions: +Python 3.4, Python 3.5, Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24457 ___

[issue24514] tarfile fails to extract archive (handled fine by gnu tar and bsdtar)

2015-06-26 Thread Philippe
New submission from Philippe: The extraction fails when calling tarfile.open using this archive: http://archive.apache.org/dist/commons/logging/source/commons-logging-1.1.2-src.tar.gz After some investigation, the file can be extracted with gnu tar and bsdtar and the gzip compression is not

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2015-06-26 Thread Yury Selivanov
Yury Selivanov added the comment: Left some feedback in the code review. -- nosy: +yselivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22609 ___

[issue24449] Please add async write method to asyncio.StreamWriter

2015-06-26 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24449 ___ ___ Python-bugs-list

[issue24516] SSL create_default_socket purpose insufficiently documented

2015-06-26 Thread Petr Messner
New submission from Petr Messner: Please, is it possible to put more information about the purpose parameter to the documentation of ssl.create_default_context()? It's not obvious that SERVER_AUTH should be used for client sockets and not server sockets. It took me a while to discover this,

[issue24513] decimal test version mismatch

2015-06-26 Thread Stefan Krah
Stefan Krah added the comment: For libmpdec (and thus _decimal) I've always used the latest version of dectest.zip. Upgrading decimaltestdata/* will not make any difference. -- nosy: +skrah ___ Python tracker rep...@bugs.python.org

[issue24516] SSL create_default_socket purpose insufficiently documented

2015-06-26 Thread Christian Heimes
Christian Heimes added the comment: Python uses serverAuth and clientAuth in the exact same meaning as EKU (extended key usage). In order to create X.509 cert for a web server, it should have EKU SSL/TLS Web Server Authentication. On the other hand a client must validate the cert for a

[issue24514] tarfile fails to extract archive (handled fine by gnu tar and bsdtar)

2015-06-26 Thread Lars Gustäbel
Lars Gustäbel added the comment: Yes, Python 2.7 still gets bugfixes. However, there's still some work to do on the patch (maybe clean the code, write a test, add a NEWS entry). -- ___ Python tracker rep...@bugs.python.org

[issue24456] audioop.adpcm2lin Buffer Over-read

2015-06-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch that checks the state and raises ValueError if integer values out of range. -- keywords: +patch Added file: http://bugs.python.org/file39816/audioop_adpcm_range_check.patch ___ Python tracker

[issue24457] audioop.lin2adpcm Buffer Over-read

2015-06-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch for issue24456 fixes this issue. -- resolution: - duplicate stage: needs patch - resolved status: open - closed superseder: - audioop.adpcm2lin Buffer Over-read ___ Python tracker rep...@bugs.python.org