[issue25935] OrderedDict prevents garbage collection if a circulary referenced class is used as key

2015-12-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: An OrderedDict owns two references to every key (as a dict and from a linked list). Therefore it should visit it twice in tp_traverse. Proposed patch fixes garbage collection for OrderedDict. It also rewrites OrderedDict clearing in more reentrant form (a

[issue19873] There is a duplicate function in Lib/test/test_pathlib.py

2015-12-28 Thread Ezio Melotti
Ezio Melotti added the comment: Applied to default in 1472c08d9c23. Thanks Navneet for the patch! -- assignee: pitrou -> ezio.melotti resolution: -> fixed stage: patch review -> resolved status: open -> closed type: behavior -> enhancement versions: +Python 3.6 -Python 3.5

[issue18543] urllib.parse.urlopen shouldn't ignore installed opener when called with any ca* argument

2015-12-28 Thread David Ford (FirefighterBlu3)
David Ford (FirefighterBlu3) added the comment: can we get a review on this please? i'd love to move forward and get the fixes in place. -- versions: +Python 3.5, Python 3.6 ___ Python tracker

[issue19511] lib2to3 Grammar file is no longer a Python 3 superset

2015-12-28 Thread Ezio Melotti
Ezio Melotti added the comment: I created #25967 to keep track of the devguide issue, so I'm going to close this. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue25968] Cannot import modules out of zip file with extended-length path on windows

2015-12-28 Thread Chris Moore
New submission from Chris Moore: To reproduce, put a python module in a zip file (I have been using wheels but I assume any module in a zip file will have the same error?) , add the absolute extended-length path to sys.path (add '?\\' to the front of the normal absolute path, so

[issue25958] Implicit ABCs have no means of "anti-registration"

2015-12-28 Thread Andrew Barnert
Andrew Barnert added the comment: Hashable and Awaitable already treat None (actually any falsey value) as not implementing the special method, and blocking any superclass implementation, in their __subclasshook__. (This only blocks implicit subclassing--anything that actually directly or

[issue25447] TypeError invoking deepcopy on lru_cache

2015-12-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue25928] Add Decimal.as_integer_ratio()

2015-12-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset f3b09c269af0 by Stefan Krah in branch 'default': Issue #25928: Add Decimal.as_integer_ratio(). Python parts and docs by https://hg.python.org/cpython/rev/f3b09c269af0 -- nosy: +python-dev ___ Python

[issue24071] Python 2.7.8, 2.7.9 re.MULTILINE failure

2015-12-28 Thread Ezio Melotti
Ezio Melotti added the comment: See #11957. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue25928] Add Decimal.as_integer_ratio()

2015-12-28 Thread Stefan Krah
Stefan Krah added the comment: Hopefully I wasn't moving too fast, but I won't have time in the next days/weeks. Serhiy and Alexander (#8947) would prefer more homogeneous error messages and docstrings between float/pydecimal/cdecimal. I wouldn't mind a patch in another issue (no argument

[issue25863] ISO-2022 seeking forgets state

2015-12-28 Thread Ezio Melotti
Ezio Melotti added the comment: I confirmed the problem on default (3.6) and verified that it works as expected using utf-8 instead of iso-2022-jp. The code in the above message should be converted into a unittest, and related codecs should be checked as well. The problem is probably in

[issue25940] SSL tests failed due to expired svn.python.org SSL certificate

2015-12-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9d0c15425b59 by Stefan Krah in branch 'default': Issue #25940: Make buildbots usable again until a solution is found. https://hg.python.org/cpython/rev/9d0c15425b59 -- nosy: +python-dev ___ Python

[issue24725] test_socket testFDPassEmpty fails on OS X 10.11 DP with "Cannot allocate memory"

2015-12-28 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the patch, Jeff! -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue24725] test_socket testFDPassEmpty fails on OS X 10.11 DP with "Cannot allocate memory"

2015-12-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset b4c6631737b3 by Brett Cannon in branch 'default': Issue #24725: Skip the test_socket.testFDPassEmpty on OS X. https://hg.python.org/cpython/rev/b4c6631737b3 -- nosy: +python-dev ___ Python tracker

[issue25234] test_eintr.test_os_open hangs under Xcode 7

2015-12-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7fc1296d1acf by Brett Cannon in branch 'default': Issue #25234: Skip test_eintr.test_os_open under OS X. https://hg.python.org/cpython/rev/7fc1296d1acf -- nosy: +python-dev ___ Python tracker

[issue25234] test_eintr.test_os_open hangs under Xcode 7

2015-12-28 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue25930] Document that os.remove is semantically identical to os.unlink

2015-12-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 81c7b26f5b4e by Brett Cannon in branch 'default': Issue #25930: Document that os.unlink and os.remove are *semantically* identical. https://hg.python.org/cpython/rev/81c7b26f5b4e -- nosy: +python-dev

[issue25930] Document that os.remove is semantically identical to os.unlink

2015-12-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9f13322eba8e by Brett Cannon in branch '3.5': Backport of fix for issue #25930 https://hg.python.org/cpython/rev/9f13322eba8e New changeset e082519bc2c8 by Brett Cannon in branch 'default': Merge for backport of fix for issue #25930

[issue25930] Document that os.remove is semantically identical to os.unlink

2015-12-28 Thread Brett Cannon
Brett Cannon added the comment: I tweaked Swati's patch as there was another spot where the "identical" line was used. Thanks to everyone who helped out with this! -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___

[issue25802] Finish deprecating load_module()

2015-12-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset ab0e60a36368 by Brett Cannon in branch 'default': Issue #25802: Deprecate load_module() on importlib.machinery.SourceFileLoader and SourcelessFileLoader. https://hg.python.org/cpython/rev/ab0e60a36368 -- nosy: +python-dev

[issue25802] Finish deprecating load_module()

2015-12-28 Thread Brett Cannon
Brett Cannon added the comment: I'm leaving this issue open until I add an Examples section to the importlib docs. I will use the imp module as a guide of what to document. -- resolution: -> fixed stage: test needed -> resolved ___ Python tracker

[issue25972] All Windows buildbots fail compile/clean

2015-12-28 Thread Stefan Krah
New submission from Stefan Krah: Not sure what is happening, but all Windows buildbots fail compile/clean. -- messages: 257161 nosy: skrah, zach.ware priority: normal severity: normal status: open title: All Windows buildbots fail compile/clean ___

[issue25972] All Windows buildbots fail compile/clean

2015-12-28 Thread Stefan Krah
Stefan Krah added the comment: Serhiy, could you take a look if it's related to http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/7107 ? This seems to be the first failure. -- ___ Python tracker

[issue25972] All Windows buildbots fail compile/clean

2015-12-28 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue25963] strptime not parsing some timezones

2015-12-28 Thread Utkonos
New submission from Utkonos: I get a ValueError when running the following through strptime: datetime.datetime.strptime('(CST)', '(%Z)') But the following works: datetime.datetime.strptime('(EST)', '(%Z)') PST and MST also trigger the same exception. -- messages: 257108 nosy:

[issue25965] decimal.py: issues reprted by pychecker

2015-12-28 Thread Martin Mokrejs
New submission from Martin Mokrejs: I use pychecker to check my code. It complains about decimal.py from python-2.7.10 itself: [system path]/decimal.py:1345: INTERNAL ERROR -- STOPPED PROCESSING FUNCTION -- Traceback (most recent call last): File

[issue25965] decimal.py: issues reported by pychecker

2015-12-28 Thread Martin Mokrejs
Changes by Martin Mokrejs : -- title: decimal.py: issues reprted by pychecker -> decimal.py: issues reported by pychecker ___ Python tracker

[issue20607] multiprocessing cx_Freeze windows GUI bug (& easy fixes)

2015-12-28 Thread Mark Summerfield
Mark Summerfield added the comment: Thanks Davin. I have indeed moved to 3.4 which does not seem to have the bug. (I can't move to 3.5 because I can't install 32- and 64-bit versions as I can with 3.4 due to the new installers -- or rather I can, but this confuses the pywin32 and apsw

[issue25964] optparse.py:1668: (file) shadows builtin

2015-12-28 Thread Martin Mokrejs
Martin Mokrejs added the comment: But couldn't somebody just rename the variable for example to _file? I see optparse also in python-3.5 so I did not think it could be Deprecated. -- ___ Python tracker

[issue25964] optparse.py:1668: (file) shadows builtin

2015-12-28 Thread SilentGhost
SilentGhost added the comment: None of this warnings highlights a real issue. Furthermore, optparse module is deprecated and you'd be better off using argparse instead. -- components: +Library (Lib) nosy: +SilentGhost resolution: -> not a bug stage: -> resolved status: open -> closed

[issue23551] IDLE to provide menu link to PIP gui.

2015-12-28 Thread Aivar Annamaa
Aivar Annamaa added the comment: In case "Open system shell" happens someday, here's my take on this: https://bitbucket.org/plas/thonny/src/master/thonny/plugins/system_shell/ It's a plugin for my beginners' IDE Thonny (http://thonny.cs.ut.ee). It creates a menu item which opens system

[issue25964] optparse.py:1668: (file) shadows builtin

2015-12-28 Thread SilentGhost
SilentGhost added the comment: The deprecation warning is clearly displayed at the top of the module documentation: https://docs.python.org/3/library/optparse.html Regarding variable names: it is not an issue and pychecker is simply mistaken here. --

[issue25964] optparse.py:1668: (file) shadows builtin

2015-12-28 Thread Martin Mokrejs
New submission from Martin Mokrejs: I use pychecker for checking my python code. Seems optparse.py distributed with python-2.7 could be improved as well: [system path]/optparse.py:1191: Function (__init__) has too many arguments (11) [system path]/optparse.py:1206: Local variable (version)

[issue25939] _ssl.enum_certificates() fails with ERROR_ACCESS_DENIED if python.exe run with low integrity level

2015-12-28 Thread Eryk Sun
Eryk Sun added the comment: Testing based on integrity level doesn't require creating a child process. I'm attaching a ctypes-based example that defines a context manager that temporarily sets the integrity level of the current thread's impersonation token. To get the impersonation token, I

[issue25935] OrderedDict prevents garbage collection if a circulary referenced class is used as key

2015-12-28 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +eric.snow, serhiy.storchaka ___ Python tracker ___

[issue25928] Add Decimal.as_integer_ratio()

2015-12-28 Thread Stefan Krah
Stefan Krah added the comment: Here's a patch. The Python and doc parts are from Mark (#8947). I did not optimize the normalization yet, in C the code is less clean and there were some corner cases where the gcd is actually faster. -- keywords: +patch Added file:

[issue25935] OrderedDict prevents garbage collection if a circulary referenced class is used as key

2015-12-28 Thread Tim Graham
Changes by Tim Graham : -- nosy: +Tim.Graham ___ Python tracker ___ ___

[issue25966] Bug in asyncio.corotuines._format_coroutine

2015-12-28 Thread Brett Rosen
New submission from Brett Rosen: When running some test cases via py.test and using a coroutine created inside of cythonized code, I get the following: def _format_coroutine(coro): assert iscoroutine(coro) coro_name = getattr(coro, '__qualname__', coro.__name__)

[issue19873] There is a duplicate function in Lib/test/test_pathlib.py

2015-12-28 Thread Ezio Melotti
Ezio Melotti added the comment: As far as I understand the two functions exist only for readability (i.e. the intention is to check for relative and absolute resolution respectively), but since they share the same implementation, the patch defines a single function and uses it for both

[issue25965] decimal.py: issues reported by pychecker

2015-12-28 Thread R. David Murray
R. David Murray added the comment: That INTERNAL ERROR would be a bug in pychecker. -- nosy: +r.david.murray resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker

[issue25957] sockaddr_l2 lacks CID, address type (AF_BLUETOOTH sockets)

2015-12-28 Thread Mike Ryan
Mike Ryan added the comment: AF_BLUETOOTH also lacks support for hci_channel in sockaddr_hci for BTPROTO_HCI sockets: https://git.kernel.org/cgit/bluetooth/bluez.git/tree/lib/hci.h?h=5.37#n2340 This feature has been present in BlueZ since 2010:

[issue25941] Add 'How to Review a Patch' section to devguide

2015-12-28 Thread Ezio Melotti
Ezio Melotti added the comment: +1 to the above message. There are also a couple of things that should be corrected: * bugtracker -> bug tracker * If the patch makes codechanges to C codebase -> If the patch affects any C file This could also be condensed a bit and merged with

[issue19873] There is a duplicate function in Lib/test/test_pathlib.py

2015-12-28 Thread R. David Murray
R. David Murray added the comment: Maybe add a comment as to why this is done? (I'm not sure I understand why.) -- nosy: +r.david.murray ___ Python tracker

[issue25928] Add Decimal.as_integer_ratio()

2015-12-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: test needed -> patch review ___ Python tracker ___

[issue25942] subprocess.call SIGKILLs too liberally

2015-12-28 Thread SilentGhost
SilentGhost added the comment: The code was introduced to solve issue 12494, so I'm adding Victor to weigh in. -- nosy: +SilentGhost, haypo versions: +Python 3.5, Python 3.6 -Python 3.3 ___ Python tracker

[issue25447] TypeError invoking deepcopy on lru_cache

2015-12-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 33b428ef34b9 by Serhiy Storchaka in branch '3.5': Issue #25447: Copying the lru_cache() wrapper object now always works, https://hg.python.org/cpython/rev/33b428ef34b9 New changeset a0f9a8bee85f by Serhiy Storchaka in branch 'default': Issue

[issue25967] Devguide: add 2to3 to the "Changing CPython's Grammar" checklist

2015-12-28 Thread Ezio Melotti
New submission from Ezio Melotti: If Python grammar is changed, lib2to3 should be updated accordingly. This is currently missing from https://docs.python.org/devguide/grammar.html#checklist See also #19511. -- components: Devguide keywords: easy messages: 257134 nosy: ezio.melotti,

[issue25969] Update lib2to3 grammar to include missing unpacking generalizations.

2015-12-28 Thread Ezio Melotti
New submission from Ezio Melotti: The new unpacking generalizations added in #2292 should be added to the lib2to3 grammar (see msg248019 and msg248025). See also #25967. -- components: Library (Lib) messages: 257138 nosy: benjamin.peterson, ezio.melotti, yselivanov priority: normal

[issue2292] Missing *-unpacking generalizations

2015-12-28 Thread Ezio Melotti
Ezio Melotti added the comment: I created #25969 to track the lib2to3 update. -- ___ Python tracker ___ ___

[issue25970] py_compile.compile fails if existing bytecode file is unwritable

2015-12-28 Thread Robert Byrnes
New submission from Robert Byrnes: In Python/import.c, open_exclusive unlinks any existing bytecode file before opening to create a new one. However, py_compile.compile doesn't unlink before opening, and therefore fails if an existing bytecode file is unwritable. It would be nice to unlink

[issue25927] add dir_fd for mkstemp, and also maybe to all tempfile.*

2015-12-28 Thread Марк Коренберг
Марк Коренберг added the comment: Yes, can I do it on, say, github ? -- ___ Python tracker ___ ___

[issue25928] Add Decimal.as_integer_ratio()

2015-12-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 510ff609cb4f by Stefan Krah in branch 'default': Issue #25928: Temporarily disable some tests in test_statistics in order https://hg.python.org/cpython/rev/510ff609cb4f -- ___ Python tracker

[issue25971] Optimize converting float and Decimal to Fraction

2015-12-28 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch makes following things: 1. Rewrite error messages in float.as_integer_ratio() and Python implementation of Decimal.as_integer_ratio() in more general form, not mentioning as_integer_ratio(), as in C implementation of

[issue25894] unittest subTest failure causes result to be omitted from listing

2015-12-28 Thread Ezio Melotti
Ezio Melotti added the comment: > My gut feeling is that any subtest failure should be counted as the > whole test failing. I’m not sure how the failure vs error cases should > be handled. Maybe error should trump failure. I think the priority should be error > failure > skip > pass. IOW, pass

[issue25928] Add Decimal.as_integer_ratio()

2015-12-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Hopefully I wasn't moving too fast, but I won't have time in the next days/weeks. No, the patch is pretty clear. Thanks. > Serhiy and Alexander (#8947) would prefer more homogeneous error messages and docstrings between float/pydecimal/cdecimal. This

[issue25927] add dir_fd for mkstemp, and also maybe to all tempfile.*

2015-12-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See a guide: https://docs.python.org/devguide/. -- ___ Python tracker ___

[issue25928] Add Decimal.as_integer_ratio()

2015-12-28 Thread Stefan Krah
Stefan Krah added the comment: Steven, could you have a look at the failures in test_statistics? Some tests fail because they assume non-normalized fractions, I still have to look at the other assumptions. -- ___ Python tracker

[issue25436] argparse.ArgumentError missing error message in __repr__

2015-12-28 Thread Daniel Fortunov
Daniel Fortunov added the comment: Paul, Thanks for your comprehensive reply. I agree with everything you've said and the reason I've taken so long to reply is that I've been racking my brains to remember exactly how I came across this scenario. I did at some point see an ArgumentError but

[issue16731] xxlimited/xxmodule docstrings ambiguous

2015-12-28 Thread Camilla Montonen
Camilla Montonen added the comment: Hi Daniel, just about to review this patch and noticed that the typo in xxlimited.c docstring is still there. Do you mind if I tweak your patch to fix this? -- nosy: +Winterflower ___ Python tracker

[issue19873] There is a duplicate function in Lib/test/test_pathlib.py

2015-12-28 Thread R. David Murray
R. David Murray added the comment: So maybe "# we can use the same method to check for both absolute and relative resolution"? -- assignee: ezio.melotti -> pitrou stage: commit review -> patch review versions: +Python 3.5 -Python 3.6 ___ Python

[issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError

2015-12-28 Thread Andrew Barnert
Andrew Barnert added the comment: The attached patch does the following: * collections.abc.Mapping.__reversed__ = None. * collections.abc.Iterable.__subclasshook__ checks for None the same way Hashable does: * This tests for any falsey value, not just None. I'm not sure this is ideal, but

[issue5501] Update multiprocessing docs re: freeze_support

2015-12-28 Thread Camilla Montonen
Camilla Montonen added the comment: Patch review: 3.X patch: Applied to docs locally in the default branch(3.6). Docs build passes, doc layout has not been broken. Applied to branch 3.5. Docs build passes, doc layout has not been broken. 2.X patch: Applied to docs locally in the 2.7 branch.

[issue25972] All Windows buildbots fail compile/clean

2015-12-28 Thread Zachary Ware
Zachary Ware added the comment: Just some missing parentheses, so I fixed it: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/7116 -- components: +Build resolution: -> fixed stage: -> resolved status: open -> closed type: -> compile error versions:

[issue25637] Move non-collections-related ABCs out of collections.abc

2015-12-28 Thread Nick Coghlan
Changes by Nick Coghlan : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list

[issue25609] Add a ContextManager ABC and type

2015-12-28 Thread Nick Coghlan
Changes by Nick Coghlan : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list

[issue25942] subprocess.call SIGKILLs too liberally

2015-12-28 Thread Mike Pomraning
Mike Pomraning added the comment: If I understand correctly, the _try_wait mechanics (or 3.5's syscall behavior) already handle EINTR the way we way: ignore it and try wait()ing again. So, this patch would kill only on a timeout, and never on another error like Ctrl-C, a

[issue20440] Use the Py_SETREF macro

2015-12-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset e04cd497aa41 by Zachary Ware in branch 'default': Issue #25972, #20440: Fix compilation on Windows https://hg.python.org/cpython/rev/e04cd497aa41 -- ___ Python tracker

[issue25972] All Windows buildbots fail compile/clean

2015-12-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset e04cd497aa41 by Zachary Ware in branch 'default': Issue #25972, #20440: Fix compilation on Windows https://hg.python.org/cpython/rev/e04cd497aa41 -- nosy: +python-dev ___ Python tracker

[issue25972] All Windows buildbots fail compile/clean

2015-12-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, thank you Zachary. -- ___ Python tracker ___ ___ Python-bugs-list

[issue25928] Add Decimal.as_integer_ratio()

2015-12-28 Thread Stefan Krah
Stefan Krah added the comment: Ah yes, the test_statistics failures look like #18841 again. -- ___ Python tracker ___

[issue25856] The __module__ attribute of non-heap classes is not interned

2015-12-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Interning the __module__ string causes small performance hit: $ ./python -m timeit -s "from itertools import chain" -- "chain.__module__; chain.__module__; chain.__module__; chain.__module__; chain.__module__; chain.__module__; chain.__module__;

[issue25956] Unambiguous representation of recursive objects

2015-12-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Rejected by Guido. http://permalink.gmane.org/gmane.comp.python.ideas/37562 -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue25923] More const char

2015-12-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Excuse my troubling. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue25956] Unambiguous representation of recursive objects

2015-12-28 Thread leewz
leewz added the comment: Hey, I brought this up last month in the #python channel. I suggested `[ . . . ]`. I agree that there's no great need, though. -- nosy: +leewz ___ Python tracker