[issue21594] asyncio.create_subprocess_exec raises OSError

2014-06-02 Thread STINNER Victor
STINNER Victor added the comment: "I agree that blocking is not ideal, however there are already some other methods that can eventually block forever, and for such cases a timeout is provided." Functions like read() can "block" during several minutes, but it's something expect from network fu

[issue6167] Tkinter.Scrollbar: the activate method needs to return a value, and set should take only two args

2014-06-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is no the common interface for the "set" and "activate" methods. Listbox.activate(index) - mandatory argument is an index (an integer, "active", "anchor", "end", or @x,y form). Menu.activate(index) - mandatory argument is an index. Scrollbar.activate(el

[issue21233] Add *Calloc functions to CPython memory allocation API

2014-06-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6374c2d957a9 by Victor Stinner in branch 'default': Issue #21233: Rename the C structure "PyMemAllocator" to "PyMemAllocatorEx" to http://hg.python.org/cpython/rev/6374c2d957a9 -- ___ Python tracker

[issue21233] Add *Calloc functions to CPython memory allocation API

2014-06-02 Thread STINNER Victor
STINNER Victor added the comment: > I'm not sure: The usual case with ABI changes is that extensions may segfault > if they are *not* recompiled [1]. Ok, I renamed the structure PyMemAllocator to PyMemAllocatorEx, so the compilation fails because PyMemAllocator name is not defined. Modules com

[issue6167] Tkinter.Scrollbar: the activate method needs to return a value, and set should take only two args

2014-06-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch with added tests. -- Added file: http://bugs.python.org/file35461/tkinter_Scrollbar_fixes_3.diff ___ Python tracker ___ ___

[issue21233] Add *Calloc functions to CPython memory allocation API

2014-06-02 Thread STINNER Victor
STINNER Victor added the comment: "Okay, then let's please call it: _PyObject_Calloc(void *ctx, size_t nobjs, size_t objsize) _PyObject_Alloc(int use_calloc, void *ctx, size_t nobjs, size_t objsize)" "void * PyMem_RawCalloc(size_t nelem, size_t elsize);" prototype comes from the POSIX standad:

[issue21233] Add *Calloc functions to CPython memory allocation API

2014-06-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset dff6b4b61cac by Victor Stinner in branch 'default': Issue #21233: Revert bytearray(int) optimization using calloc() http://hg.python.org/cpython/rev/dff6b4b61cac -- ___ Python tracker

[issue21644] Optimize bytearray(int) constructor to use calloc()

2014-06-02 Thread STINNER Victor
New submission from STINNER Victor: Python 3.5 has a new PyObject_Calloc() function which can be used for fast memory allocation of memory block initialized with zeros. I already implemented an optimization, but Stefan Krah found issues in my change: http://bugs.python.org/issue21233#msg217826

[issue21644] Optimize bytearray(int) constructor to use calloc()

2014-06-02 Thread STINNER Victor
STINNER Victor added the comment: Stefan also wrote: "3) Somewhat similarly, I wonder if it was necessary to refactor PyBytes_FromStringAndSize(). I find the new version more difficult to understand." This issue can also be addressed here. --

[issue21233] Add *Calloc functions to CPython memory allocation API

2014-06-02 Thread STINNER Victor
STINNER Victor added the comment: "2) I'm not happy with the refactoring in bytearray_init(). (...) 3) Somewhat similarly, I wonder if it was necessary to refactor PyBytes_FromStringAndSize(). (...)" Ok, I reverted the change on bytearray(int) and opened the issue #21644 to discuss these tw

[issue21233] Add *Calloc functions to CPython memory allocation API

2014-06-02 Thread STINNER Victor
STINNER Victor added the comment: I reread the issue. I hope that I now addressed all issues. The remaining issue, bytearray(int) is now tracked by the new issue #21644. -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue21644] Optimize bytearray(int) constructor to use calloc()

2014-06-02 Thread STINNER Victor
STINNER Victor added the comment: Stefan wrote: "3) Somewhat similarly, I wonder if it was necessary to refactor PyBytes_FromStringAndSize(). I find the new version more difficult to understand." Do you mean that the optimization is useless or that the implementation should be changed? -

[issue21642] "_ if 1else _" does not compile

2014-06-02 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue21638] Seeking to EOF is too inefficient!

2014-06-02 Thread STINNER Victor
STINNER Victor added the comment: I don't think that Python calls directly read(). Python 2 uses fopen / fread. Python 3 doesn't use buffered files, but call open / read directly. -- nosy: +haypo, neologix ___ Python tracker

[issue6167] Tkinter.Scrollbar: the activate method needs to return a value, and set should take only two args

2014-06-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Indices have special meaning in Tk. INDICES Many of the widget commands for listboxes take one or more indices as arguments. An index specifies a particular element of the listbox, in any of the following ways: number Specifi

[issue21642] "_ if 1else _" does not compile

2014-06-02 Thread wim glenn
Changes by wim glenn : -- nosy: +wim.glenn ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue18492] Allow all resources if not running under regrtest.py

2014-06-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset eabff2a97b5b by Zachary Ware in branch '2.7': Issue #18492: Allow all resources when tests are not run by regrtest.py. http://hg.python.org/cpython/rev/eabff2a97b5b New changeset 8519576b0dc5 by Zachary Ware in branch '3.4': Issue #18492: Allow all

[issue18492] Allow all resources if not running under regrtest.py

2014-06-02 Thread Zachary Ware
Zachary Ware added the comment: You convinced me too, Serhiy :). Committed, without the regrtest_run flag. Thanks for review. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue21601] Cancel method for Asyncio Task is not documented

2014-06-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset c2384ca7fc3b by Victor Stinner in branch '3.4': Issue #21601: Document asyncio.Task.cancel(). Initial patch written by Vajrasky http://hg.python.org/cpython/rev/c2384ca7fc3b New changeset 0ee47d3d2664 by Victor Stinner in branch 'default': (Merge 3.

[issue21601] Cancel method for Asyncio Task is not documented

2014-06-02 Thread STINNER Victor
STINNER Victor added the comment: Thanks for the patch. By the way, the CancelledError from conccurent.futures is not documented and asyncio still has its own asyncio.CancelledError alias which is not documented neither. -- nosy: +giampaolo.rodola, gvanrossum, pitrou, yselivanov resol

[issue21462] PEP 466: upgrade OpenSSL in the Python 2.7 Windows builds

2014-06-02 Thread Zachary Ware
Changes by Zachary Ware : -- stage: -> resolved ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue21640] References to other Python version in sidebar of documentation index is not up to date

2014-06-02 Thread Ned Deily
Changes by Ned Deily : -- nosy: +georg.brandl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue6639] turtle: _tkinter.TclError: invalid command name ".10170160"

2014-06-02 Thread Lita Cho
Lita Cho added the comment: So it looks like the bug fix was really simple. I just needed to set TurtleScreen._RUNNING to True when the screen object tries to get destroyed. -- Added file: http://bugs.python.org/file35462/turtle_crash.patch ___ Pytho

[issue15590] --libs is inconsistent for python-config --libs and pkgconfig python --libs

2014-06-02 Thread Ned Deily
Changes by Ned Deily : -- versions: +Python 2.7, Python 3.4, Python 3.5 -Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue6639] turtle: _tkinter.TclError: invalid command name ".10170160"

2014-06-02 Thread Lita Cho
Lita Cho added the comment: Oops, pressed submit too soon. Now the programs raise a Terminator exception rather than a TclError, which I think is correct because the programs are calling Turtle methods when the TurtleScreen had been destroyed. I wasn't sure if it was better to return None ra

[issue21561] help() on enum34 enumeration class creates only a dummy documentation

2014-06-02 Thread Ned Deily
Changes by Ned Deily : -- nosy: -ned.deily ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue6167] Tkinter.Scrollbar: the activate method needs to return a value, and set should take only two args

2014-06-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: A Spinbox is not a Listbox. The common feature of the activate methods you listed is that the parameter is called 'index'. But I think this is a moot point. To the best of my knowledge, casually changing parameter names for no functional benefit is against p

[issue21616] argparse explodes with nargs='*' and a tuple metavar

2014-06-02 Thread paul j3
paul j3 added the comment: I think is issue was already raised in http://bugs.python.org/issue14074 argparse allows nargs>1 for positional arguments but doesn't allow metavar to be a tuple -- nosy: +paul.j3 ___ Python tracker

[issue21633] Argparse does not propagate HelpFormatter class to subparsers

2014-06-02 Thread paul j3
paul j3 added the comment: You can specify the 'formatter_class' when creating each subparser: sp1=sp.add_parser('cmd1', formatter_class = argparse.RawDescriptionHelpFormatter) The 'add_parser' command is the one that passes a variety of **kwargs to 'ArgumentParser' (or what ever parser c

[issue21645] test_read_all_from_pipe_reader() of test_asyncio hangs on FreeBSD 9

2014-06-02 Thread STINNER Victor
New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%203.4/builds/191/steps/test/logs/stdio [ 8/389] test_asyncio Timeout (1:00:00)! Thread 0x000801407400 (most recent call first): File "/usr/home/buildbot/buildarea/3.4.krah-freebsd/build/Lib/s

[issue18492] Allow all resources if not running under regrtest.py

2014-06-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: Just in time, as I will be reviewing and committing new Idle unittest module starting this week (new GSOC student). -- ___ Python tracker ___ _

[issue21645] test_read_all_from_pipe_reader() of test_asyncio hangs on FreeBSD 9

2014-06-02 Thread Guido van Rossum
Guido van Rossum added the comment: Maybe see Tulip issue 168? That test was added to support that. Maybe the fix doesn't work for this platform? -- ___ Python tracker ___ _

[issue21639] tracemalloc crashes with floating point exception when using StringIO

2014-06-02 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue21627] Concurrently closing files and iterating over the open files directory is not well specified

2014-06-02 Thread Steven Stewart-Gallus
Steven Stewart-Gallus added the comment: It occurred to me that the current patch I have is wrong and that using _Py_set_inheritable is wrong because EBADF can occur in the brute force version which in the case of _Py_set_inheritable raises an error which I am not sure is asynch signal safe. I

[issue21533] built-in types dict docs - construct dict from iterable, not iterator

2014-06-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 78da27d6f28f by Terry Jan Reedy in branch '2.7': Issue 21533: Dicts take iterables, not iterators. Patch by Wolfgang Maier. http://hg.python.org/cpython/rev/78da27d6f28f New changeset 28665dc3a696 by Terry Jan Reedy in branch '3.4': Issue 21533: Dic

[issue21533] built-in types dict docs - construct dict from iterable, not iterator

2014-06-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thanks for catching this, and for the patch. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue21638] Seeking to EOF is too inefficient!

2014-06-02 Thread Linlin Yan
Linlin Yan added the comment: I agree that Python 2 should use fopen / fread rather than directly read(). But you may misunderstand this. The 'strace' tool reports Linux system calls, including read() rather than fread(), and I guess that read() should be finally called in fread() implementation.

[issue21576] Overwritten (custom) uuid inside dictionary

2014-06-02 Thread R. David Murray
R. David Murray added the comment: In python, everything is references to objects. So yes, this is expected Python behavior. Issue 20135 is about improving the FAQ entries on this subject, so I'm closing this as a duplicate of that issue. -- nosy: +r.david.murray stage: -> resolved

[issue1191964] asynchronous Subprocess

2014-06-02 Thread akira
akira added the comment: > First, with the use of Overlapped IO on Windows, BlockingIOError should never > come up, and we don't even handle that exception. Is it correct that the way to distinguish between "would block" and EOF is Popen.poll()? Is it possible to detect it in _nonblocking() me

[issue20752] Difflib should provide the option of overriding the SequenceMatcher

2014-06-02 Thread Chris Rose
Chris Rose added the comment: As suggested: SYN -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue17277] incorrect line numbers in backtrace after removing a trace function

2014-06-02 Thread Nikolaus Rath
Changes by Nikolaus Rath : -- nosy: +nikratio ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue16428] turtle with compound shape doesn't get clicks

2014-06-02 Thread ingrid
ingrid added the comment: Looks like the issue is that when you are registering mouse events through turtle, it uses Shape._item. For polygon shapes, that's the actual shape item, but for compound shapes, it is an array of shape items. I have attached a patch that makes it so when there is a c

[issue21640] References to other Python version in sidebar of documentation index is not up to date

2014-06-02 Thread Senthil Kumaran
Senthil Kumaran added the comment: I see that all the patches are correct. My only worry is since 3.1,3.2 and 3.3 are in security fix only mode, we may not apply it to those. 2.7, 3.4 and 3.5 ones are okay. -- nosy: +orsenthil ___ Python tracker

[issue10984] argparse add_mutually_exclusive_group should accept existing arguments to register conflicts

2014-06-02 Thread paul j3
paul j3 added the comment: Another way to add an existing Action to a group is to modify the 'add_argument' method for the Group subclass. For example we could add this to the _MutuallyExclusiveGroup class: def add_argument(self, *args, **kwargs): # allow adding a prexisting Actio

[issue21646] Add tests for turtle.ScrolledCanvas

2014-06-02 Thread ingrid
Changes by ingrid : -- components: Tests nosy: ingrid, jesstess priority: normal severity: normal status: open title: Add tests for turtle.ScrolledCanvas versions: Python 3.5 ___ Python tracker

[issue18292] Idle: test AutoExpand.py

2014-06-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: Great start. The initial coveraqe is 90%, only missing the 5 lines in getwords in the bodies of if dict.get(w): continue ,,, for w in wafter: if dict.get(w): continue words.append(w)

[issue21642] "_ if 1else _" does not compile

2014-06-02 Thread Martin v . Löwis
Martin v. Löwis added the comment: For those who want to skip reading the entire SO question: "1else" tokenizes as "1e" "lse", i.e. 1e is considered the beginning of floating point literal. By the description in the docs, that should not happen, since it is not a valid literal on its own, so n

[issue21647] Idle unittests: make gui, mock switching easier.

2014-06-02 Thread Terry J. Reedy
New submission from Terry J. Reedy: Idle unittests that use tkinter.Text are developed using the gui widget and then switched, to the current extent possible, to mock_tk.Text. I have done this previously by commenting out gui lines and adding new lines, so it would be possible to switch back i

[issue21646] Add tests for turtle.ScrolledCanvas

2014-06-02 Thread Jessica McKellar
Changes by Jessica McKellar : -- assignee: -> jesstess ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue21640] References to other Python version in sidebar of documentation index is not up to date

2014-06-02 Thread Senthil Kumaran
Senthil Kumaran added the comment: Fixed the follwing changesets. 2.7 b8655be522d4 3.4 e6dce5611dae 3.5 50c9df76bb77 -- resolution: -> fixed stage: -> resolved status: open -> closed type: -> behavior ___ Python tracker

[issue15590] --libs is inconsistent for python-config --libs and pkgconfig python --libs

2014-06-02 Thread Michael Haubenwallner
Michael Haubenwallner added the comment: Well, they should not be identical, as they are for different use cases. "pkg-config python" is to build an application containing a python interpreter (like python$EXE): + Link against libpython.so. Additionally, + re-export symbols from libpython.so

<    1   2