[issue24632] Improve documentation about __main__.py

2015-07-13 Thread Ezio Melotti
New submission from Ezio Melotti: __main__.py seems to only be mentioned briefly in a couple of places in the official docs: 1) https://docs.python.org/3/library/__main__.html 2) https://docs.python.org/3/using/cmdline.html#cmdoption-m The first link only says: """For a package, the same effect

[issue14373] C implementation of functools.lru_cache

2015-07-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Stefan, Ned, can you reproduce the same crash with following patch? -- Added file: http://bugs.python.org/file39923/clru_cache_new.patch ___ Python tracker __

[issue24631] Regression in timeit with multyline setup

2015-07-13 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Issue5633 introduced a regression in 3.5. $ ./python -m timeit -s "a = 1" -s "b = 2" Traceback (most recent call last): File "/home/serhiy/py/cpython-3.5/Lib/runpy.py", line 170, in _run_module_as_main "__main__", mod_spec) File "/home/serhiy/py/cpy

[issue23661] Setting a exception side_effect on a mock from create_autospec does not work

2015-07-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7021d46c490e by Robert Collins in branch '3.5': Issue #23661: unittest.mock side_effects can now be exceptions again. https://hg.python.org/cpython/rev/7021d46c490e New changeset 231bf0840f8f by Robert Collins in branch 'default': Issue 23661: null-

[issue24483] Avoid repeated hash calculation in C implementation of functools.lru_cache()

2015-07-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Can you allow me to commit the patch or will commit it yourself Raymond? -- ___ Python tracker ___ ___

[issue24630] null pointer dereference in `load_newobj_ex`

2015-07-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Can't reproduce the crash with current sources. In both examples the result is an exception: _pickle.UnpicklingError: NEWOBJ_EX class argument must be a type, not float How an ob_type field of cls can be set to 0? -- nosy: +alexandre.vassalotti, pit

[issue19475] Add microsecond flag to datetime isoformat()

2015-07-13 Thread Jerry Elmore
Changes by Jerry Elmore : -- nosy: +Jerry Elmore ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue24570] IDLE Autocomplete and Call Tips Do Not Pop Up on OS X with ActiveTcl 8.5.18

2015-07-13 Thread Alessandro Rosa
Alessandro Rosa added the comment: Hi Terry, I will try my best to answer your questions. To update you, I decided to completely uninstall the ActiveState frameworks from my Mac. This brought me back to the dreaded Apple version of Tcl/Tk 8.5.9 with the IDLE warning about it. At this point Au

[issue24630] null pointer dereference in `load_newobj_ex`

2015-07-13 Thread Brad Larsen
Brad Larsen added the comment: Also, it appears that the `ob_type` field of `cls` need not be NULL; it can be an arbitrary value treated as a memory location. Attached another POC that triggers this case. -- Added file: http://bugs.python.org/file39922/bug-nonnull.py _

[issue24630] null pointer dereference in `load_newobj_ex`

2015-07-13 Thread Brad Larsen
Brad Larsen added the comment: Seems to be similar to #24552, but not the same problem. -- ___ Python tracker ___ ___ Python-bugs-list

[issue24630] null pointer dereference in `load_newobj_ex`

2015-07-13 Thread Brad Larsen
New submission from Brad Larsen: `load_newobj_ex` in can crash with a null pointer dereference. File Modules/_pickle.c: static int load_newobj_ex(UnpicklerObject *self) { PyObject *cls, *args, *kwargs; PyObject *obj; PickleState *st = _Pickle_GetGlobalState(

[issue23661] Setting a exception side_effect on a mock from create_autospec does not work

2015-07-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset db825807ab04 by Robert Collins in branch 'default': Issue #23661: unittest.mock side_effects can now be exceptions again. https://hg.python.org/cpython/rev/db825807ab04 -- nosy: +python-dev ___ Python tra

[issue23661] Setting a exception side_effect on a mock from create_autospec does not work

2015-07-13 Thread Robert Collins
Robert Collins added the comment: This looks fine to me, I'm going to apply it. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue23661] Setting a exception side_effect on a mock from create_autospec does not work

2015-07-13 Thread Robert Collins
Robert Collins added the comment: Also reported in the mock project as https://github.com/testing-cabal/mock/issues/264 -- nosy: +rbcollins ___ Python tracker ___ __

[issue22858] unittest.__init__:main shadows unittest.main

2015-07-13 Thread Robert Collins
Robert Collins added the comment: See also https://github.com/testing-cabal/mock/issues/250 -- ___ Python tracker ___ ___ Python-bugs

[issue24629] unittest.main shadows unittest.main module

2015-07-13 Thread Robert Collins
Changes by Robert Collins : -- resolution: -> duplicate superseder: -> unittest.__init__:main shadows unittest.main ___ Python tracker ___ _

[issue24629] unittest.main shadows unittest.main module

2015-07-13 Thread R. David Murray
R. David Murray added the comment: I think you forgot about issue 22858. -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bu

[issue24629] unittest.main shadows unittest.main module

2015-07-13 Thread Robert Collins
New submission from Robert Collins: this is a bad practice - it interferes with test discovery and with the use of mock (see https://github.com/testing-cabal/mock/issues/250). We could move main.py to mainmod.py or something -- messages: 246704 nosy: rbcollins priority: normal severity

[issue24629] unittest.main shadows unittest.main module

2015-07-13 Thread Robert Collins
Changes by Robert Collins : -- type: -> enhancement versions: +Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue24249] unittest API for detecting test failure in cleanup/teardown

2015-07-13 Thread Robert Collins
Robert Collins added the comment: Setting some basic design parameters here. Its ok for a test to know if it itself has decided on some status. See e.g. testtools.expectThat for a related design thing. Making some official API within the test itself so code after the failure can take appropri

[issue24628] load_workbook giving ValueError: invalid literal for int()

2015-07-13 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report, but openpyxl is not part of the Python standard library. Please create an issue at https://bitbucket.org/openpyxl/openpyxl/issues -- nosy: +berker.peksag resolution: -> third party stage: -> resolved status: open -> closed _

[issue24628] load_workbook giving ValueError: invalid literal for int()

2015-07-13 Thread Travis
New submission from Travis: This code works fine with all my workbooks except the one with a heavier amount of data. Please let me know if you want the excel file I am trying to open with this code. -- components: IDLE, IO, Installation, Interpreter Core, Library (Lib), Macintosh files

[issue24136] document PEP 448: unpacking generalization

2015-07-13 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag stage: needs patch -> patch review versions: +Python 3.6 ___ Python tracker ___ ___

[issue23530] os and multiprocessing.cpu_count do not respect cpuset/affinity

2015-07-13 Thread Berker Peksag
Berker Peksag added the comment: It would be nice to backport the patch to the 3.4 and 3.5 branches. -- nosy: +berker.peksag ___ Python tracker ___ __

[issue23530] os and multiprocessing.cpu_count do not respect cpuset/affinity

2015-07-13 Thread Charles-François Natali
Charles-François Natali added the comment: Committed. Julian, thanks for the patch! -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue23530] os and multiprocessing.cpu_count do not respect cpuset/affinity

2015-07-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset b9e3838e9664 by Charles-François Natali in branch 'default': Issue #23530: Improve os.cpu_count() description. https://hg.python.org/cpython/rev/b9e3838e9664 -- nosy: +python-dev ___ Python tracker

[issue9232] Allow trailing comma in any function argument list.

2015-07-13 Thread Grégory Starck
Grégory Starck added the comment: Have also been confronted to this bug (imo) and this happen from time to time to me : I often like to ends my (big) functions defs and calls (those that span over multiple lines thus..) with that extra comma, so that when/if I add another argument (on a new

[issue10682] With '*args' or even bare '*' in def/call argument list, trailing comma causes SyntaxError

2015-07-13 Thread Grégory Starck
Grégory Starck added the comment: > unneeded consistency "unneeded" consistency !:? I'd say that either there is a "full or complete" consistency on the mentionned point/element of syntax, or there is none .. but an unneeded one.. or an half-one, isn't "consistent consistency" by then ;) --

[issue24553] improve test coverage for subinterpreters

2015-07-13 Thread Stefan Krah
Stefan Krah added the comment: +1 for python -m test.subinterpretertest. Based on my experiments, most tests will either fail or leak memory at the very least. -- ___ Python tracker

[issue24622] tokenize.py: missing EXACT_TOKEN_TYPES

2015-07-13 Thread Meador Inge
Meador Inge added the comment: On Mon, Jul 13, 2015 at 12:04 PM, Stefan Krah wrote: > I think with the ASYNC/AWAIT changes any code using tokenize.py > will have to be updated anyway in 3.5 and in 3.7 (when ASYNC/AWAIT > will finally be real keywords). Agreed. > So this is probably an ideal t

[issue24622] tokenize.py: missing EXACT_TOKEN_TYPES

2015-07-13 Thread Stefan Krah
Stefan Krah added the comment: I think with the ASYNC/AWAIT changes any code using tokenize.py will have to be updated anyway in 3.5 and in 3.7 (when ASYNC/AWAIT will finally be real keywords). So this is probably an ideal time for the change. I'll add tests. -- __

[issue24622] tokenize.py: missing EXACT_TOKEN_TYPES

2015-07-13 Thread Meador Inge
Meador Inge added the comment: This looks good to me. A few questions. The patch is fixing an obvious bug, but there could be code that depends on the current broken behavior (the table has been incorrect since Python 3.3). How do we feel about such breaking changes? I am OK with this one. Wi

[issue23972] Asyncio reuseport

2015-07-13 Thread chris laws
chris laws added the comment: I encountered this issue too. I needed it resolved ASAP for my work so I created a loop patch that partially implements the suggestion solution by overriding the create_datagram_endpoint method. Perhaps this might be of some use to the eventual ticket resolver. I

[issue21238] unittest.mock.Mock should not allow you to use non-existent assert methods

2015-07-13 Thread Kushal Das
Kushal Das added the comment: It is a typing mistake many people make. We just want to catch those as otherwise mock will silently pass those. -- ___ Python tracker ___

[issue21238] unittest.mock.Mock should not allow you to use non-existent assert methods

2015-07-13 Thread Dima Tisnek
Dima Tisnek added the comment: What is this **assret** spelling? I can't a reference to this spelling anywhere else in the codebase, let alone any docs other that this special kwarg. It seems intentional. Was that a joke? Or something I should know? -- nosy: +Dima.Tisnek ___

[issue24625] py.exe executes #! in windows

2015-07-13 Thread Paul Moore
Paul Moore added the comment: As noted, this behaviour is as documented, and is deliberately designed to execute the shebang line as either an executable (which calc is) or one of a specific set of "virtual" entries (which does not include /bin/env). -- resolution: -> not a bug status

[issue24587] Tkinter stacking versus focus behavior on Windows

2015-07-13 Thread Ned Deily
Ned Deily added the comment: As far as I can tell the sample program works as expected on OS X with either Cocoa Tk or X11 Tk, in both cases (as long as the event is changed to Button-1). I agree it's most likely a platform difference or platform bug in Tk behavior, rather than a Python issue