[issue24446] imap and map inconsistent behaviour

2015-06-13 Thread Ned Deily
Ned Deily added the comment: This is a documented behavior difference in itertools.imap: If function is set to None, then imap() returns the arguments as a tuple. Like map() but stops when the shortest iterable is exhausted instead of filling in None for shorter iterables. The reason for the

[issue24447] tab indentation breaks in tokenize.untokenize

2015-06-13 Thread Dingyuan Wang
New submission from Dingyuan Wang: If a script uses tabs for indentation, tokenize.untokenize won't restore original indentation correctly from the second line of the indentation level, and thus breaks the file. This affects all Python versions. Test code: python2 -c 'import sys, tokenize;

[issue24446] imap and map inconsistent behaviour

2015-06-13 Thread Ned Deily
Ned Deily added the comment: Also note that the behavior of map() in Python 3 has been changed to also stop with the termination of the shortest iterator. https://docs.python.org/3.4/whatsnew/3.0.html#views-and-iterators-instead-of-lists -- ___

[issue24303] OSError 17 due to _multiprocessing/semaphore.c assuming a one-to-one Pid - process mapping.

2015-06-13 Thread Charles-François Natali
Changes by Charles-François Natali cf.nat...@gmail.com: -- keywords: +needs review nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24303 ___

[issue24445] rstrip strips what it doesn't have to

2015-06-13 Thread o1da
o1da added the comment: Ok, thank you. I thought it trims whole sequence or nothing. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24445 ___

[issue24426] re.split performance degraded significantly by capturing group

2015-06-13 Thread Patrick Maupin
Patrick Maupin added the comment: (stuff about cPython) No, I was curious about whether somebody maintained pure-Python fixes (e.g. to the re parser and compiler). Those could be in a regular package that fixed some corner cases such as the capture group you just applied a patch for. ...

[issue24445] rstrip strips what it doesn't have to

2015-06-13 Thread Patrick Maupin
Patrick Maupin added the comment: Example text = 'test1/1.jp2' text.rstrip('.2jp') 'test1/1' -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24445 ___

[issue24445] rstrip strips what it doesn't have to

2015-06-13 Thread Patrick Maupin
Patrick Maupin added the comment: I think you misunderstand rstrip -- it works from the right, and checks to see if the right-most character is in the string you have given it. As long as it is, then it will remove the character and loop -- nosy: +Patrick Maupin

[issue24445] rstrip strips what it doesn't have to

2015-06-13 Thread o1da
New submission from o1da: Python 2.7.6 (default, Mar 22 2014, 22:59:56) [GCC 4.8.2] on linux2 Type help, copyright, credits or license for more information. text = 'test1/1.jp2' text.rstrip('.jp2') 'test1/1' text = 'test1.jp2' text.rstrip('.jp2') 'test1' text = 'test1/2.jp2'

[issue24445] rstrip strips what it doesn't have to

2015-06-13 Thread Martin Panter
Martin Panter added the comment: The 3.5 documentation of str.strip() was recently modified in Issue 24204 due to this kind of misunderstanding. Perhaps other versions should be modified as well, or the str.l/rstrip() methods, or the bytes() and bytearray() methods. See also Issue 23560

[issue795081] email.Message param parsing problem II

2015-06-13 Thread R. David Murray
R. David Murray added the comment: It think the thing to do is to turn it into a test case for both the old and the new parser, and the decide what we want the behavior to be. -- ___ Python tracker rep...@bugs.python.org

[issue24412] setUpClass equivalent for addCleanup

2015-06-13 Thread R. David Murray
R. David Murray added the comment: Not having addClassCleanup means that my setUpClass method will have four try/excepts in it, as will my tearDownClass (I have four fixtures I'm setting up for the tests). So, no, it isn't strictly needed, but it is prettier :). As Robert says, though, it

[issue24412] setUpClass equivalent for addCleanup

2015-06-13 Thread Tal Einat
Tal Einat added the comment: Is this really needed? One can use try/except/raise, and since addClassCleanup() would only be called from setUpClass(), I don't quite see the utility of it. -- nosy: +taleinat ___ Python tracker rep...@bugs.python.org

[issue24421] Race condition compiling Modules/_math.c

2015-06-13 Thread Tal Einat
Tal Einat added the comment: Confirmed on OSX 10.10. Here's my output: running build running build_ext building 'cmath' extension ./slow-cc.py -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Werror=declaration-after-statement -I./Include

[issue24412] setUpClass equivalent for addCleanup

2015-06-13 Thread Tal Einat
Tal Einat added the comment: I'm not convinced this would be worth the effort required to implement and maintain it. Can someone find examples from existing test suites where this would clearly be useful? For example, a setUpClass() or setUpModule() function with multiple try/finally

[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-13 Thread Nick Coghlan
Nick Coghlan added the comment: Regarding the idea of doing a typedef for the new coro type at the C level: looking further at the way the new type integrates with the eval loop, it's essential that they actually retain the exact same memory layout if we don't want to rewrite a whole lot of

[issue24403] Missing fixer for changed round() behavior

2015-06-13 Thread Tal Einat
Tal Einat added the comment: See the existing issue and discussion about this on the six library's issue tracker (opened nearly a year ago): https://bitbucket.org/gutworth/six/issue/94/introduce-sixround -- nosy: +taleinat ___ Python tracker

[issue24412] setUpClass equivalent for addCleanup

2015-06-13 Thread Robert Collins
Robert Collins added the comment: It would be nice for symmetry. I mean, setUpClass isn't needed either, and we have it ;). however, we actually have two contexts this would be called from - setUpClass and setUpModule; both share their internals. So we probably need a decoupled cleanups

[issue24412] setUpClass equivalent for addCleanup

2015-06-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: addCleanup() is helpful because it can be used in test methods. addClassCleanup() and addModuleCleanup() can't be used in test methods, and setUpClass() and setUpModule() are used less than setUp(), therefore the benefit of these methods are less than of

[issue24435] Grammar/Grammar points to outdated guide

2015-06-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4ba334ed3bb7 by Berker Peksag in branch '3.4': Issue #24435: Use the devguide link instead of PEP 306 in Grammar/Grammar. https://hg.python.org/cpython/rev/4ba334ed3bb7 New changeset 1622bc1af766 by Berker Peksag in branch '3.5': Issue #24435: Use

[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-13 Thread Stefan Behnel
Stefan Behnel added the comment: I agree that a typedef is a good idea. It doesn't cost anything but gives us more freedom for future changes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24400

[issue795081] email.Message param parsing problem II

2015-06-13 Thread Milan Oberkirch
Milan Oberkirch added the comment: Is this still relevant? I just made a patch based on the suggestions discussed and it does not change the behavior of the original bug report (but fixed the bug regarding '' mentioned by tony_nelson). Maybe I'm missing something? -- keywords:

[issue24443] Link for clear and wait missing in EventObjects

2015-06-13 Thread Jaivish Kothari
New submission from Jaivish Kothari: https://docs.python.org/2/library/threading.html#threading.Event.set links missing for wait and clear . set() is linked though. Line: An event object manages an internal flag that can be set to true with the set() method and reset to false with the

[issue24443] Link for clear and wait missing in EventObjects

2015-06-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset a985b6455fde by Berker Peksag in branch '2.7': Issue #24443: Fix links for Event.clear() and Event.wait() methods. https://hg.python.org/cpython/rev/a985b6455fde -- nosy: +python-dev ___ Python tracker

[issue24444] In argparse empty choices cannot be printed in the help

2015-06-13 Thread py.user
New submission from py.user: import argparse parser = argparse.ArgumentParser() _ = parser.add_argument('foo', choices=[], help='%(choices)s') parser.print_help() Traceback (most recent call last): File stdin, line 1, in module File

[issue24435] Grammar/Grammar points to outdated guide

2015-06-13 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report, Chris. -- nosy: +berker.peksag resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24435

[issue24429] msvcrt error when embedded

2015-06-13 Thread Steve Dower
Steve Dower added the comment: About the only possible solution here would be to special case ctypes to detect msvcr90 as a parameter (later versions of the CRT don't need it) and also whether another activation context already exists. We could also document the need for a complete manifest

[issue23992] multiprocessing: MapResult shouldn't fail fast upon exception

2015-06-13 Thread Charles-François Natali
Changes by Charles-François Natali cf.nat...@gmail.com: -- keywords: +needs review nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23992 ___

[issue24127] Fatal error in launcher: Job information querying failed

2015-06-13 Thread Henrik Heimbuerger
Henrik Heimbuerger added the comment: I can still reproduce this on the just released Windows 10 build 10130, after python -m pip uninstall pip and then python get-pip.py (which recreated the pip.exe binary for pip 7.0.3). Is there anything else I need to do to make this work now? --

[issue24426] re.split performance degraded significantly by capturing group

2015-06-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a reason to file a feature request to regex. In 3.3 re was slower than regex in some cases: $ ./python -m timeit -s import re; p = re.compile('\n\r'); s = ('a'*100 + '\n\r')*1000 -- p.split(s) Python 3.3 re : 1000 loops, best of 3: 952 usec per

[issue24443] Link for clear and wait missing in EventObjects

2015-06-13 Thread Jaivish Kothari
Jaivish Kothari added the comment: My Pleasure sir :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24443 ___ ___ Python-bugs-list mailing list

[issue23275] Can assign [] = (), but not () = []

2015-06-13 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the reviews. Here is an updated patch. -- Added file: http://bugs.python.org/file39703/issue23275_v2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23275

[issue24426] re.split performance degraded significantly by capturing group

2015-06-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 1) Do you know if anybody maintains a patched version of the Python code anywhere? I could put a package up on github/PyPI, if not. Sorry, perhaps I misunderstood you. There are unofficial mirrors of CPython on Bitbucket [1] and GitHub [2]. They don't

[issue24412] setUpClass equivalent for addCleanup

2015-06-13 Thread Tal Einat
Tal Einat added the comment: Ahh, that makes sense. Sounds good to me! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24412 ___ ___

[issue24429] msvcrt error when embedded

2015-06-13 Thread Steve Dower
Steve Dower added the comment: i'm not following why it's a special case, or why later versions wouldn't have the same problem? The Microsoft C Runtime 9.0 required an activation context to allow multiple versions to load side by side. This turned out to be more trouble than it was worth,