[issue21332] subprocess bufsize=1 docs are misleading

2014-05-02 Thread Martin Panter
Martin Panter added the comment: On second thoughts maybe the idea of closing the input is not such a good idea in practice. Once you call os.close() on the file descriptor, that descriptor becomes unallocated, and I can’t see any way to prevent p.stdin.close(), Popen() context, destructors,

[issue21332] subprocess bufsize=1 docs are misleading

2014-05-02 Thread akira
akira added the comment: to be clear: the test itself doesn't use threads, `python -mtest -j0` runs tests using multiple *processes*, not threads. There is no issue. If the test were to run in the presence of multiple threads then the issue would be the *explicit* p.stdin.close() in the test

[issue21414] Add an intersperse function to itertools

2014-05-02 Thread Alexander Boyd
New submission from Alexander Boyd: Itertools would benefit greatly from a function (which I've named intersperse, after Haskell's equivalent) for yielding the items of an iterator with a given value placed between each. Sort of a str.join-like function, but for arbitrary sequences.

[issue15104] Unclear language in __main__ description

2014-05-02 Thread Éric Araujo
Éric Araujo added the comment: Docs and indexing/cross-links in 2.7 should indeed be improved. I had forgotten which of 2.6 or 2.7 added support for executing packages thanks to __main__.py files and the docs don't contain an answer that's comprehensive and easy to find. --

[issue21415] Python __new__ method doc typo (it's a class and not a static method)

2014-05-02 Thread Jurko Gospodnetić
New submission from Jurko Gospodnetić: Doc/reference/datamodel.rst documentation states that the __new__ method is a static method (in Python, not in C!) when it is in fact a class method. A patch has been prepared in the https://bitbucket.org/jurko/cpython repository. branch:

[issue21415] Python __new__ method doc typo (it's a class and not a static method)

2014-05-02 Thread Jurko Gospodnetić
Changes by Jurko Gospodnetić jurko.gospodne...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file35130/81c5ba188805.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21415

[issue21415] Python __new__ method doc typo (it's a class and not a static method)

2014-05-02 Thread Steven D'Aprano
Steven D'Aprano added the comment: Actually, no, it is a staticmethod. See Guido's tutorial from way back in version 2.2: [quote] __new__ is a static method. When defining it, you don't need to (but may!) use the phrase __new__ = staticmethod(__new__), because this is implied by its name (it

[issue21399] inspect and class methods

2014-05-02 Thread Stefan Krah
Stefan Krah added the comment: By default AC emits $type for class methods, see dict_fromkeys in Objects/dictobject.c. Thanks, good choice. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21399

[issue21415] Python __new__ method doc typo (it's a class and not a static method)

2014-05-02 Thread eryksun
eryksun added the comment: I believe that this explains why you have to use this idiom inside __new__ when using super(): def __new__(cls, x): super().__new__(cls, x) Yes, if __new__ is defined and is a function, type_new replaces it with a staticmethod:

[issue21401] python2 -3 does not warn about str/unicode to bytes conversions and comparisons

2014-05-02 Thread Brett Cannon
Brett Cannon added the comment: Yes, that's a possibility if we want to take the route and essentially prevent people from ever explicitly knowing that a str in Python 2 will be a str in Python 3 and they are okay with that. -- ___ Python tracker

[issue6839] zipfile can't extract file

2014-05-02 Thread Jim Jewett
Jim Jewett added the comment: On Fri, May 2, 2014 at 1:14 AM, Adam Polkosnik The problems documented here are related to two cases (both apparently arriving from world of windows): Good! I had thought you had even more! 1. two relative paths with inverted slash in one of them

[issue6839] zipfile can't extract file

2014-05-02 Thread Adam Polkosnik
Adam Polkosnik added the comment: Extraction works fine, the issue was that raise() was creating an exception, and stoping the whole extraction process. When replaced with a warning, everything works fine. -- ___ Python tracker

[issue18604] Consolidate gui available checks in test.support

2014-05-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5f75eadecff1 by Zachary Ware in branch '2.7': Issue #18604: Consolidated checks for GUI availability. http://hg.python.org/cpython/rev/5f75eadecff1 New changeset eb361f69ddd1 by Zachary Ware in branch '3.4': Issue #18604: Consolidated checks for

[issue6839] zipfile can't extract file

2014-05-02 Thread Ethan Furman
Ethan Furman added the comment: Adam Polkasnik said: Extraction works fine, the issue was that raise() was creating an exception, and stopping the whole extraction process. That doesn't make sense. If an exception was stopping the whole extraction process then

[issue14019] Unify tests for str.format and string.Formatter

2014-05-02 Thread Francisco Martín Brugué
Francisco Martín Brugué added the comment: The formatter module was deprecated in Python 3.4 and is scheduled for removal in Python 3.6. See [1] and [2]. --- [1] https://docs.python.org/3/library/formatter.html#module-formatter [2] https://docs.python.org/3/whatsnew/3.4.html#deprecated

[issue21414] Add an intersperse function to itertools

2014-05-02 Thread Chris Rebert
Changes by Chris Rebert pyb...@rebertia.com: -- nosy: +cvrebert ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21414 ___ ___ Python-bugs-list

[issue21413] urllib.request.urlopen dies on non-basic/digest auth schemes

2014-05-02 Thread Chris Rebert
Changes by Chris Rebert pyb...@rebertia.com: -- nosy: +cvrebert ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21413 ___ ___ Python-bugs-list

[issue20544] Use specific asserts in operator tests

2014-05-02 Thread Andrew Svetlov
Andrew Svetlov added the comment: LGTM. Ping? -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20544 ___ ___ Python-bugs-list

[issue21347] Don't use a list argument together with shell=True in subprocess' docs

2014-05-02 Thread Chris Rebert
Changes by Chris Rebert pyb...@rebertia.com: -- nosy: +cvrebert ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21347 ___ ___ Python-bugs-list

[issue21335] Update importlib.__init__ to reset _frozen_importlib's loader to SourceFileLoader

2014-05-02 Thread Brett Cannon
Brett Cannon added the comment: Even with setting SourceFileLoader, you still don't get file lines back. Why? Because all of the constructed objects in _frozen_importlib have their co_filename set before the back-patching in importlib.__init__ and so when the traceback module tries to do its

[issue21347] Don't use a list argument together with shell=True in subprocess' docs

2014-05-02 Thread akira
akira added the comment: I've checked the same documentation patch applies to both default (3.5) and 2.7 branches. There are no more instances of the misleading usage left (after applying the patch). -- ___ Python tracker rep...@bugs.python.org

[issue21416] argparse should accept bytes arguments as originally passed

2014-05-02 Thread Derek Wilson
New submission from Derek Wilson: If I create an argument parser like: parser = argparse.ArgumentParser() parser.add_argument('somebytes', type=bytes, help='i want some bytes') parser.parse_args() the parse_args() call will raise an exception printing usage info indicating that an invalid

[issue21037] add an AddressSanitizer build option

2014-05-02 Thread Stefan Krah
Stefan Krah added the comment: Antoine, if you send me the buildbot credentials, we can get started. Environment vars: CC=clang ASAN_OPTIONS=allocator_may_return_null=1,handle_segv=0 I suggest to compile the release build, just --with-address-sanitizer. --

[issue21397] tempfile.py: Fix grammar in docstring, comment typos

2014-05-02 Thread Éric Araujo
Éric Araujo added the comment: Thanks for the report and patch! I don't really see how just can be interpreted as applying to something else than below, so I'm not sure the wording needs to be changed. The typo should be fixed. -- nosy: +eric.araujo stage: - patch review versions:

[issue21414] Add an intersperse function to itertools

2014-05-02 Thread Éric Araujo
Éric Araujo added the comment: I looked for a previous discussion of this on the Python mailing lists and found nothing. Existing solutions include https://twitter.com/snim2/status/393821419114483712 and

[issue21405] Allow using symbols from Unicode block Superscripts and Subscripts in identifiers

2014-05-02 Thread Éric Araujo
Éric Araujo added the comment: Many features are indeed discussed on this bug tracker, but for a big change like the one you propose we like to reach out to all of python-dev or all people on python-ideas to discuss pros and cons. The devguide should explain this in a little more detail. I

[issue21405] Allow using symbols from Unicode block Superscripts and Subscripts in identifiers

2014-05-02 Thread Éric Araujo
Éric Araujo added the comment: FTR https://docs.python.org/devguide/#proposing-changes-to-python-itself -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21405 ___

[issue21400] Code coverage documentation is out-of-date.

2014-05-02 Thread Éric Araujo
Éric Araujo added the comment: I think Walter is referring to Ned's coverage.py project, i.e. the standard coverage module that you get with pip install coverage. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org

[issue21398] LC_CTYPE=C: pydoc leaves terminal in an unusable state

2014-05-02 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21398 ___ ___ Python-bugs-list mailing

[issue21404] Document options used to control compression level in tarfile

2014-05-02 Thread Éric Araujo
Éric Araujo added the comment: I'm reclassifying this ticket as a doc bug, would you mind opening a separate ticket for zipfile? -- assignee: - docs@python components: +Documentation -Library (Lib) keywords: +easy nosy: +docs@python, eric.araujo stage: - needs patch title:

[issue21391] PATCH: using the abspath shortcut in Lib/shutil

2014-05-02 Thread Éric Araujo
Éric Araujo added the comment: IMO either change would not improve the code at all. Suggest closing this. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21391 ___

[issue21417] Compression level for zipfile

2014-05-02 Thread Sworddragon
New submission from Sworddragon: This is a fork from this ticket: http://bugs.python.org/issue21404 tarfile has a compression level and seems to get now the missing documentation for it. But there is still a compression level missing for zipfile. -- components: Library (Lib) messages:

[issue21417] Compression level for zipfile

2014-05-02 Thread Sworddragon
Changes by Sworddragon sworddrag...@aol.com: -- type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21417 ___ ___ Python-bugs-list

[issue21404] Document options used to control compression level in tarfile

2014-05-02 Thread Sworddragon
Sworddragon added the comment: Sure, here is the new ticket: http://bugs.python.org/issue21417 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21404 ___

[issue21368] Check for systemd locale on startup if current locale is set to POSIX

2014-05-02 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21368 ___ ___ Python-bugs-list

[issue21417] Compression level for zipfile

2014-05-02 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +alanmcintyre stage: - needs patch versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21417 ___

[issue21366] Document that return in finally overwrites prev value

2014-05-02 Thread Éric Araujo
Éric Araujo added the comment: Thanks, your proposed wording sounds good to me. David (picked you seni-randomly as a senior core dev and native speaker), what do you think? -- nosy: +eric.araujo, r.david.murray ___ Python tracker

[issue21413] urllib.request.urlopen dies on non-basic/digest auth schemes

2014-05-02 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +orsenthil versions: -Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21413 ___

[issue13405] Add DTrace probes

2014-05-02 Thread Shawn
Changes by Shawn binarycrusa...@gmail.com: -- nosy: +swalker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13405 ___ ___ Python-bugs-list mailing

[issue21391] PATCH: using the abspath shortcut in Lib/shutil

2014-05-02 Thread Eric V. Smith
Eric V. Smith added the comment: I disagree. It took me longer than I'd like to admit to track down the file history and understand it. I'd like to prevent other people from having to try and understand why it works this way. On the other hand, it looks like people have discovered it:

[issue18604] Consolidate gui available checks in test.support

2014-05-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thank you Zach. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18604 ___ ___ Python-bugs-list mailing list

[issue21366] Document that return in finally overwrites prev value

2014-05-02 Thread R. David Murray
R. David Murray added the comment: The precisionist in me isn't quite happy, but any wording I've come up with to make it more precise isn't as informative :) (The 'real' situation is that the return value of the function is determined by the last return statement executed, which in turn is

[issue21368] Check for systemd locale on startup if current locale is set to POSIX

2014-05-02 Thread Stefan Krah
Stefan Krah added the comment: Why is the default encoding of POSIX wrong on a modern Linux system? Today I installed Debian testing, and the first question of the installer is to choose between C and English locales for the install. This with the remark that the chosen locale will be the

[issue21418] Segv during call to super_init in application embedding Python interpreter.

2014-05-02 Thread Robert Snoeberger
New submission from Robert Snoeberger: While embedding the Python interpreter in an application, I have encountered a crash when the built-in function 'super' is invoked with no arguments. The crash occurs during a call to PyObject_Call. A file is attached, super_invoke.c, that reproduces the

[issue6839] zipfile can't extract file

2014-05-02 Thread Adam Polkosnik
Adam Polkosnik added the comment: Ethan, I'd refer you to msg92309... And When testing with WinZip it looks like this: No errors detected in compressed data of C:\Downloads\test.zip. Testing ... Testing test\OK Testing test\test2.txt OK Testing test1.txt

[issue21398] LC_CTYPE=C: pydoc leaves terminal in an unusable state

2014-05-02 Thread STINNER Victor
STINNER Victor added the comment: LC_CTYPE=C: pydoc leaves terminal in an unusable state In the use case, pydoc doesn't touch the terminal, it's the pager: the program less. I don't see how to ensure that the terminal state is restored, even on error. --

[issue21412] core dump in PyThreadState_Get when built --with-pymalloc

2014-05-02 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21412 ___ ___ Python-bugs-list

[issue21412] core dump in PyThreadState_Get when built --with-pymalloc

2014-05-02 Thread STINNER Victor
STINNER Victor added the comment: LD_LIBRARY_PATH=/builds/jbeck/ul-python-3/components/python/python34/build/sparcv9 ./python -E -S -m sysconfig --generate-posix-vars Fatal Python error: PyThreadState_Get: no current thread Could you please run this command in gdb and copy/paste the C

[issue21393] Python/random.c: close hCryptProv at exit

2014-05-02 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21393 ___

[issue21121] -Werror=declaration-after-statement is added even for extension modules through setup.py

2014-05-02 Thread Stefan Krah
Stefan Krah added the comment: Thanks, Ned. I'm attaching a second version of the existing patch with improved error handling and a fix for test_distutils, which failed. The result is slightly overcomplicated, so I came up with a different approach in issue21121-3.diff. Thoughts? --

[issue21393] Python/random.c: close hCryptProv at exit

2014-05-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8704198680ba by Victor Stinner in branch 'default': Issue #21393: random.c: on Windows, close the hCryptProv handle at exit http://hg.python.org/cpython/rev/8704198680ba -- nosy: +python-dev ___ Python

[issue21121] -Werror=declaration-after-statement is added even for extension modules through setup.py

2014-05-02 Thread Stefan Krah
Changes by Stefan Krah stefan-use...@bytereef.org: Added file: http://bugs.python.org/file35134/issue21121-3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21121 ___

[issue21418] Segv during call to super_init in application embedding Python interpreter.

2014-05-02 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21418 ___ ___ Python-bugs-list

[issue21398] LC_CTYPE=C: pydoc leaves terminal in an unusable state

2014-05-02 Thread Stefan Krah
Stefan Krah added the comment: STINNER Victor rep...@bugs.python.org wrote: I don't see how to ensure that the terminal state is restored, even on error. Python2 suppresses the exception until after normal exit (pressing 'q'). I think that behavior is better. In Python3 you can also get the

[issue21398] LC_CTYPE=C: pydoc leaves terminal in an unusable state

2014-05-02 Thread STINNER Victor
STINNER Victor added the comment: heapq documentation contains François which is not encodable to ASCII. When using LC_ALL=C, the locale encoding is ASCII (at least on Linux). It's not easy to specify a different error handler globally in pydoc, different functions are used and child

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

2014-05-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5b0fda8f5718 by Victor Stinner in branch 'default': Issue #21233: Add new C functions: PyMem_RawCalloc(), PyMem_Calloc(), http://hg.python.org/cpython/rev/5b0fda8f5718 -- nosy: +python-dev ___ Python

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

2014-05-02 Thread STINNER Victor
STINNER Victor added the comment: There is no need to hurry. I changed my mind :-p It should be easier for numpy to test the development version of Python. Let's wait for buildbots. -- ___ Python tracker rep...@bugs.python.org

[issue21419] Use calloc() instead of malloc() for int int (lshift)

2014-05-02 Thread STINNER Victor
New submission from STINNER Victor: Attached patch modifies long_lshift() to allocate the result using calloc() instead of malloc(). The goal is to avoid allocating physical memory for the least significat digits (zeros). According to my tests in issue #21233 (calloc), Linux and Windows have

[issue21419] Use calloc() instead of malloc() for int int (lshift)

2014-05-02 Thread STINNER Victor
STINNER Victor added the comment: bench_long_rshift.py: Microbenchmark for int int (lshift) operation. Results on Linux: Common platform: Bits: int=32, long=64, long long=64, size_t=64, void*=64 Timer info: namespace(adjustable=False, implementation='clock_gettime(CLOCK_MONOTONIC)',

[issue21419] Use calloc() instead of malloc() for int int (lshift)

2014-05-02 Thread Josh Rosenberg
Josh Rosenberg added the comment: Looks like you forgot to actually use the use_calloc parameter you put in the long_alloc prototype. It accepts it, but it's never used or passed to another function. So right now, the only difference in behavior is that there is an extra layer of function

[issue21419] Use calloc() instead of malloc() for int int (lshift)

2014-05-02 Thread Josh Rosenberg
Josh Rosenberg added the comment: Given your benchmarks show improvements (you posted while I was typing my last comment), I'm guessing it's just the posted patch that's wrong, and your local changes actually use use_calloc? -- ___ Python tracker

[issue21419] Use calloc() instead of malloc() for int int (lshift)

2014-05-02 Thread STINNER Victor
STINNER Victor added the comment: Without the patch, 1 (2**29) allocates 69.9 MB. With the patch, 1 (2**29) allocates 0.1 MB (104 KB). Without the patch, $ ./python Python 3.5.0a0 (default:5b0fda8f5718, May 2 2014, 22:47:06) [GCC 4.8.2 20131212 (Red Hat 4.8.2-7)] on linux import os

[issue21419] Use calloc() instead of malloc() for int int (lshift)

2014-05-02 Thread STINNER Victor
STINNER Victor added the comment: Looks like you forgot to actually use the use_calloc parameter you put in the long_alloc prototype. It accepts it, but it's never used or passed to another function. Oh f###, you're right. See new patch. I ran again the new benchmark: my (updated) patch

[issue21419] Use calloc() instead of malloc() for int int (lshift)

2014-05-02 Thread STINNER Victor
STINNER Victor added the comment: Without the patch, 1 (2**29) allocates 69.9 MB. With the patch, 1 (2**29) allocates 0.1 MB (104 KB). This is still true with long_lshift2.patch (except that in my new test, it allocates 196 kB). -- ___ Python

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

2014-05-02 Thread STINNER Victor
STINNER Victor added the comment: Antoine Pitrou wrote: The real use case I envision is with huge powers of two. If I write: x = 2 ** 100 I created the issue #21419 for this idea. -- ___ Python tracker rep...@bugs.python.org

[issue21419] Use calloc() instead of malloc() for int int (lshift)

2014-05-02 Thread Josh Rosenberg
Josh Rosenberg added the comment: While you're doing this, might it make sense to add a special case to long_pow so it identifies cases where a (digit-sized) value with an absolute value equal to a power of 2 is being raised to a positive integer exponent, and convert said cases to equivalent

[issue21419] Use calloc() instead of malloc() for int int (lshift)

2014-05-02 Thread Josh Rosenberg
Josh Rosenberg added the comment: I swear, I need to refresh before I post a long comment. If this is slowing everything down a little just to make 1 (2 ** 29) faster (and did you really mean 1 (1 29) ? :-) ), then I'd say drop it. -- ___ Python

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

2014-05-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 62438d1b11c7 by Victor Stinner in branch 'default': Issue #21233: Oops, Fix _PyObject_Alloc(): initialize nbytes before going to http://hg.python.org/cpython/rev/62438d1b11c7 -- ___ Python tracker

[issue21419] Use calloc() instead of malloc() for int int (lshift)

2014-05-02 Thread Josh Rosenberg
Josh Rosenberg added the comment: One possible way to salvage it: Have you considered declaring long_alloc as Py_LOCAL_INLINE, or, now that I've checked #5553, a macro for long_alloc, so it gets inlined, and doesn't add the check overhead to everything (since properly inlining with a constant

[issue21419] Use calloc() instead of malloc() for int int (lshift)

2014-05-02 Thread Josh Rosenberg
Josh Rosenberg added the comment: And now that I'm thinking about it, the probable cause of the slowdown is that, for any PyLongObject that's smaller than PAGESIZE (give or take), using Calloc means calloc is just calling memset to zero the PyLongObject header and the used part of the high

[issue21420] Optimize 2 ** n: implement it as 1 n

2014-05-02 Thread STINNER Victor
New submission from STINNER Victor: The algorithm for 2 ** n (long_pow) is slower than 1 n algorithm (long_lshift). I propose to compute x**y as 1y if x==2 and y = 0. Attached patch implements this idea. According to my microbenchmark, it is 4x faster to small power (2**0 .. 2**1024) and up

[issue21420] Optimize 2 ** n: implement it as 1 n

2014-05-02 Thread STINNER Victor
STINNER Victor added the comment: Results of bench_pow2.py on Linux. Common platform: CPU model: Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz Platform: Linux-3.13.9-200.fc20.x86_64-x86_64-with-fedora-20-Heisenbug Timer: time.perf_counter Python unicode implementation: PEP 393 Timer info:

[issue21420] Optimize 2 ** n: implement it as 1 n

2014-05-02 Thread STINNER Victor
STINNER Victor added the comment: Oh, the patch implements another micro-optimization: (x 0) is x becomes True. I included it in the same patch to reduce the overhead for 2 ** 0. -- nosy: +josh.rosenberg, pitrou, serhiy.storchaka ___ Python tracker

[issue21420] Optimize 2 ** n: implement it as 1 n

2014-05-02 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21420 ___ ___

[issue21398] LC_CTYPE=C: pydoc leaves terminal in an unusable state

2014-05-02 Thread Stefan Krah
Stefan Krah added the comment: The patch works well BTW. We can create another issue for the general misbehavior of pydoc with other exceptions. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21398

[issue21412] core dump in PyThreadState_Get when built --with-pymalloc

2014-05-02 Thread John Beck
John Beck added the comment: Victor: sure; see attached. -- Added file: http://bugs.python.org/file35140/where.out ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21412 ___

[issue21121] -Werror=declaration-after-statement is added even for extension modules through setup.py

2014-05-02 Thread Éric Araujo
Éric Araujo added the comment: I like issue21121-3.diff. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21121 ___ ___ Python-bugs-list mailing

[issue21385] Compiling modified AST crashes on debug build unless linenumbering discarded

2014-05-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: 3.1 to 3.3 only get internet security patcches, and I don't believe this is such an issue. It is not clear from the title (a statement, not a request) and your text what specific patch you would like. If you want to 'reopen a discussion', please post on

[issue21402] tkinter.ttk._val_or_dict assumes tkinter._default_root exists

2014-05-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: A reference to a non-existent attribute fails no matter who calls the function. Stephen, can you suggest a patch, perhaps based on code in other functions that try to access _default_root? -- nosy: +terry.reedy ___

[issue21414] Add an intersperse function to itertools

2014-05-02 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21414 ___ ___ Python-bugs-list

[issue21352] improve documentation indexing

2014-05-02 Thread Éric Araujo
Éric Araujo added the comment: I have to agree the index pages are often frustrating for me too. Not sure if this involves code changes in Sphinx itself or if we can improve the markup in the Python docs sources. -- nosy: +eric.araujo ___ Python

[issue21421] ABCs for MappingViews should declare __slots__ so subclasses aren't forced to have __dict__/__weakref__

2014-05-02 Thread Josh Rosenberg
New submission from Josh Rosenberg: Unlike the other collections ABCs, MappingView and its subclasses (Keys|Items|Values)View don't define __slots__, so users inheriting them to take advantage of the mix-in methods get a __dict__ and __weakref__, even if they try to avoid it by declaring

[issue21421] ABCs for MappingViews should declare __slots__ so subclasses aren't forced to have __dict__/__weakref__

2014-05-02 Thread Josh Rosenberg
Josh Rosenberg added the comment: Hmm... First patch isn't generating a review diff (I'm guessing because my VM's time sync went farkakte). Trying again. -- Added file: http://bugs.python.org/file35142/slots_for_mappingview_abcs.patch ___ Python

[issue21421] ABCs for MappingViews should declare __slots__ so subclasses aren't forced to have __dict__/__weakref__

2014-05-02 Thread Josh Rosenberg
Changes by Josh Rosenberg shadowranger+pyt...@gmail.com: Removed file: http://bugs.python.org/file35141/slots_for_mappingview_abcs.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21421 ___

[issue21421] ABCs for MappingViews should declare __slots__ so subclasses aren't forced to have __dict__/__weakref__

2014-05-02 Thread Josh Rosenberg
Josh Rosenberg added the comment: I also wrote a slightly more thorough patch that simplifies some of the method implementations (largely just replacing a bunch of for/if/return True/False else return False/True with any/all calls against a generator expression). The one behavior difference

[issue14191] argparse doesn't allow optionals within positionals

2014-05-02 Thread paul j3
paul j3 added the comment: I encountered a conflict when merging this patch with http://bugs.python.org/issue15112. In my first testcase, 'cmd' and 'rest' failed the 'required' test in phase one of 'intermixed'. That's because 15112 postponed parsing them (with nargs=0/suppressed). I got

[issue21368] Check for systemd locale on startup if current locale is set to POSIX

2014-05-02 Thread Nick Coghlan
Nick Coghlan added the comment: That's the problem - even on UTF-8 systems, Linux programs will often be started in a misconfigured environment: the POSIX locale. Python 2 doesn't try to interpret the binary data as text, so it doesn't care. Python 3 *does* care, since it automatically converts

[issue21414] Add an intersperse function to itertools

2014-05-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: What is the use case for interspersing values? I've not run across anything like it ever before. -- assignee: - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21414

[issue21421] ABCs for MappingViews should declare __slots__ so subclasses aren't forced to have __dict__/__weakref__

2014-05-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: At first glance, this seems like a reasonable request. I leave it open for comments for a while before proceeding. -- assignee: - rhettinger components: +Library (Lib) nosy: +rhettinger type: - enhancement versions: +Python 3.5

[issue20544] Use specific asserts in operator tests

2014-05-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: While this looks harmless, I seriously question whether it is an improvement. For example, how is this any better? -self.assertTrue(operator.setitem(a, 0, 2) is None) +self.assertIsNone(operator.setitem(a, 0, 2)) This error message for

[issue20544] Use specific asserts in operator tests

2014-05-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: The generic error message for the first is 'False is not true'. Clear but useless. The error message for the second is the more specific 'representation of object) is not None'. Since the expression was supposed to evaluate to None, but did not, it would be