[issue18726] json functions have too many positional parameters

2013-08-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: -1 Once the positional arguments are in the wild, you can't take them away without breaking a lot of code. This code was available as a third-party module prior to inclusion in Python and had many happy users. If the positional arguments had been a sticki

[issue18313] In itertools recipes repeatfunc() defines a non-keyword argument as keyword

2013-08-31 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue18752] Make chain.from_iterable an alias for a new chain_iterable.

2013-08-31 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue18821] Add .lastitem attribute to takewhile instances

2013-08-31 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue18844] allow weights in random.choice

2013-08-31 Thread Westley Martínez
Changes by Westley Martínez : -- nosy: +anikom15 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue18844] allow weights in random.choice

2013-08-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: The sticking point is going to be that we don't want to recompute the cumulative weights for every call to weighted_choice. So there should probably be two functions: cw = make_cumulate_weights(weight_list) x = choice(choice_list, cw) This is similar

[issue18898] Apply the setobject optimizations to dictionaries

2013-08-31 Thread Eric Snow
Eric Snow added the comment: +1 This is worth trying. -- nosy: +Mark.Shannon, eric.snow ___ Python tracker ___ ___ Python-bugs-list ma

[issue18844] allow weights in random.choice

2013-08-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 for the overall idea. I'll take a detailed look at the patch when I get a chance. -- assignee: -> rhettinger ___ Python tracker ___ ___

[issue18826] reversed() requires a sequence - Could work on any iterator?

2013-08-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry, Guido rejected this idea a long time ago. We do have the __reversed__ hook so you can add reverse iteration to your own classes where it makes sense. Doing it in the general case is more problematic. Some data sources such as generators can't be ru

[issue18882] Add threading.main_thread() function

2013-08-31 Thread Andrew Svetlov
Andrew Svetlov added the comment: Uploaded new patch. > - the doc addition needs a "versionadded" tag Fixed. > - "The main thread is the thread that the OS creates to run application.": I > would rephrase this "In normal conditions, the main thread is the thread from > which the Python interp

[issue18898] Apply the setobject optimizations to dictionaries

2013-08-31 Thread Raymond Hettinger
New submission from Raymond Hettinger: Once http://bugs.python.org/issue18835 is resolved, I would like to see the various set optimizations applied to dictionaries as well: * Move the key before the hash in the dict struct (the key is accessed more frequently in the code and being in the firs

[issue11798] Test cases not garbage collected after run

2013-08-31 Thread Andrew Svetlov
Andrew Svetlov added the comment: Now 'regrtest.py -j4 -R : ' passes. Do we need to add parameter for disabling tests cleanup to TestSuite, TestLoader and TestProgrm constructors? -- ___ Python tracker ___

[issue18896] Remove namedtuple 255 arguments restriction

2013-08-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: I would like to see the limitation removed. IIRC, Guido has said the same. That said, the limitation isn't due to anything in the namedtuple code. Instead, it is due to a CPython bytecode implementation detail that limits all function/method definitions t

[issue11798] Test cases not garbage collected after run

2013-08-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 39781c3737f8 by Andrew Svetlov in branch 'default': Issue #11798: fix tests for regrtest -R : http://hg.python.org/cpython/rev/39781c3737f8 -- ___ Python tracker _

[issue11798] Test cases not garbage collected after run

2013-08-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7035b5d8fc0f by Tim Peters in branch 'default': Back out 868ad6fa8e68 - it left all the buildbots failing. http://hg.python.org/cpython/rev/7035b5d8fc0f -- ___ Python tracker

[issue11798] Test cases not garbage collected after run

2013-08-31 Thread Tim Peters
Tim Peters added the comment: All the buildbots are failing due to changeset 868ad6fa8e68 - I'm going to back it out. -- nosy: +tim.peters ___ Python tracker ___ ___

[issue18835] Add aligned memory variants to the suite of PyMem functions/macros

2013-08-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: Attaching a patch for what I would like to do with the alignment functions and macros. -- keywords: +patch Added file: http://bugs.python.org/file31543/align.diff ___ Python tracker

[issue18592] IDLE: Unit test for SearchDialogBase.py

2013-08-31 Thread Phil Webster
Phil Webster added the comment: Added tests for labels, a mock function for widget creation, a back option for radiobuttontests, and the docstring fixes that Terry mentioned. -- Added file: http://bugs.python.org/file31542/18592_test_searchdialog2.diff _

[issue18896] Remove namedtuple 255 arguments restriction

2013-08-31 Thread R. David Murray
Changes by R. David Murray : -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue18745] Test enum in test_json is ignorant of infinity value

2013-08-31 Thread Ethan Furman
Ethan Furman added the comment: Fixed formatting in patch. ;) -- Added file: http://bugs.python.org/file31541/issue18745.stoneleaf.02.patch ___ Python tracker ___ __

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 058cb219b3b5 by Ethan Furman in branch 'default': Close #18738: Route __format__ calls to mixed-in type for mixed Enums (such as IntEnum). http://hg.python.org/cpython/rev/058cb219b3b5 -- nosy: +python-dev resolution: -> fixed stage: patc

[issue18335] Add textwrap.dedent, .indent, as str methods.

2013-08-31 Thread Martin Panter
Martin Panter added the comment: If this goes ahead, would a bytes.dedent() method be also considered? I recently discovered that textwrap.dedent() does not work on bytes() in Python 3. I would have used it for the contents of an input file in a test case. For the record there’s an older issue

[issue18843] Py_FatalError (msg=0x7f0e3b373232 "bad leading pad byte") at Python-2.7.5/Python/pythonrun.c:1689

2013-08-31 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: Yeah, hope is a good thing. But I've spent the last 20 years debugging an X11 application based on a Lisp interpreter, I save hope for fireflies, my dog, and my daughter these days. :-) To the OP: I don't follow Gentoo closely, but I have acquaintances

[issue18843] Py_FatalError (msg=0x7f0e3b373232 "bad leading pad byte") at Python-2.7.5/Python/pythonrun.c:1689

2013-08-31 Thread Tim Peters
Tim Peters added the comment: Thanks for that, Stephen! I don't know of anything else you could try that would be helpful. The OP doesn't appear able to reproduce his problems either, and last I heard he was off running `emerge` under DUMA: http://duma.sourceforge.net/ Why? Hope spring

[issue18835] Add aligned memory variants to the suite of PyMem functions/macros

2013-08-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Adding yet another API to allocate memory has a cost Please don't FUD this one to death. Aligned memory access is sometimes important and we currently have no straight-forward way to achieve it. If you're truly worried about adding single new function t

[issue18835] Add aligned memory variants to the suite of PyMem functions/macros

2013-08-31 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- Removed message: http://bugs.python.org/msg196692 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue18835] Add aligned memroy variants to the suite of PyMem functions/macros

2013-08-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Adding yet another API to allocate memory has a cost Please don't FUD this one to death. Aligned memory access is sometimes important and we currently have no straight-forward way to achieve it. If you're truly worried about adding single new function t

[issue18835] Add aligned memory variants to the suite of PyMem functions/macros

2013-08-31 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- title: Add aligned memroy variants to the suite of PyMem functions/macros -> Add aligned memory variants to the suite of PyMem functions/macros ___ Python tracker

[issue18843] Py_FatalError (msg=0x7f0e3b373232 "bad leading pad byte") at Python-2.7.5/Python/pythonrun.c:1689

2013-08-31 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: OK, I backed off the aggressive CFLAGS/CXXFLAGS to " -ggdb -pipe", and ran "emerge =dev-lang/python-2.7.5-r1" *once* each with and without the 'EXTRA_ECONF="--with-pydebug"' flag. Compiled with GCC 4.7.3. No crash, same test results as described previous

[issue17628] str==str: compare the first character before calling memcmp()

2013-08-31 Thread Martin Mokrejs
Martin Mokrejs added the comment: Regarding benchmarking and code performance inspection, maybe you want to try on your linux box: perf top perf stat /usr/bin/python mytest.py http://perf.wiki.kernel.org/ -- nosy: +mmokrejs ___ Python tracker

[issue18897] Illegal instruction at Python-2.7.5/Modules/_sre.c:1173

2013-08-31 Thread Tim Peters
Tim Peters added the comment: Note this line in your first post: DUMA Aborting: mprotect() failed: Cannot allocate memory. Python never calls mprotect(), but DUMA() probably does. Also note what it said after that: Check README section 'MEMORY USAGE AND EXECUTION SPEED' if your (Li

[issue18897] Illegal instruction at Python-2.7.5/Modules/_sre.c:1173

2013-08-31 Thread Martin Mokrejs
Martin Mokrejs added the comment: I was actually printing every 10 seconds how much memory it was using, the last before got killed was: PIDVSZ RSS TIME ELAPSED %CPU %MEM COMMAND 4097 4938188 2445712 00:22:4425:04 90.7 15.0 /usr/bin/python2.7 /usr/bin/emerge dev-lang/pytho

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-31 Thread Eric V. Smith
Eric V. Smith added the comment: Looks good to me, too. Thanks for considering all of the feedback! -- ___ Python tracker ___ ___ Pyth

[issue18897] Illegal instruction at Python-2.7.5/Modules/_sre.c:1173

2013-08-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is a malloc() failure, not a Python bug ("DUMA Aborting: mprotect() failed: Cannot allocate memory"). Line 1173 in _sre.c allocates a fixed-sized structure (SRE_REPEAT): ctx->u.rep = (SRE_REPEAT*) PyObject_MALLOC(sizeof(*ctx->u.rep)); That st

[issue18897] Illegal instruction at Python-2.7.5/Modules/_sre.c:1173

2013-08-31 Thread Martin Mokrejs
Martin Mokrejs added the comment: To a naive user two places with numbers are in the stacktrace: size = -1282872823 and instr_ub = -1 instr_lb = 0 instr_prev = -1 -- ___ Python tracker ___

[issue18897] Illegal instruction at Python-2.7.5/Modules/_sre.c:1173

2013-08-31 Thread Martin Mokrejs
New submission from Martin Mokrejs: I was trying to use DUMA to find errors in python runtime and it indeed killed python-based utility called emerge. Let's see what you say now: # export LD_PRELOAD=/usr/lib64/libduma.so.0.0.0 # sysctl -w vm.max_map_count=100 # emerge dev-lang/python:2.7

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-31 Thread Eli Bendersky
Eli Bendersky added the comment: lgtm -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue18720] Switch suitable constants in the socket module to IntEnum

2013-08-31 Thread Eli Bendersky
Eli Bendersky added the comment: On Sat, Aug 31, 2013 at 3:18 PM, Ethan Furman wrote: > > Ethan Furman added the comment: > > Eli Bendersky added the comment: > > > > Another issue is _intenum_converter. Ethan - do you think it belongs in > the enum module as a helper function or something of th

[issue18730] suffix parameter in NamedTemporaryFile silently fails when not prepending with a period

2013-08-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4d604f1f0219 by Eli Bendersky in branch 'default': Update whatsnew/3.4.rst wrt. the socket constants switch to IntEnum http://hg.python.org/cpython/rev/4d604f1f0219 -- nosy: +python-dev ___ Python tracker

[issue18720] Switch suitable constants in the socket module to IntEnum

2013-08-31 Thread Ethan Furman
Ethan Furman added the comment: Eli Bendersky added the comment: > > Another issue is _intenum_converter. Ethan - do you think it belongs in the > enum module as a helper function or something of the sort? I'm fine with it being a non-public member of enum, although if we had a place for misce

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-31 Thread Ethan Furman
Ethan Furman added the comment: Okay, the final final patch. ;) -- Added file: http://bugs.python.org/file31539/issue18738.stoneleaf.05.patch ___ Python tracker ___

[issue18720] Switch suitable constants in the socket module to IntEnum

2013-08-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 038543d34166 by Eli Bendersky in branch 'default': Switch the AF_* and SOCK_* constants in the socket module to IntEnum. http://hg.python.org/cpython/rev/038543d34166 -- nosy: +python-dev resolution: -> fixed stage: patch review -> committe

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-31 Thread Ethan Furman
Ethan Furman added the comment: Thanks, Eric, for teaching me a bunch about format. :) -- ___ Python tracker ___ ___ Python-bugs-list

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-31 Thread Ethan Furman
Ethan Furman added the comment: Final (hopefully ;) patch attached. Thanks, Eli, for your comments and help. -- Added file: http://bugs.python.org/file31538/issue18738.stoneleaf.04.patch ___ Python tracker ___

[issue18831] importlib.import_module() bypasses builtins.__import__

2013-08-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: Looking at the actual doc: "importlib.__import__(name, globals=None, locals=None, fromlist=(), level=0) An implementation of the built-in __import__() function." I think this is pretty clear that builtin.__import__ has no effect unless directly called. "impor

[issue12037] test_email failures under desktop Windows

2013-08-31 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed title: test_email failures under Windows with the eol extension activated -> test_email failures under desktop Windows ___ Python t

[issue12037] test_email failures under Windows with the eol extension activated

2013-08-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5600e9a5c35d by Terry Jan Reedy in branch 'default': Issue #12037: Fix test_email for desktop Windows. http://hg.python.org/cpython/rev/5600e9a5c35d -- ___ Python tracker

[issue12037] test_email failures under Windows with the eol extension activated

2013-08-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset f0eedca4b2a2 by Terry Jan Reedy in branch '3.3': Issue #12037: Fix test_email for desktop Windows. http://hg.python.org/cpython/rev/f0eedca4b2a2 -- nosy: +python-dev ___ Python tracker

[issue18808] Thread.join returns before PyThreadState is destroyed

2013-08-31 Thread Tim Peters
Tim Peters added the comment: I'm getting a headache now - LOL ;-) Thanks for the explanation! What I still don't understand: the new lock is an internal implementation detail. How would it gain a weakref with a callback? Users aren't going to mess with this lock, and if you want to stop P

[issue18831] importlib.import_module() bypasses builtins.__import__

2013-08-31 Thread Brett Cannon
Brett Cannon added the comment: help(__import__) doesn't mention anything about overriding the function. I already touched up the stdlib docs for builtins.__import__ to strongly advise you don't override the function. As for overriding importlib.__import__, it won't do anything; the code for

[issue18489] IDLE Unit test for SearchEngine.py

2013-08-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: By masking mock Text.index with instance functions, I removed the need for tk.Text and hence the tests are gui free. -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Pyth

[issue18489] IDLE Unit test for SearchEngine.py

2013-08-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4179e2312089 by Terry Jan Reedy in branch '2.7': Issue #18489: Add complete, gui-free tests for idlelib.SearchEngine. http://hg.python.org/cpython/rev/4179e2312089 New changeset dfbf0f9034cc by Terry Jan Reedy in branch '3.3': Issue #18489: Add comp

[issue18780] SystemError when formatting int subclass

2013-08-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 833246d42825 by Ethan Furman in branch 'default': Issue #18780: code cleanup. http://hg.python.org/cpython/rev/833246d42825 -- ___ Python tracker _

[issue18896] Remove namedtuple 255 arguments restriction

2013-08-31 Thread Alori
Alori added the comment: @pitrou: Thank you for your answer. I agree they should not replace databases or files, but I think 255 is just way too lightweight. It feels unnatural to have this limitation for no specific reason. Recently, I've seen a lot of solutions that emulate the namedtuple

[issue18876] Problems with files opened in append mode with io module

2013-08-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the patch. It looks mostly ok. Could you sign a contributor agreement so that we can move forward? http://www.python.org/psf/contrib/ -- ___ Python tracker _

[issue18100] socket.sendall() cannot send buffers of 2GB or more

2013-08-31 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue12304] expose signalfd(2) in the signal module

2013-08-31 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue11798] Test cases not garbage collected after run

2013-08-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: Er... your latest commit broke this issue's own tests! -- nosy: +pitrou ___ Python tracker ___ ___ P

[issue18896] Remove namedtuple 255 arguments restriction

2013-08-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'll let Raymond give his answer here, but namedtuples are meant as lightweight structures or records (if you know C, think "struct"), not arbitrary containers. -- nosy: +pitrou, rhettinger ___ Python tracker

[issue18896] Remove namedtuple 255 arguments restriction

2013-08-31 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue18885] handle EINTR in the stdlib

2013-08-31 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue18808] Thread.join returns before PyThreadState is destroyed

2013-08-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, here is a new patch observing the timeout parameter. I've changed the implementation strategy a bit, it seems hopefully sane. There's a remaining (slightly bordeline) issue: the thread state lock isn't reinitialized on fork(). Should it? -- Added

[issue17276] HMAC: deprecate default hash

2013-08-31 Thread Gregory P. Smith
Gregory P. Smith added the comment: comments added to the review. I don't think a DeprecationWarning should be raised as that'll infuriate users of python programs more than developers who can fix code. -- ___ Python tracker

[issue18885] handle EINTR in the stdlib

2013-08-31 Thread Gregory P. Smith
Gregory P. Smith added the comment: I wrote too many words. In short: time.sleep()'s behavior should remain as it is today given how it is documented to behave. If you disagree, consider adding an optional interruptable=False parameter so that both behavior options exist. ALL IO calls and w

[issue18896] Remove namedtuple 255 arguments restriction

2013-08-31 Thread Alori
New submission from Alori: Named tuples offer a useful mix of features from both dict and tuple data structures. However, unlike dictionaries and tuples, Named tuples are only allowed to hold up to 255 items. This behavior seems inconsistent and un-Pythonic. Is there a way to remove this restr

[issue11798] Test cases not garbage collected after run

2013-08-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 868ad6fa8e68 by Andrew Svetlov in branch 'default': Temporary disable tests cleanup (issue 11798). http://hg.python.org/cpython/rev/868ad6fa8e68 -- ___ Python tracker

[issue18882] Add threading.main_thread() function

2013-08-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, some comments about the patch (no "review" links appears so I'm gonna do it inline here): - the doc addition needs a "versionadded" tag - "The main thread is the thread that the OS creates to run application.": I would rephrase this "In normal conditions,

[issue18843] Py_FatalError (msg=0x7f0e3b373232 "bad leading pad byte") at Python-2.7.5/Python/pythonrun.c:1689

2013-08-31 Thread Tim Peters
Tim Peters added the comment: Someone may find the new stress.valgrind.stderr interesting, but - since I've never used valgrind - it doesn't mean much to me. I _expected_ you'd run the little stress program under a debug Python and without valgrind, since that's the only combination you've tri

[issue18843] Py_FatalError (msg=0x7f0e3b373232 "bad leading pad byte") at Python-2.7.5/Python/pythonrun.c:1689

2013-08-31 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: I did "emerge =dev-lang/python-2.7.5-r1" *twice* with the environment configuration described in msg196520, then *once* with it disabled because one of the cases you described was when you tried to revert to a non-debug Python. (Besides, I am willing to

[issue18889] test_sax: multiple failures on Windows desktop

2013-08-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: As I said on #12037, I would rather \r was not in the file. I do not know if it is present in the master repository or added by hg when cloning. Buildbots and developer desktops are different environments. The tests must work on both. Nit 1: right, I should h

[issue16853] add a Selector to the select module

2013-08-31 Thread Guido van Rossum
Guido van Rossum added the comment: Hm... I like the [] return just fine, it matches what Tulip's selector did. The framework should be re-checking the clock anyway -- it's possible that select() returned late too... -- ___ Python tracker

[issue18885] handle EINTR in the stdlib

2013-08-31 Thread Guido van Rossum
Guido van Rossum added the comment: On Sat, Aug 31, 2013 at 9:56 AM, Charles-François Natali wrote: > > Charles-François Natali added the comment: > > Gregory, thanks, that's what I was planning to do. > > But since the recent discussions (mainly on selectors), there are points I > obviously do

[issue18780] SystemError when formatting int subclass

2013-08-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 33727fbb4668 by Ethan Furman in branch 'default': Close #18780: %-formatting now prints value for int subclasses with %d, %i, and %u codes. http://hg.python.org/cpython/rev/33727fbb4668 -- nosy: +python-dev resolution: -> fixed stage: patc

[issue16853] add a Selector to the select module

2013-08-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Here's a patch returning [] on EINTR. Hmm... Shouldn't it simply let the InterruptedError bubble up? I know there's the sleep() precedent, but I find it a bit embarassing actually: the call can return early, but there's no way for the caller to know that it

[issue18831] importlib.import_module() bypasses builtins.__import__

2013-08-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: Adding something like '(not builtins.__import__)' or '(different from builtins.__import__') after 'importlib.__import__' should reduce the possibility of confusing the two and expecting something that will not happen. You might check the doc for (builtins.)__i

[issue16853] add a Selector to the select module

2013-08-31 Thread Charles-François Natali
Charles-François Natali added the comment: Here's a patch returning [] on EINTR. I've tested it on Linux, Windows, FreeBSD, OpenSolaris and OS-X. -- Added file: http://bugs.python.org/file31536/selectors-15.diff ___ Python tracker

[issue18885] handle EINTR in the stdlib

2013-08-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: > FWIW, there are times when we *want* the interrupted system call to > return control to Python rather than retrying the call. I'm a bit curious, do you know of any use cases? > If someone is making a Python equivalent of the low level system call > such as se

[issue18885] handle EINTR in the stdlib

2013-08-31 Thread Charles-François Natali
Changes by Charles-François Natali : -- nosy: -neologix ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue18885] handle EINTR in the stdlib

2013-08-31 Thread Charles-François Natali
Charles-François Natali added the comment: Gregory, thanks, that's what I was planning to do. But since the recent discussions (mainly on selectors), there are points I obviously don't - and won't - agree with (such as select() returning EINTR or returning early, same for sleep()), I'm not int

[issue18885] handle EINTR in the stdlib

2013-08-31 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue18885] handle EINTR in the stdlib

2013-08-31 Thread Gregory P. Smith
Gregory P. Smith added the comment: FYI - use the changes made in http://bugs.python.org/issue12268 as a guide for how to deal with EINTR properly at the C level. See the _PyIO_trap_eintr() function for example. See also _eintr_retry_call() in Lib/subprocess.py. FWIW, there are times when we

[issue18882] Add threading.main_thread() function

2013-08-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Library (Lib) nosy: +serhiy.storchaka stage: -> patch review type: -> enhancement ___ Python tracker ___ _

[issue18895] In unittest.TestResult.addError split the sentence

2013-08-31 Thread py.user
New submission from py.user: http://docs.python.org/3/library/unittest.html#unittest.TestResult.addError -- assignee: docs@python components: Documentation files: issue.diff keywords: patch messages: 196645 nosy: docs@python, py.user priority: normal severity: normal status: open title:

[issue18894] In unittest.TestResult.failures remove deprecated fail* methods

2013-08-31 Thread py.user
New submission from py.user: http://docs.python.org/3/library/unittest.html#unittest.TestResult.failures -- assignee: docs@python components: Documentation files: issue.diff keywords: patch messages: 196644 nosy: docs@python, py.user priority: normal severity: normal status: open title:

[issue18823] Idle: use pipes instead of sockets to talk with user subprocess

2013-08-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue18891] Master patch for content manager addtion to email package.

2013-08-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue18889] test_sax: multiple failures on Windows desktop

2013-08-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Why Lib/test/xmltestdata/test.xml.out contains '\r'? AFAIK Windows buildbots are happy with current tests. A nitpick for first proposed solution: you can append ".replace(b'\r', b'')" just to "f.read()". A nitpick for second proposed solution: encoding shou

[issue18889] test_sax: multiple failures on Windows desktop

2013-08-31 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +brian.curtin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue18889] test_sax: multiple failures on Windows desktop

2013-08-31 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue18889] test_sax: multiple failures on Windows desktop

2013-08-31 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- components: +Tests stage: commit review -> patch review ___ Python tracker ___ ___ Python-bugs-list mai

[issue18623] Factor out the _SuppressCoreFiles context manager

2013-08-31 Thread Valerie Lambert
Valerie Lambert added the comment: Running through both your scripts on my machine (using Ubuntu) WCOREDUMP is always True (though I'll only be able to find a core file when ulimit is set to unlimited, as expected). Because there doesn't seem to be a good way to test this, I've cut the test f

[issue16853] add a Selector to the select module

2013-08-31 Thread Guido van Rossum
Guido van Rossum added the comment: > Charles-François Natali added the comment: > Well, I'll change it, but: > We have to change the select() docstring to "Wait until some > registered file objects become ready, or for *at most* timeout > seconds" Doesn't sound so bad to me. It's about the sam

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-31 Thread Eli Bendersky
Eli Bendersky added the comment: The idea looks reasonable. Posted a code review. -- ___ Python tracker ___ ___ Python-bugs-list maili

[issue17741] event-driven XML parser

2013-08-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1faaec66c73d by Eli Bendersky in branch 'default': Fix XMLPullParser documentation to say "non-blocking" instead of "asynchronous". http://hg.python.org/cpython/rev/1faaec66c73d -- ___ Python tracker

[issue18843] Py_FatalError (msg=0x7f0e3b373232 "bad leading pad byte") at Python-2.7.5/Python/pythonrun.c:1689

2013-08-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hardware failures or glitches can involve any number of parameters. Instead of trying to reproduce the memory corruption with other Python programs, I would suggest you run the exact same workload (including Python version and build options) on another computer

[issue18831] importlib.import_module() bypasses builtins.__import__

2013-08-31 Thread Brett Cannon
Brett Cannon added the comment: builtins.__import__ and importlib.__import__ are different objects. This isn't about whether this is whole situation is a bug per-se, but whether users expect that overriding builtins.__import__ will affect all import-related code in the stdlib and if that's rea

[issue18843] Py_FatalError (msg=0x7f0e3b373232 "bad leading pad byte") at Python-2.7.5/Python/pythonrun.c:1689

2013-08-31 Thread Martin Mokrejs
Martin Mokrejs added the comment: So with your test program I did not yet hit the error. It used in the end 1.3GB of RAM, maybe in the good region. while this was python-2.7.5 configures as --without-pymalloc maybe the output from valgrind becomes more useful. -- Added file: http://bug

[issue12304] expose signalfd(2) in the signal module

2013-08-31 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- versions: +Python 3.4 -Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16853] add a Selector to the select module

2013-08-31 Thread Charles-François Natali
Charles-François Natali added the comment: > I may be missing something here but isn't the whole point of EINTR to > interrupt a potentially long running syscall? No. EINTR is an artifact of the early Unix design, because failing when a signal was delivered was simpler than restarting the sysca

[issue16853] add a Selector to the select module

2013-08-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: > All the event loops I'm familiar with (twisted, tornado and asyncore) > just 'return' on EINTR, supposedly because that was the best > compromise to support syscall interruption without forcing users to > handle EINTR themselves. What do you mean? Tornado simp

  1   2   >