[issue28235] In xml.etree.ElementTree docs there is no parser argument in fromstring()

2016-09-21 Thread Berker Peksag
Berker Peksag added the comment: Instead of duplicating XML() documentation, I'd suggest changing fromstring() documentation to say something like "this is an alias for ElementTree.XML()." -- nosy: +berker.peksag versions: +Python 3.5, Python 3.7 ___

[issue28242] os.environ.get documentation missing

2016-09-21 Thread Ned Deily
Ned Deily added the comment: The difference is that os.environ is a reference to a mapping object, essentially a dict, that has all of the process environment variables. By using the get('x') method on that object, you ask the object to find and return the value corresponding to key 'x' or to

[issue28243] Performance regression in functools.partial()

2016-09-21 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: There is 10% performance regression in calling functools.partial() in 3.6. $ ./python -m perf timeit -s 'from functools import partial; f = lambda x, y: None; g = partial(f, 1)' -- 'g(2)' Python 3.5: Median +- std dev: 452 ns +- 25 ns Python 3.6: Median

[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2016-09-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: We had a similar discussion a while back for pybench. Consensus then was to use the minimum as basis for benchmarking: https://mail.python.org/pipermail/python-dev/2006-June/065525.html I had used the average before this discussion in pybench 1.0: https://

[issue28243] Performance regression in functools.partial()

2016-09-21 Thread STINNER Victor
STINNER Victor added the comment: The perf regression can be related to the new fastcall calling convention or the work in ceval.c (new 16-bit regular bytecode, new CALL_FUNCTION bytecodes). -- ___ Python tracker _

[issue28197] range.index mismatch with documentation

2016-09-21 Thread Vedran Čačić
Vedran Čačić added the comment: Why can't this go into 3.6? To me this situation seems like a bug. -- ___ Python tracker ___ ___ Pytho

[issue28243] Performance regression in functools.partial()

2016-09-21 Thread STINNER Victor
STINNER Victor added the comment: Oh, functools.partial.__call__() doesn't use fastcall yet. So compared to Python 3.5, fastcall shouldn't explain a major performance difference. FYI I'm working on an extension of fastcall to also support fastcall calling convention for obj.__call__() ;-) But

[issue26072] pdb fails to access variables closed over

2016-09-21 Thread Jesús Gómez
Jesús Gómez added the comment: Confirming. Another use case is the use any lambda, or function definition inside the scope of a function, for checking conditions in the REPL. Suppose two inner functions named condition1 and condition2, and a parameter X as a Collection: (Pdb) any(condition1(

[issue28228] imghdr does not support pathlib

2016-09-21 Thread Ethan Furman
New submission from Ethan Furman: Supporting pathlib was one of the requirements of removing the provisional status. Why have you changed the type to enhancement? -- ___ Python tracker ___

[issue28134] socket.socket(fileno=fd) does not work as documented

2016-09-21 Thread Christian Heimes
Changes by Christian Heimes : -- assignee: -> christian.heimes components: +Extension Modules stage: needs patch -> patch review ___ Python tracker ___ _

[issue28228] imghdr does not support pathlib

2016-09-21 Thread Brett Cannon
Brett Cannon added the comment: "Removing the provisional status" of what? Pathlib? If so, have you asked Ned if adding support during the beta period is acceptable? This open question is probably why Serhiy changed the type as without Ned's sign-off it means changing something in the stdlib f

[issue27400] Datetime NoneType after calling Py_Finalize and Py_Initialize

2016-09-21 Thread Jim Jewett
Jim Jewett added the comment: Having to (re-)fill the cache once per interpreter seems like a reasonable price to pay. Why is 3.5 not included? Did this not cause problems before the import change, or is it just that this bug is small enough that maybe it isn't worth backporting? --

[issue26351] Occasionally check for Ctrl-C in long-running operations like sum

2016-09-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: The request is to check 'occasionally'. To me this means perhaps once a second, which is to say, ^c should generally interrupt within a second, and on average with half a second. The following takes just under a second: "sum(i for i in range(1000))" wher

[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2016-09-21 Thread Steven D'Aprano
Steven D'Aprano added the comment: > I'd suggest to display all values and base the findings on > all available values, rather than just one: > min, max, avg, median, stddev. If we're going to go down that path, I suggest using something like: https://en.wikipedia.org/wiki/Five-number_summary

[issue28234] In xml.etree.ElementTree docs there are many absent Element class links

2016-09-21 Thread Martin Panter
Martin Panter added the comment: Mostly looks good to me. I left some comments on the code review. -- nosy: +martin.panter versions: +Python 2.7, Python 3.5, Python 3.7 ___ Python tracker __

[issue28243] Performance regression in functools.partial()

2016-09-21 Thread Emanuel Barry
Changes by Emanuel Barry : -- nosy: +ebarry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue28244] Incorrect Example in itertools.product description

2016-09-21 Thread Matthew Ekstrand-Abueg
New submission from Matthew Ekstrand-Abueg: Documentation states: # product('ABCD', 'xy') --> Ax Ay Bx By Cx Cy Dx Dy # product(range(2), repeat=3) --> 000 001 010 011 100 101 110 But: >>> list(itertools.product('ABCD','xy')) [('A', 'x'), ('A', 'y'), ('B', 'x'), ('B', 'y'), ('C', 'x')

[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2016-09-21 Thread Zachary Ware
Zachary Ware added the comment: This appears to be finished, please reopen if I'm mistaken. -- nosy: +zach.ware resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker __

[issue26351] Occasionally check for Ctrl-C in long-running operations like sum

2016-09-21 Thread Nick Coghlan
Nick Coghlan added the comment: George's initial patch that naively checks for signals on every iteration could be used to get an upper bound on the likely benchmark impact. I do think this is a case where we'll want a dedicated microbenchmark to complement the macrobenchmark suite, though - R

[issue28245] Embeddable Python does not use PYTHONPATH.

2016-09-21 Thread Jarno Rajala
New submission from Jarno Rajala: The Windows 64-bit embeddable Python 3.5.2 (also 3.5.1), downloadable from https://www.python.org/ftp/python/3.5.2/python-3.5.2-embed-amd64.zip, does not set sys.path according to PYTHONPATH. To reproduce this bug, run these commands from the directory with the

[issue21878] wsgi.simple_server's wsgi.input read/readline waits forever in certain circumstances

2016-09-21 Thread Bert JW Regeer
Bert JW Regeer added the comment: This is still very much an issue, and makes it more difficult to write generic python request/response libraries because we can't assume that a read() will return, and relying on the Content-Length being set is not always possible unfortunately. -- no

[issue28244] Incorrect Example in itertools.product description

2016-09-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: The comments in the docs are necessarily terse and communicate the pattern of pairings. It would not be an improvement to actually list out all the tuples. Sorry if this caused you any confusion, but I prefer to leave the comments as they are now. -

[issue28234] In xml.etree.ElementTree docs there are many absent Element class links

2016-09-21 Thread py.user
py.user added the comment: > I left some comments on the code review. Left an answer on a comment. (ISTM, email notification doesn't work there, I didn't get email.) -- ___ Python tracker _

[issue28239] Implement functools.lru_cache() using ordered dict

2016-09-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: > I don't suggest to change lru_cach() implementation just now For now, I would like to have this closed. It doesn't make sense at the current juncture (with the compact being new, being in flux, and not having guaranteed ordering semantics). Also, we sho

[issue28205] Add optional suffix to str.join

2016-09-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: Looking again at the comments for the other respondents, I think this should just be closed. It doesn't make sense to disturb a long standing API or the break the join/split symmetry. -- resolution: -> rejected status: open -> closed

[issue28234] In xml.etree.ElementTree docs there are many absent Element class links

2016-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In lxml Element is a factory function, not a class. -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue28239] Implement functools.lru_cache() using ordered dict

2016-09-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python

[issue28197] range.index mismatch with documentation

2016-09-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Why can't this go into 3.6? Because it is a new feature and we're already past beta 1; because nothing is actually broken; and because it is a very minor issue (x isn't 100% consistent with y); because this would depend on new code and tests that we haven

[issue28205] Add optional suffix to str.join

2016-09-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: -> resolved ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue24567] random.choice IndexError due to double-rounding

2016-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- versions: +Python 3.7 -Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue24567] random.choice IndexError due to double-rounding

2016-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I'll write that as "'i == n and n > 0" which reads better and runs faster in > the common case (look at the disassembly of each). issue27236 -- ___ Python tracker ___

[issue27619] getopt should strip whitespace from long arguments

2016-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think this should just be closed. -- status: open -> pending ___ Python tracker ___ ___ Python-b

<    1   2