[issue22845] Minor tweaks dis documentation

2014-11-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset d676f2725699 by Serhiy Storchaka in branch '3.4': Issue #22845: Improved formatting of dis documentation. https://hg.python.org/cpython/rev/d676f2725699 New changeset ac0334665459 by Serhiy Storchaka in branch 'default': Issue #22845: Improved

[issue22845] Minor tweaks dis documentation

2014-11-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Done. Thank you Georg for your review. -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22845

[issue22846] distutils needlessly fails to build apsw

2014-11-11 Thread Mark Summerfield
New submission from Mark Summerfield: When I try to build APSW (http://rogerbinns.github.io/apsw/index.html) with Python 3.3 or 3.4 on Debian stable 64-bit I get the error output shown below. I dug into the source and it seems that the problem is that distutils/ccompiler.py's

[issue22823] Use set literals instead of creating a set from a list

2014-11-11 Thread Larry Hastings
Larry Hastings added the comment: The patch is totally fine. I wonder why it was like that in the first place! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22823 ___

[issue22843] doc error: 6.2.4. Match Objects

2014-11-11 Thread Georg Brandl
Georg Brandl added the comment: evaluates true should not be used in any case, the objects do not equal to True in any case. The phrase is considered true in a boolean context is already in the docs and could be used here too. -- nosy: +georg.brandl

[issue22846] distutils needlessly fails to build apsw

2014-11-11 Thread Ned Deily
Ned Deily added the comment: Have you reported this problem to the author of apsw? It seems like figuring out why apsw is apparently creating an incorrect setup.py configuration should be a first step before suggesting a change to Distutils. You might want to supply the values from your

[issue22846] distutils needlessly fails to build apsw

2014-11-11 Thread Ned Deily
Ned Deily added the comment: Another data point: apsw appears to build OK on OS X with a MacPorts-supplied icu, including icu-config. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22846

[issue22846] distutils needlessly fails to build apsw

2014-11-11 Thread Mark Summerfield
Mark Summerfield added the comment: The first person I asked was the author of APSW (Roger Binns). He told me: The ultimate cause of that is some interaction with the compilation environment. Some sort of CFLAGS is ultimately ending up in some Python code like above when it should be [

[issue22846] distutils needlessly fails to build apsw

2014-11-11 Thread Mark Summerfield
Mark Summerfield added the comment: Here are the flags you asked for: $ icu-config --cppflags -D_FORTIFY_SOURCE=2 -D_REENTRANT -I/usr/include $ icu-config --ldflags -Wl,-z,relro -ldl -lm -L/usr/lib/x86_64-linux-gnu -licui18n -licuuc -licudata -ldl -lm --

[issue22835] urllib2/httplib is rendering 400s for every authenticated-SSL request, suddenly

2014-11-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 11/11/2014 07:50, Dustin Oprea a écrit : Dustin Oprea added the comment: I think I was getting mixed results by using requests and urllib2/3. After nearly being driven crazy, I performed the following steps: 1. Recreated client certificates, and

[issue22846] distutils needlessly fails to build apsw

2014-11-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Shouldn't this be fixed in the APSW setup.py ? The patch is you are proposing looks harmless, but it can also mask programming errors in setup.py. -- nosy: +lemburg ___ Python tracker rep...@bugs.python.org

[issue22846] distutils needlessly fails to build apsw

2014-11-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: The ultimate cause of that is some interaction with the compilation environment. Some sort of CFLAGS is ultimately ending up in some Python code like above when it should be [ ('_FORTIFY_SOURCE', '2') ]. Note this is not part of the APSW source - it is

[issue22846] distutils needlessly fails to build apsw

2014-11-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: I suggest closing. -- nosy: +ncoghlan resolution: - not a bug status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22846 ___

[issue22846] distutils needlessly fails to build apsw

2014-11-11 Thread Ned Deily
Ned Deily added the comment: I was able to reproduce the behavior you saw with an older Debian system. The following patch to the apsw setup.py file seems to fix the problem: --- apsw-3.8.7.1-r1/setup.py2014-11-04 19:23:36.0 -0800 +++ apsw-3.8.7.1-r1_PATCHED/setup.py2014-11-11

[issue22846] distutils needlessly fails to build apsw

2014-11-11 Thread Mark Summerfield
Mark Summerfield added the comment: I've notified APSW's author and I'm sure he'll fix it. Thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22846 ___

[issue18473] some objects pickled by Python 3.x are not unpicklable in Python 2.x because of incorrect REVERSE_IMPORT_MAPPING

2014-11-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think that both UserDict.UserDict and UserDict.IterableUserDict should be mapped to collections.UserDict. And reverse mapping should map collections.UserDict to UserDict.IterableUserDict. There are similar issues with other multiple to single mappings

[issue22407] re.LOCALE is nonsensical for Unicode

2014-11-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22407 ___ ___

[issue20394] Coverity complains on audioop

2014-11-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20394 ___ ___

[issue22407] re.LOCALE is nonsensical for Unicode

2014-11-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- dependencies: +Convert re tests to unittest ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22407 ___

[issue22407] re.LOCALE is nonsensical for Unicode

2014-11-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If there are no objections I'll commit the re_deprecate_unicode_locale.patch patch. But it would be good if someone will review doc changes. -- ___ Python tracker rep...@bugs.python.org

[issue11820] idle3 shell os.system swallows shell command output

2014-11-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What do you think about this patch Terry? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11820 ___ ___

[issue22827] Backport ensurepip to 2.7 (PEP 477)

2014-11-11 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks Donald, left some review comments on Reitveld. While I had some comments on the docs, I think the code changes all look fine - would it be worth incorporating this version immediately to make it easier to get started on the Windows and Mac OS X installer

[issue22827] Backport ensurepip to 2.7 (PEP 477)

2014-11-11 Thread Donald Stufft
Donald Stufft added the comment: I've updated the patch with Nick's comments, except for pulling in the latest versions of the documentation. -- Added file: http://bugs.python.org/file37175/pep-477-3.patch ___ Python tracker rep...@bugs.python.org

[issue22827] Backport ensurepip to 2.7 (PEP 477)

2014-11-11 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks. I suggest committing that version, so the rest of the backport (installer integration packaging docs backport) can proceed in parallel. -- ___ Python tracker rep...@bugs.python.org

[issue22835] urllib2/httplib is rendering 400s for every authenticated-SSL request, suddenly

2014-11-11 Thread Dustin Oprea
Dustin Oprea added the comment: I usually use both on my local system. Dustin On Nov 11, 2014 4:43 AM, Antoine Pitrou rep...@bugs.python.org wrote: Antoine Pitrou added the comment: Le 11/11/2014 07:50, Dustin Oprea a écrit : Dustin Oprea added the comment: I think I was getting

[issue22834] Unexpected FileNotFoundError when current directory is removed

2014-11-11 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- assignee: - brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22834 ___ ___

[issue22840] strpdate('20141110', '%Y%m%d%H%S') returns wrong date

2014-11-11 Thread Brett Cannon
Brett Cannon added the comment: strptime very much follows the POSIX standard as I implemented strptime by reading that doc. If you want to see how the behaviour is implemented you can look at https://hg.python.org/cpython/file/ac0334665459/Lib/_strptime.py#l178 . But the key thing here is

[issue22840] strpdate('20141110', '%Y%m%d%H%S') returns wrong date

2014-11-11 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: After reading the standard a few more times, I agree with Brett and Ethan that this is at most a call for better documentation. I'll leave this open for a chance that someone will come up with a succinct description of what exactly datetime.strptime

[issue22827] Backport ensurepip to 2.7 (PEP 477)

2014-11-11 Thread Donald Stufft
Donald Stufft added the comment: Merged in https://hg.python.org/cpython/rev/592a5414fabd, I forgot to mention the issue number. I'm going to leave this open for the docs changes, however the OSX installer and Windows installer changes should be able to be made now. --

[issue13444] closed stdout causes error on stderr when the interpreter unconditionally flushes on shutdown

2014-11-11 Thread Josh Lee
Changes by Josh Lee jlee...@gmail.com: -- nosy: +jleedev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13444 ___ ___ Python-bugs-list mailing list

[issue22847] Improve method cache efficiency

2014-11-11 Thread Antoine Pitrou
New submission from Antoine Pitrou: The method cache is currently very small. Attached patch bumps the size a bit and improves the hash computation formula. -- components: Interpreter Core files: methcache.patch keywords: patch messages: 231031 nosy: pitrou, serhiy.storchaka priority:

[issue22847] Improve method cache efficiency

2014-11-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: It's not easy to get stable benchmark runs, but here is an example: Report on Linux fsol 3.16.0-24-generic #32-Ubuntu SMP Tue Oct 28 13:07:32 UTC 2014 x86_64 x86_64 Total CPU cores: 4 ### 2to3 ### 7.083762 - 6.904087: 1.03x faster ### formatted_logging ###

[issue22558] Missing hint to source code - complete

2014-11-11 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: +1 to add links to all the [Python] modules If the code is not readable, hard to understand or not self-documenting that's the reason to improve the code not to make it harder to find and see. -- nosy: +belopolsky

[issue22847] Improve method cache efficiency

2014-11-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Current hashing algorithm takes middle bits, proposed code takes low bits. Doesn't this make the hash worse? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22847

[issue22848] Subparser help does not respect SUPPRESS argument

2014-11-11 Thread Brett Hannigan
New submission from Brett Hannigan: When adding an argument to a subparser and passing help=argparse.SUPPRESS, I would expect this argument to not show up when running help. Instead, I find that the argument is listed and the help given is ==SUPPRESS==. For example (also in attached python

[issue22848] Subparser help does not respect SUPPRESS argument

2014-11-11 Thread Brett Hannigan
Changes by Brett Hannigan bhanni...@dnanexus.com: Added file: http://bugs.python.org/file37178/argparse.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22848 ___

[issue22847] Improve method cache efficiency

2014-11-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: FYI method cache optimization was added in issue1700288. -- nosy: +arigo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22847 ___

[issue22687] horrible performance of textwrap.wrap() with a long word

2014-11-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch which solves the algorithmic complexity issue by using a different scheme: instead of splitting, match words incrementally. -- keywords: +patch nosy: +pitrou stage: needs patch - patch review versions: -Python 2.7, Python 3.4 Added

[issue22847] Improve method cache efficiency

2014-11-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: The low bits of the unicode hash should be as good as the middle bits. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22847 ___

[issue22687] horrible performance of textwrap.wrap() with a long word

2014-11-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Actually, it is enough to change the regexp while still using re.split(). Updated patch attached. -- Added file: http://bugs.python.org/file37180/wordsplit_complexity2.patch ___ Python tracker rep...@bugs.python.org

[issue22847] Improve method cache efficiency

2014-11-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: In addition, the tp_version_tag evolves incrementally, so the low bits should be better when the same name is looked up on different types. -- ___ Python tracker rep...@bugs.python.org

[issue433030] SRE: Atomic Grouping (?...) is not supported

2014-11-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Some unrelated to the topic changes from the patch are committed in 30a6c74ad87f. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue433030

[issue22835] urllib2/httplib is rendering 400s for every authenticated-SSL request, suddenly

2014-11-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: In any case, it sounds like your problem is fixed, so we can close this issue. -- resolution: - not a bug status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22835

[issue22434] Use named constants internally in the re module

2014-11-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Since the op codes are singletons, you can use identity tests instead of equality checks in sre_parse.py: Please ignore my reply in previous message. Op codes are always tested for identity in sre_compile.py, so I have applied your suggestion in

[issue22687] horrible performance of textwrap.wrap() with a long word

2014-11-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Unfortunately there are two disadvantages: 1. wordsep_re and wordsep_simple_re are public attributes and user code can depend on this. Changing their is a way to customize TextWrapper. 2. This is slowdown common case (no abnormally long words): $ ./python

[issue22687] horrible performance of textwrap.wrap() with a long word

2014-11-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Are you sure? I get the reverse results here (second patch): Unpatched: $ ./python -m timeit -s 'import textwrap; s = abcde * 10**4' -- 'textwrap.wrap(s)' 10 loops, best of 3: 27 msec per loop Patched: $ ./python -m timeit -s 'import textwrap; s = abcde *

[issue20220] TarFile.list() outputs wrong time

2014-11-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Any other ideas for a reliable method to restore the correct timezone after running a test? No. The best would be for you to investigate. Perhaps contact some glibc guys. -- ___ Python tracker

[issue22619] Possible implementation of negative limit for traceback functions

2014-11-11 Thread Dmitry Kazakov
Dmitry Kazakov added the comment: I updated the patch. -- Added file: http://bugs.python.org/file37181/traceback.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___

[issue22687] horrible performance of textwrap.wrap() with a long word

2014-11-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, sorry, I tested your first patch. Your second patch is faster than current code to me. But it changes behavior. textwrap.wrap('1a-2b', width=5) ['1a-', '2b'] With the patch the result is ['1a-2', 'b']. --

[issue433030] SRE: Atomic Grouping (?...) is not supported

2014-11-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Reopened because definitely regex will be not adopted in 3.5. Here is updated to 3.5 Jeffrey's patch. -- resolution: duplicate - status: closed - open versions: +Python 3.5 -Python 3.2 Added file:

[issue22687] horrible performance of textwrap.wrap() with a long word

2014-11-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Yes... but in both cases the result is nonsensical, and untested. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22687 ___

[issue20220] TarFile.list() outputs wrong time

2014-11-11 Thread David Edelsohn
David Edelsohn added the comment: It doesn't fail on the Debian system. The Debian system will be successful after the test_gdb patch is installed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20220

[issue22687] horrible performance of textwrap.wrap() with a long word

2014-11-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Possessive quantifiers (issue433030) is not a panacea. They allow to speed up regular expressions, but the complexity is still quadratic. Antoine's patch makes the complexity linear. -- ___ Python tracker

[issue22835] urllib2/httplib is rendering 400s for every authenticated-SSL request, suddenly

2014-11-11 Thread Dustin Oprea
Dustin Oprea added the comment: Agreed. Thank you, @Antoine. On Tue, Nov 11, 2014 at 2:21 PM, Antoine Pitrou rep...@bugs.python.org wrote: Antoine Pitrou added the comment: In any case, it sounds like your problem is fixed, so we can close this issue. -- resolution: - not a

[issue22849] Double DECREF in TextIOWrapper

2014-11-11 Thread Tim Hatch
New submission from Tim Hatch: There's a reproducible bug in textio.c that causes a double DECREF on codecs. The conditions to trigger are probably rare in real life, so not remotely exploitable (sandbox escape is the worst I can think of on its own, and I'm not aware of any on 3.x): * You

[issue21514] update json module docs in light of RFC 7159 ECMA-404

2014-11-11 Thread Chris Rebert
Chris Rebert added the comment: Ping! It's been about 3 months since this was given the green light... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21514 ___

[issue11820] idle3 shell os.system swallows shell command output

2014-11-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: Currently, when Idle is started from a command line or console interpreter, import os; os.system('dir') produces the listing in the console window, as expected. Reading the patch, it *augments* one-channel socket communication, which properly* combines and

[issue22364] Improve some re error messages using regex for hints

2014-11-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: I already said we should either stick with what we have if better (and gave examples, including sticking with 'cannot') or possibly combine the best of both if we can improve on both. 13 should use 'bytes-like' (already changed?). There is no review button.

[issue21514] update json module docs in light of RFC 7159 ECMA-404

2014-11-11 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21514 ___ ___

[issue22849] Double DECREF in TextIOWrapper

2014-11-11 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +ncoghlan, serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22849 ___ ___

[issue19494] Add urllib2.HTTPBasicPriorAuthHandler for use with APIs that don't return 401 errors

2014-11-11 Thread Nick Coghlan
Nick Coghlan added the comment: Updated the issue title to reflect the current state of the proposal - adding a new Handler class for use when you want to send the auth details unconditionally, rather than requiring that the server send a 401 response before resubmitting the request with

[issue22850] Backport ensurepip Windows installer changes to 2.7

2014-11-11 Thread Steve Dower
New submission from Steve Dower: I've merged the changes from when ensurepip was added to Python 3 into msi.py (and also fixed up the new externals dir location), but I'm no expert on this script, so at least a second set of eyes would be appreciated. It seems to build and work okay.

[issue22850] Backport ensurepip Windows installer changes to 2.7

2014-11-11 Thread Steve Dower
Steve Dower added the comment: Issue #22827 was the ensurepip backport. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22850 ___ ___

[issue22850] Backport ensurepip Windows installer changes to 2.7

2014-11-11 Thread Donald Stufft
Donald Stufft added the comment: I don't know anything about msi or this script so I can't offer any help there, but thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22850 ___

[issue13444] closed stdout causes error on stderr when the interpreter unconditionally flushes on shutdown

2014-11-11 Thread Martin Panter
Martin Panter added the comment: Shouldn’t this issue be marked closed and fixed? -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13444 ___

[issue13444] closed stdout causes error on stderr when the interpreter unconditionally flushes on shutdown

2014-11-11 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- resolution: - fixed stage: needs patch - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13444 ___

[issue19796] urllib2.HTTPError.reason is not documented as Added in 2.7

2014-11-11 Thread Berker Peksag
Berker Peksag added the comment: issue 13211 was about a bug in exception hierarchy of the urllib2 module(not an addition to the public API - see msg147318 for detailed explanation). I don't think we need to update documentation. -- resolution: - wont fix stage: patch review -

[issue22850] Backport ensurepip Windows installer changes to 2.7

2014-11-11 Thread Nick Coghlan
Nick Coghlan added the comment: This looks to match the relevant pieces of the Python 3 version to me. However, it occurs to me that Python 2 will still be missing other Windows usability enhancements that make pip easier to use: - bundling the py launcher - providing the installer option to