[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"

[issue23507] Tuple creation is too slow

2015-02-24 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[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 ___ ___ Pyt

[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 diff

[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 ___

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

2015-02-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[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

[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 ___ ___

[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 smtpl

[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

[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 alphabetically.

[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' >> cafile = 'cacer

[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 C

[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 yo

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

2015-02-24 Thread Cory Benfield
Changes by Cory Benfield : -- nosy: +Lukasa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[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 S

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

2015-02-24 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-

[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

[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

[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. -- _

[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 n

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

2015-02-24 Thread Cezary Wagner
Changes by Cezary Wagner : -- versions: +Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

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

2015-02-24 Thread Aaron Meurer
Changes by Aaron Meurer : -- nosy: +Aaron.Meurer ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[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 s

[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: Tracebac

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

2015-02-24 Thread Davin Potts
Changes by Davin Potts : -- nosy: +davin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.or

[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 t

[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. -- ___

[issue23507] Tuple creation is too slow

2015-02-24 Thread Stefan Behnel
Changes by Stefan Behnel : -- nosy: +scoder ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[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 p

[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 ___

[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 the

[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 ___ __

[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 versi

[issue23515] Bad logic in timsort's merge_collapse

2015-02-24 Thread Alex Gaynor
Changes by Alex Gaynor : -- nosy: +alex ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org

[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 ___ ___ Python-bugs-list mai

[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 ___ __

[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 ___

[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 ___ ___

[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 ___ _

[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 ___ _

[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

[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 ___ _

[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

[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

[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:

[issue12026] Support more of MSI api

2015-02-24 Thread Mark Lawrence
Changes by Mark Lawrence : -- components: +Windows nosy: +steve.dower, tim.golden, zach.ware versions: +Python 3.5 -Python 3.3 ___ Python tracker ___

[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 ___ ___

[issue23515] Bad logic in timsort's merge_collapse

2015-02-24 Thread Chris Kaynor
Changes by Chris Kaynor : -- nosy: +DragonFireCK ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[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 exceptio

[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 274000

[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 ___ __

[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 : -- nosy: -skip.montanaro ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue8895] newline vs. newlines in io module

2015-02-24 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[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; s

[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 ter

[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

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

2015-02-24 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: +demian.brecht ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[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.pa

[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 __

[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 "", line 1 While x: ^ SyntaxError: invalid syntax The caret should point to the capital W in 'While'. >>> for x in

[issue9938] Documentation for argparse interactive use

2015-02-24 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: -ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[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 _

[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 p

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

2015-02-24 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: +Marcus.Smith, dstufft, ncoghlan, pmoore ___ Python tracker ___ ___ Python-bugs-list mailing list