[issue26039] More flexibility in zipfile interface

2016-01-29 Thread Thomas Kluyver
Thomas Kluyver added the comment: Here's a new version of the zf.open() patch following Martin's review (thanks Martin!). I agree that it feels a bit awkward having two completely different actions for zf.open(), but it is a familiar interface, and since the mode parameter is already there,

[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2016-01-29 Thread 山本泰宇
山本泰宇 added the comment: > I may workaround the bug during Python finalization if more users report this > issue. +1 in my project: https://github.com/cybozu/passh/issues/1 Anyway, I'd like to express my gratitude to asyncio. -- nosy: +山本泰宇 ___

[issue12912] xmlrpclib.__version__ not bumped with updates

2016-01-29 Thread Berker Peksag
Berker Peksag added the comment: xmlrpc.client.__version__ is used by Transport.user_agent and it has been changed to use sys.version[:3] in 197d703fb23e. It's too late for 2.7 so I think this can be closed now. Thanks for the report, Rob! -- nosy: +berker.peksag resolution: -> out

[issue26039] More flexibility in zipfile interface

2016-01-29 Thread Thomas Kluyver
Changes by Thomas Kluyver : Added file: http://bugs.python.org/file41753/zipinfo-from-file3.patch ___ Python tracker ___

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2016-01-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- priority: normal -> high stage: -> patch review ___ Python tracker ___

[issue26237] UnboundLocalError error while handling exception

2016-01-29 Thread Марк Коренберг
New submission from Марк Коренберг: This works right in Python 2.7, but fails in python3: UnboundLocalError: local variable 'e' referenced before assignment def test(): try: raise Exception('a') except Exception as e: pass else: return print(e) test()

[issue26237] UnboundLocalError error while handling exception

2016-01-29 Thread STINNER Victor
STINNER Victor added the comment: Yes, it's a deliberate change in the Python language. You have to copy "e" to a different variable: err = None try: ... except Exception as exc: err = exc print(err) -- nosy: +haypo resolution: -> not a bug status: open -> closed

[issue26238] httplib use wrong hostname in https request with SNI support

2016-01-29 Thread lirenke
New submission from lirenke: httplib give openssl SNI extension message like IP:PORT string. the apache server would return 400 code if SNI/request ServerName mismatch. In class HTTPSConnection, we hope call self._get_hostport() before give the value to server_hostname. === if

[issue26173] test_ssl.bad_cert_test() exception handling

2016-01-29 Thread Martin Panter
Martin Panter added the comment: I was mistaken about what test_wrong_cert() is doing. It tells the _server_ to check the _client’s_ certificate (the opposite way around from HTTPS for example). Now I understand this, I see it is fine for the client to raise ECONNRESET if the server rejected

[issue26168] Py_BuildValue may leak 'N' arguments on PyTuple_New failure

2016-01-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Current code already decref obj if creating previous argument is failed. But a leak if PyTuple_New() fails is possible. Proposed patch fixes this leak and adds a test for the case when creating previous argument is failed. Testing the failure of

[issue26125] Incorrect error message in the module asyncio.selector_events.

2016-01-29 Thread Berker Peksag
Berker Peksag added the comment: https://github.com/python/asyncio/pull/313 has been merged. Do we need to commit this patch to the CPython repo or will it be merged with the next sync? (e.g. f4fe55dd5659) -- nosy: +berker.peksag ___ Python tracker

[issue26227] Windows: socket.gethostbyaddr(name) fails for non-ASCII hostname

2016-01-29 Thread Emanuel Barry
Emanuel Barry added the comment: For future reference, Victor's patch does fix it, I was checking the wrong thing when testing. -- ___ Python tracker

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2016-01-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: One solution is to skip tests caused deep recursion. The better solution would be to fix import machinery to not produce empty modules. -- keywords: +patch Added file: http://bugs.python.org/file41748/issue25698_skip_tests.patch

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2016-01-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch that makes import machinery to not left empty module in case of recursion error. I prefer this solution. -- Added file: http://bugs.python.org/file41750/issue25698_fix_remove_module.patch ___

[issue26039] More flexibility in zipfile interface

2016-01-29 Thread Thomas Kluyver
Thomas Kluyver added the comment: Thanks Serhiy for review comments. -- Added file: http://bugs.python.org/file41754/zipinfo-from-file4.patch ___ Python tracker

[issue26227] Windows: socket.gethostbyaddr(name) fails for non-ASCII hostname

2016-01-29 Thread STINNER Victor
STINNER Victor added the comment: He he, no problem. Thanks again for the bug report. I'm surprised that nobody reported it before. -- ___ Python tracker

[issue26229] Make number serialization ES6/V8 compatible

2016-01-29 Thread Eric V. Smith
Eric V. Smith added the comment: Do you have a pointer to the spec which requires -0 vs. -3.333e+20, for example? -- nosy: +eric.smith ___ Python tracker

[issue26125] Incorrect error message in the module asyncio.selector_events.

2016-01-29 Thread Guido van Rossum
Guido van Rossum added the comment: Usually Yury or Victor takes care of this sooner or later. If you want to you can keep this open as a release blocker with that as a task. -- ___ Python tracker

[issue1475692] replacing obj.__dict__ with a subclass of dict

2016-01-29 Thread Torsten Landschoff
Torsten Landschoff added the comment: I just bumped into this issue because I was shown by a colleague that my implementation of immutable objects (by replacing __dict__ with an ImmutableDict that inherits from dict and blocks write accesses) is ineffective - ouch! I'd expect that Python

[issue26155] 3.5.1 installer issue on Win 7 32 bit

2016-01-29 Thread Steve Dower
Steve Dower added the comment: Looks like the log files were attached just fine. >From a first glance, the logs don't show anything being installed into your >documents folder. Could you list the files you are seeing, where they are and where you believe they should be? --

[issue23601] use small object allocator for dict key storage

2016-01-29 Thread Tim Peters
Tim Peters added the comment: +1 from me. Julian, you have the patience of a saint ;-) -- ___ Python tracker ___

[issue1475692] replacing obj.__dict__ with a subclass of dict

2016-01-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Python uses concrete class API (PyDict_GetItem and like) for resolving attributes. Using general mapping API would slow down attribute lookup in common case. This is performance critical part of Python and we should be very careful changing it. On the

[issue26180] multiprocessing.util._afterfork_registry leak in threaded environment

2016-01-29 Thread Nir Soffer
Changes by Nir Soffer : -- nosy: +nirs ___ Python tracker ___ ___ Python-bugs-list mailing

[issue26239] distutils link-objects is not normalized

2016-01-29 Thread Jeremy Fergason
New submission from Jeremy Fergason: When giving setup.cfg a link-objects argument build fails with an error message about cannot concatenate string with list. Need to add the following line to: Lib/distutils/command/build_ext.py self.ensure_string_list('link_objects') See patch here:

[issue26168] Py_BuildValue may leak 'N' arguments on PyTuple_New failure

2016-01-29 Thread squidevil
squidevil added the comment: Martin Panter: You're right. The DECREF on v when itemfailed will decref the N object and prevent the leak. My original analysis was wrong on that count. You're right, do_mklist and do_mkdict (in 2.7.11 at least) have similar problems, bailing after list or dict

[issue26229] Make number serialization ES6/V8 compatible

2016-01-29 Thread Mark Dickinson
Mark Dickinson added the comment: Eric: I suspect he's talking about section 7.1.12.1 of the 6th edition of ECMA-262; a PDF can be found here: http://www.ecma-international.org/ecma-262/6.0/ECMA-262.pdf. Clause 6 applies to this particular example: """ If k <= n <= 21, return the String

[issue25934] ICC compiler: ICC treats denormal floating point numbers as 0.0

2016-01-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 296fb7c10a7d by Zachary Ware in branch '2.7': Issue #25934: Default to /fp:strict for ICC builds https://hg.python.org/cpython/rev/296fb7c10a7d New changeset 747b415e96c4 by Zachary Ware in branch '3.5': Issue #25934: Default to /fp:strict for ICC

[issue26234] The typing module includes 're' and 'io' in __all__

2016-01-29 Thread Martin Panter
Martin Panter added the comment: The __alldoc__ is an interesting idea to think about. Anyway, I haven’t actually tried the typing module yet, so I will let you decide the best way forward. -- ___ Python tracker

[issue26195] Windows frozen .exe multiprocessing.Queue access is denied exception

2016-01-29 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +jnoller, sbt ___ Python tracker ___ ___

[issue26216] run runtktests.py error when test tkinter

2016-01-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is rather import machinery issue. The simple reproducer: $ ./python -c "import importlib; importlib.import_module('.bar', 'foo')" Traceback (most recent call last): File "", line 1, in File "/home/serhiy/py/cpython/Lib/importlib/__init__.py", line

[issue26235] argparse docs: Positional * argument in mutually exclusive group requires a default parameter

2016-01-29 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +bethard ___ Python tracker ___ ___ Python-bugs-list

[issue26209] TypeError in smtpd module with string arguments

2016-01-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am guessing that 25 is the default port. Autoconversion of 'host' to ('host', 25) would be a new feature ('enhancement') that would have to wait for the next Python version (3.6 or later). Is there any precedent for this in any other module? Does 2.7 act

[issue25924] investigate if getaddrinfo(3) on OSX is thread-safe

2016-01-29 Thread A. Jesse Jiryu Davis
A. Jesse Jiryu Davis added the comment: I've created a Mac OS 10.4 virtual machine and reproduced the getaddrinfo concurrency bug there using the attached h_resolv.c. The man page on that OS version indeed includes the "not thread-safe" warning. The same test passes on my Mac OS 10.10 system.

[issue26225] New misleading wording in execution model documenation

2016-01-29 Thread Martin Panter
Martin Panter added the comment: Calling exec() with only one argument is equivalent to exec(..., globals(), locals()). It does not create a new scope for names. So an equivalent of your three-level example is more like >>> i = 'global' >>> def f(): ... i = 'nonlocal' ... class_locals

[issue23601] use small object allocator for dict key storage

2016-01-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: If there are no objects, I'll apply the patch tomorrow. -- assignee: -> rhettinger versions: +Python 3.6 -Python 3.5 ___ Python tracker

[issue26218] Set PrependPath default to true

2016-01-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: Are you are referring to the option in the Windows installer to prepend the currently-being-installed Python directory (and the scripts directory) to the system PATH variable? Is so, making this the default has been proposed and rejected before. Some

[issue25924] investigate if getaddrinfo(3) on OSX is thread-safe

2016-01-29 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks for the thorough work! Hopefully we can apply this fix to 3.5, 3.6 and even 2.7. -- nosy: +gvanrossum ___ Python tracker

[issue26218] Set PrependPath default to true

2016-01-29 Thread Steve Dower
Steve Dower added the comment: Sorry, not happening. There's a very prominent checkbox on the first page of the installer, which was added under protest. I'd suggest learning the py.exe launcher instead, which does not suffer from any of the issues that are caused by modifying the global

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2016-01-29 Thread Martin Panter
Martin Panter added the comment: I think this is ready to push for Python 3. Python 2 might need an extra Py_TPFLAGS_HAVE_ITER check, perhaps reusing some code from the Issue 5218 patch. -- stage: patch review -> commit review versions: +Python 3.6 -Python 3.4

[issue26240] Docstring of the subprocess module should be cleaned up

2016-01-29 Thread Martin Panter
Martin Panter added the comment: IMO the doc strings should be reduced down so that it is a concise summary, and divided or merged into doc strings of each class, method, function. Less important details should be moved to the main RST documentation (if they aren’t already there). Regarding

[issue26222] Missing code in linux_distribution python 2.7.11

2016-01-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: >From the last two comments, it looks like this should be closed as 'not a bug'. -- nosy: +terry.reedy ___ Python tracker

[issue26214] textwrap should minimize number of breaks in extra long words

2016-01-29 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- type: behavior -> enhancement versions: -Python 2.7 ___ Python tracker ___

[issue26216] run runtktests.py error when test tkinter

2016-01-29 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue26240] Docstring of the subprocess module should be cleaned up

2016-01-29 Thread Antony Lee
New submission from Antony Lee: subprocess.__doc__ currently contains copies for the docstrings of a bunch of functions in the module (... but not subprocess.run). The docs for the Popen class should be moved into that class' docstring. The module's docstring also mentions the list2cmdline

[issue26168] Py_BuildValue may leak 'N' arguments on PyTuple_New failure

2016-01-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Rather rare reference leak is not the worst bug here. Following example const char *s = ...; PyObject *b = PyBytes_New(...); return PyBuildValue("(Ns)s", b, s, PyBytes_AS_STRING(b)); works if s is correct UTF-8 encoded string. But if it is not

[issue26205] Inconsistency concerning nested scopes

2016-01-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: Would 'three or more' be any clearer than 'at least three'? They mean the same, but the first seems better to me in this context. The real problem with this section are a) the use of Guido's first person 'I' and b) statements that were not changed when

[issue26212] Python with ncurses6.0 will not load _curses module on Solaris 10

2016-01-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: The tracker is not a help forum. It is for patching CPython. You might do better to ask for help in python-list or Stackoverflow or elsewhere to try to determine whether you need to do something different or if the problem is with Solaris or if indeed

[issue26168] Py_BuildValue may leak 'N' arguments on PyTuple_New failure

2016-01-29 Thread squidevil
squidevil added the comment: It looks like this patch is against the "default" cpython (3.x) branch. The 2.7 branch is missing the if(itemfailed) code in do_mktuple whose else clause was modified by the patch. It looks like some of this needs to be backported to 2.7? --

[issue19883] Integer overflow in zipimport.c

2016-01-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue26194] Undefined behavior for deque.insert() when len(d) == maxlen

2016-01-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: *All* reasons look reasonable. May be discuss this on Python-Dev or ask BDFL? >From my point it looks that correct implementation of the insertion is too >complex and this feature should go only in development release (if any). --

[issue23601] use small object allocator for dict key storage

2016-01-29 Thread Julian Taylor
Julian Taylor added the comment: ping, this has been sitting for 4 years and two python releases. Its about time this stupidly simple thing gets merged. -- ___ Python tracker

[issue26229] Make number serialization ES6/V8 compatible

2016-01-29 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___

[issue26229] Make number serialization ES6/V8 compatible

2016-01-29 Thread Mark Dickinson
Mark Dickinson added the comment: Here's the relevant part of the JCS document, from Appendix A of https://cyberphone.github.io/openkeystore/resources/docs/jcs.html#ECMAScript_Compatibility_Mode: """ Numbers *must* be expressed as specified by EMCAScript [ES6] using the improved serialization

[issue26229] Make number serialization ES6/V8 compatible

2016-01-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: That said, someone interested in this should probably voice their concerns towards the JCS standardizers, as the restrictions it imposes on number serialization are clearly an impediment to implementing their protocol. --