[issue23493] optimize sort_keys in json module by using operator.itemgetter()

2015-02-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: May be there is a time to optimize creating Python frames (at least for the case when one frame is created and destroyed multiple times). May be frame pool? Or cached one frame per function? -- ___ Python tracker

[issue12026] Support more of MSI api

2015-02-24 Thread Mark Lawrence
Changes by Mark Lawrence breamore...@yahoo.co.uk: -- components: +Windows nosy: +steve.dower, tim.golden, zach.ware versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12026

[issue21099] Switch applicable importlib tests to use PEP 451 API

2015-02-24 Thread Mark Lawrence
Mark Lawrence added the comment: To echo Brett's question, should this be closed, Eric? -- status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21099 ___

[issue23511] Broken code example in email module documentation

2015-02-24 Thread Berker Peksag
Berker Peksag added the comment: LGTM. -- nosy: +berker.peksag, r.david.murray stage: - commit review versions: +Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23511

[issue19711] add test for changed portions after reloading a namespace package

2015-02-24 Thread Mark Lawrence
Mark Lawrence added the comment: To echo Brett's question, do we still need this patch, Eric? -- status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19711 ___

[issue23491] PEP 441 - Improving Python Zip Application Support

2015-02-24 Thread Paul Moore
Paul Moore added the comment: Thanks, I'll fix for the next iteration of the patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23491 ___ ___

[issue9985] difflib.SequenceMatcher has slightly buggy and undocumented caching behavior

2015-02-24 Thread Mark Lawrence
Mark Lawrence added the comment: I believe this has been fixed by changesets f02a563ad1bf and ed73c127421c in #21635. -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9985

[issue23509] Speed up Counter operators

2015-02-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: - in the given patch __add__ uses __iadd__, but __sub__ doesn't use __isub__, which seems a bit weird. If Counters are positive (common case), then the result of addition is not less than both summands. a + b is a and may be additional elements from b. In

[issue12010] Compile fails when sizeof(wchar_t) == 1

2015-02-24 Thread Mark Lawrence
Mark Lawrence added the comment: Is this effectively superseded by work being done on #23496? -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12010 ___

[issue23511] Broken code example in email module documentation

2015-02-24 Thread Baptiste Mispelon
Baptiste Mispelon added the comment: Patch attached. -- keywords: +patch Added file: http://bugs.python.org/file38228/issue23511.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23511 ___

[issue2142] difflib.unified_diff(...) produces invalid patches

2015-02-24 Thread Mark Lawrence
Mark Lawrence added the comment: Can we have a review on the updated patch please. -- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2142

[issue10515] csv sniffer does not recognize quotes at the end of line

2015-02-24 Thread Mark Lawrence
Mark Lawrence added the comment: @David could you check Skip's patch out please. It seems identical to your own other than changing the delimiter from the empty string to a comma. -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org

[issue10954] csv.reader/writer to raise exception if mode is binary or newline is not ''

2015-02-24 Thread Mark Lawrence
Mark Lawrence added the comment: I've changed this issue to reflect what I think it should be saying. -- nosy: +BreamoreBoy title: No warning for csv.writer API change - csv.reader/writer to raise exception if mode is binary or newline is not '' type: enhancement - behavior versions:

[issue10197] subprocess.getoutput fails on win32

2015-02-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: A side effect of the changes made within are that getstatusoutput() on POSIX systems now returns a different value for status. The old implementation present in Python 2 and Python 3.3 before this patch returned the raw waitpid() status result as the status

[issue10197] subprocess.getoutput fails on win32

2015-02-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: http://bugs.python.org/issue23508 to track the fall out of that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10197 ___

[issue23507] Tuple creation is too slow

2015-02-24 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23507 ___ ___

[issue23507] Tuple creation is two slow

2015-02-24 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Currently tuples creating uses free lists. But this optimization is not enough. When reuse cached tuple for arguments of repeatedly called functions, the performance of some builtins can be significantly increased. $ ./python -m timeit -s f = lambda x: x

[issue15753] No-argument super in method with variable arguments raises SystemError

2015-02-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15753 ___ ___

[issue14073] allow per-thread atexit()

2015-02-24 Thread Mark Lawrence
Mark Lawrence added the comment: The changes referenced in msg204494 ref: #19466 were reverted via changesets 9ce58a73b6b5 and 1166b3321012 -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14073

[issue6598] calling email.utils.make_msgid frequently has a non-trivial probability of generating colliding ids

2015-02-24 Thread Mark Lawrence
Mark Lawrence added the comment: Can we have a patch review please. If nothing else xrange will have to change for Python 3. -- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org

[issue23476] SSL cert verify fail for www.verisign.com

2015-02-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Python's SSL isn't using that. Python is taking in one big text file of SSL certs, with no link structure, and feeding it to OpenSSL. Python's SSL is not taking anything: r = urlopen('https://www.verisign.com') r.read(10) b' !DOCTYPE' It's only if you

[issue23509] Speed up Counter operators

2015-02-24 Thread Jörn Hees
Jörn Hees added the comment: cool minor question: - in the given patch __add__ uses __iadd__, but __sub__ doesn't use __isub__, which seems a bit weird. maybe off-topic, but maybe not, because of _keep_positive(self): - is there place for a non multi-set centric Stats object which is like

[issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie)

2015-02-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The tests are checking that they are the same value (8) and the same type (int)? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17576 ___

[issue23511] Broken code example in email module documentation

2015-02-24 Thread Baptiste Mispelon
New submission from Baptiste Mispelon: The first code example at https://docs.python.org/3.5/library/email-examples.html throws an `AttributeError` because `MIMEText`'s constructor expects a `str` object, not a `bytes` one: # Import smtplib for the actual sending function ... import smtplib

[issue23512] List of builtins is not alphabetical on https://docs.python.org/2/library/functions.html

2015-02-24 Thread Edward D'Souza
New submission from Edward D'Souza: The list of built-in functions at the top of https://docs.python.org/2/library/functions.html is not alphabetical. Specifically, (apply, coerce, intern, buffer) allow appear out of order at the end of the list, instead of where they should be

[issue23138] cookiejar parses cookie value as int with empty name-value pair and Expires

2015-02-24 Thread Mark Lawrence
Mark Lawrence added the comment: @Demian I believe this may be of interest to you. -- nosy: +BreamoreBoy, demian.brecht versions: -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23138

[issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie)

2015-02-24 Thread Manuel Jacob
Manuel Jacob added the comment: Maybe I'm missing something, but it seems to me that test_int_subclass_with_index() is testing for the exactly wrong behaviour. Isn't the point of this issue that operator.index(a) should be equal to a.__index__()? Why are the tests checking that they are

[issue23476] SSL cert verify fail for www.verisign.com

2015-02-24 Thread Cory Benfield
Changes by Cory Benfield c...@lukasa.co.uk: -- nosy: +Lukasa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23476 ___ ___ Python-bugs-list mailing

[issue23476] SSL cert verify fail for www.verisign.com

2015-02-24 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- resolution: - not a bug stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23476 ___

[issue23476] SSL cert verify fail for www.verisign.com

2015-02-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: and it is not reproducible using openssl s_client I have determined that s_client is buggy. It will always load the system certs *if and only if* you also pass it a valid custom CA cert (which is the reverse of what's expected). This is where it happens (in

[issue23476] SSL cert verify fail for www.verisign.com

2015-02-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, this is really a bug in the cert bundle provided by requests and Firefox. With requests 2.5.1: $ SSL_CERT_DIR=/tmp SSL_CERT_FILE=/tmp openssl s_client -CAfile requests/cacert.pem -connect verisign.com:443 = ok With requests 2.5.2: $ SSL_CERT_DIR=/tmp

[issue23476] SSL cert verify fail for www.verisign.com

2015-02-24 Thread Christian Heimes
Christian Heimes added the comment: John, neither Python nor OpenSSL are shipped with certificates. Python uses certificates from operating system. We decided against our own certificate store because we wanted to avoid exactly this kind of trouble. If Python can't verify a certificate then

[issue23510] multiprocessing bug SyncManager and 'with'

2015-02-24 Thread Davin Potts
Davin Potts added the comment: A much simpler example of code triggering the described issue: import multiprocessing.managers with multiprocessing.managers.SyncManager() as s: print here Running the above code in 2.7.9 results in an exception with the traceback: Traceback

[issue23513] Add support for classes/object model in multiprocessing/pickle

2015-02-24 Thread Davin Potts
Changes by Davin Potts pyt...@discontinuity.net: -- nosy: +davin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23513 ___ ___ Python-bugs-list

[issue23507] Tuple creation is too slow

2015-02-24 Thread Stefan Behnel
Changes by Stefan Behnel sco...@users.sourceforge.net: -- nosy: +scoder ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23507 ___ ___

[issue6598] calling email.utils.make_msgid frequently has a non-trivial probability of generating colliding ids

2015-02-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The probability of a collision when generated n numbers from 0 to m-1 is 1 - factorial(m)/factorial(m-n)/m**n When n sqrt(m), it is approximately equal to n**2/(2*m). When m = 100, we have problems for n about 1000. When increase m to 2**32, the

[issue23514] multiprocessing documentation - little more examples for parallel computing

2015-02-24 Thread Cezary Wagner
Changes by Cezary Wagner cezary.wag...@gmail.com: -- versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23514 ___ ___

[issue23476] SSL cert verify fail for www.verisign.com

2015-02-24 Thread Laura Creighton
Laura Creighton added the comment: Antione closed this, as a not python error, as if you do not pass a valid certificate to openssl s_client it will not read the system certificates, which is clearly utterly surprising and nuts. The problem, as I see it, is that fixing this clear absurdity may

[issue23476] SSL cert verify fail for www.verisign.com

2015-02-24 Thread Aaron Meurer
Changes by Aaron Meurer asmeu...@gmail.com: -- nosy: +Aaron.Meurer ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23476 ___ ___ Python-bugs-list

[issue23476] SSL cert verify fail for www.verisign.com

2015-02-24 Thread Cory Benfield
Cory Benfield added the comment: The problem specifically is that OpenSSL only uses a *root* in the trust store as an anchor. That means any certificate that is signed by another certificate will not terminate the chain of trust. Browsers do better here, by trusting the entirety of the trust

[issue23510] multiprocessing bug SyncManager and 'with'

2015-02-24 Thread Cezary Wagner
Cezary Wagner added the comment: Yes it is what is wanted by me and other people I think. 1. enter has not start call. 2. exit has shutdown but it is not supported 3. 'with' is what is need since it is simple to manage Good analysis. -- ___ Python

[issue23510] multiprocessing bug SyncManager and 'with'

2015-02-24 Thread Davin Potts
Davin Potts added the comment: Successfully reproduced on OS X 10.10 with 2.7.9. Changing the issue type to behavior because crash is reserved for Hard crashes of the Python interpreter – possibly with a core dump or a Windows error box. In this issue, we do see an exception get raised but

[issue23513] Add support for classes/object model in multiprocessing/pickle

2015-02-24 Thread Cezary Wagner
Cezary Wagner added the comment: I am fighting with multiprocessing and still not won - I need to invent new Python coding style to use it and can not reduce ugly code/microcoding. It is not because it is not possible to do it in Python easier but because it is not improved yet. --

[issue23514] multiprocessing documentation - little more examples for parallel computing

2015-02-24 Thread Cezary Wagner
Cezary Wagner added the comment: Should I add this suggestion to open before issue? I started doing multiprocessing code in Python so I can have more suggestions since I found that documentation can be improved I will report specific problem. --

[issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie)

2015-02-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, it just checks current behavior. So we will know when this will be changed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17576 ___

[issue23262] webbrowser module broken with Firefox 36+

2015-02-24 Thread Oleg Broytman
Oleg Broytman added the comment: I created the attached module to work with new FF in Python 2.7. You can convert it to proper patch for webbrowser.py. -- nosy: +phd Added file: http://bugs.python.org/file38227/new_firefox.py ___ Python tracker

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-02-24 Thread Ryan Gonzalez
Ryan Gonzalez added the comment: So... I know a decent amount of configure scripts, although Python's is easily going to be the absolute longest I've ever touched. Maybe these should be made against the 3.6 Mercurial source? I'm not sure if the Python devs would prefer that. Also, should

[issue23491] PEP 441 - Improving Python Zip Application Support

2015-02-24 Thread Daniel Holth
Daniel Holth added the comment: Spelling raise PackError(Cannot spacify entry point if the source has __main__.py) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23491 ___

[issue23515] Bad logic in timsort's merge_collapse

2015-02-24 Thread Tim Peters
New submission from Tim Peters: Some researchers found an error in the logic of merge_collapse, explained here, and with corrected code shown in section 3.2: http://envisage-project.eu/proving-android-java-and-python-sorting-algorithm-is-broken-and-how-to-fix-it/ This affects all current

[issue23515] Bad logic in timsort's merge_collapse

2015-02-24 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23515 ___ ___ Python-bugs-list mailing

[issue23517] datetime.utcfromtimestamp parses timestamps incorrectly

2015-02-24 Thread Tommaso Barbugli
New submission from Tommaso Barbugli: Hi, I am porting a library from python 2.7 to 3.4 and I noticed that the behaviour of datetime.utcfromtimestamp is not consistent between the two versions. For example on python 2.7.5 datetime.utcfromtimestamp(1424817268.274) returns a datetime with

[issue23516] requests: parse_url() mishandles special characters when the URL specifies authentication credentials

2015-02-24 Thread Demian Brecht
Demian Brecht added the comment: I can't tell how to label this bug report because I don't know where pip comes from: as far as I knew this is a bug in something called urllib3, which seemed to me that was related to Python itself, or maybe in the way pip is calling it, and I assumed pip

[issue23516] requests: parse_url() mishandles special characters when the URL specifies authentication credentials

2015-02-24 Thread Demian Brecht
Changes by Demian Brecht demianbre...@gmail.com: -- nosy: +Marcus.Smith, dstufft, ncoghlan, pmoore ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23516 ___

[issue23486] Enum member lookup is 20x slower than normal class attribute lookup

2015-02-24 Thread Ethan Furman
Ethan Furman added the comment: This isn't a change to the API or any visible user behavior (besides performance), so I don't see a reason to not add it to 3.4. -- nosy: +barry, eli.bendersky ___ Python tracker rep...@bugs.python.org

[issue23517] datetime.utcfromtimestamp parses timestamps incorrectly

2015-02-24 Thread Ethan Furman
Ethan Furman added the comment: This seems to have changed in 3.3 (versions up to 3.2 return 274000). -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23517 ___

[issue23516] requests: parse_url() mishandles special characters when the URL specifies authentication credentials

2015-02-24 Thread Martin Panter
Martin Panter added the comment: Sounds like this might be in a third-party module, not in Python itself. But see also Issue 23328 and Issue 18140. The RFC you referenced also says this, which suggests the authority cannot contain a literal question mark: ‘The authority component . . . is

[issue2292] Missing *-unpacking generalizations

2015-02-24 Thread Guido van Rossum
Guido van Rossum added the comment: The patch no longer applies cleanly. I had to do hg up -r ac0d6c09457e to get a checkpoint to which it applies. (But I'm not sure at what point that landed me.) -- ___ Python tracker rep...@bugs.python.org

[issue23516] requests: parse_url() mishandles special characters when the URL specifies authentication credentials

2015-02-24 Thread Demian Brecht
Changes by Demian Brecht demianbre...@gmail.com: -- nosy: +demian.brecht ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23516 ___ ___

[issue23516] requests: parse_url() mishandles special characters when the URL specifies authentication credentials

2015-02-24 Thread Demian Brecht
Demian Brecht added the comment: Sounds like this might be in a third-party module +1. urllib3.url_parse doesn't make use of the standard library. userinfo = *( unreserved / pct-encoded / sub-delims / : ) This leads me to believe that using something like this might work: from urllib.parse

[issue10954] csv.reader/writer to raise exception if mode is binary or newline is not ''

2015-02-24 Thread Martin Panter
Martin Panter added the comment: I suspect it may not be practical to check the newline translation mode of a TextIOWrapper or StringIO stream, and I don’t think newline translation is even required in general for text stream classes. Beware that the “newlines” attribute isn’t going to help;

[issue23515] Bad logic in timsort's merge_collapse

2015-02-24 Thread Chris Kaynor
Changes by Chris Kaynor ckay...@zindagigames.com: -- nosy: +DragonFireCK ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23515 ___ ___

[issue23516] requests: parse_url() mishandles special characters when the URL specifies authentication credentials

2015-02-24 Thread Leonardo Tancredi
New submission from Leonardo Tancredi: I was running pip install with the --proxy switch to authenticate to a proxy server with user user and password pass?word, when I noticed it fails. It seems to fail when the password contains some special characters, v.g., ? and #. Here's the exception I

[issue10954] csv.reader/writer to raise exception if mode is binary or newline is not ''

2015-02-24 Thread Skip Montanaro
Changes by Skip Montanaro s...@pobox.com: -- nosy: -skip.montanaro ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10954 ___ ___ Python-bugs-list

[issue23518] Misplaced diagnostic caret for some SyntaxErrors

2015-02-24 Thread Zack Weinberg
New submission from Zack Weinberg: I tripped over a couple of SyntaxError cases where the diagnostic caret is misplaced. While x: File stdin, line 1 While x: ^ SyntaxError: invalid syntax The caret should point to the capital W in 'While'. for x in

[issue17963] Deprecate the frame hack for implicitly getting module details

2015-02-24 Thread Ethan Furman
Ethan Furman added the comment: Eli, did you ever make any progress with this? Anything you can post so someone else can run with it if you don't have time? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17963

[issue9938] Documentation for argparse interactive use

2015-02-24 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: -ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9938 ___ ___ Python-bugs-list

[issue8895] newline vs. newlines in io module

2015-02-24 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8895 ___ ___ Python-bugs-list