[issue24076] sum() several times slower on Python 3

2015-04-30 Thread Stefan Behnel
Stefan Behnel added the comment: I don't think it's irrelevant. Throw-away integers are really not uncommon. For-loops use them quite often, non-trivial arithmetic expressions can create a lot of intermediate temporaries. Speeding up the create-delete cycle of PyLong sounds like a very obvious

[issue24089] argparse crashes with AssertionError

2015-04-30 Thread SpaceOne
New submission from SpaceOne: Just add an argument with metavar='[PROTOCOL://]HOST[:PORT]' ([...] twice in the string) causes the following traceback: Traceback (most recent call last): File "curl.py", line 182, in arguments = parser.parse_args() File "/usr/lib/python2.7/argparse.py",

[issue23572] functools.singledispatch fails when "not BaseClass" is True

2015-04-30 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue24005] Documentation Error: Extra line Break

2015-04-30 Thread Jaivish Kothari
Jaivish Kothari added the comment: Thank you Tim. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue24074] string, center, ljust, rjust, width paramter should accept None

2015-04-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: Marking as rejected because 0 works fine and accepting None just complicates the parsing and documentation without any incremental benefit. -- resolution: -> rejected status: open -> closed ___ Python tracker

[issue24085] large memory overhead when pyc is recompiled

2015-04-30 Thread Anthony Sottile
Anthony Sottile added the comment: Adding `import gc; gc.collect()` doesn't change the outcome afaict -- nosy: +asottile ___ Python tracker ___ __

[issue10435] Document unicode C-API in reST

2015-04-30 Thread Mark Lawrence
Mark Lawrence added the comment: List of just about everything that's in the header file but not in the rst file as I'm not sure which bits you normally wouldn't bother with. Py_USING_UNICODE Py_UNICODE_SIZE Py_UNICODE_WIDE Py_UNICODE_COPY Py_UNICODE_FILL Py_UNICODE_HIGH_SURROGATE Py_UNICODE_LO

[issue24076] sum() several times slower on Python 3

2015-04-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: It seems we (like the benchmarks posted) are spending a whole lot of time on something that's probably not relevant to any real-world situation. If someone has actual code that suffers from this, it would be good to know about it. (note by the way that summing

[issue2651] Strings passed to KeyError do not round trip

2015-04-30 Thread Łukasz Langa
Łukasz Langa added the comment: Agreed that this can be addressed now for Python 3.5. -- assignee: -> lukasz.langa versions: +Python 3.5 -Python 3.2, Python 3.3 ___ Python tracker __

[issue24086] Configparser interpolation is unexpected

2015-04-30 Thread Łukasz Langa
Łukasz Langa added the comment: This is expected behaviour but I agree the error message should be improved. There are people using interpolation in .pypirc, if you don't want that, just use a double % sign and it will do the right thing. You don't have to change your password. I'll leave tha

[issue23572] functools.singledispatch fails when "not BaseClass" is True

2015-04-30 Thread Łukasz Langa
Łukasz Langa added the comment: Yes, this needs addressing. -- assignee: -> lukasz.langa versions: +Python 3.5 ___ Python tracker ___ ___

[issue24088] yield expression confusion

2015-04-30 Thread Guido van Rossum
Guido van Rossum added the comment: You can't just drop the middle sentence. Awkward though it is, it is attempting to describe that the generator object controls suspension and resumption of the stack frame representing execution of the generator function's body. -- _

[issue24088] yield expression confusion

2015-04-30 Thread Jim Jewett
New submission from Jim Jewett: https://docs.python.org/3/reference/expressions.html#yield-expressions Current: """ When a generator function is called, it returns an iterator known as a generator. That generator then controls the execution of a generator function. The execution starts when on

[issue24086] Configparser interpolation is unexpected

2015-04-30 Thread Ned Deily
Changes by Ned Deily : -- nosy: +lukasz.langa versions: +Python 3.5 -Python 3.2, Python 3.3 ___ Python tracker ___ ___ Python-bugs-lis

[issue24084] pstats: sub-millisecond display

2015-04-30 Thread Ned Deily
Changes by Ned Deily : -- nosy: +georg.brandl stage: -> patch review versions: +Python 3.5 ___ Python tracker ___ ___ Python-bugs-lis

[issue24060] Clearify necessities for logging with timestamps

2015-04-30 Thread Vinay Sajip
Vinay Sajip added the comment: Perhaps I'll just change it to say ... the default value of '%(message)s' is used, which just includes the message in the logging call. To have additional items of information in the formatted output (such as a timestamp), see other placeholder variables ... an

[issue24080] asyncio.Event.wait() Task was destroyed but it is pending

2015-04-30 Thread Marco Paolini
Marco Paolini added the comment: KeyboardInterrupt is not handled gently by asyncio (see https://groups.google.com/d/msg/python-tulip/sovg7EIBoXs/m7U-0UXqzSQJ) you could cancel all tasks in the signal handler: ... def sig_interrupt(): print('interrupt') for task in asyncio.Task.all_ta

[issue24087] Documentation doesn't explain the term "coroutine" (PEP 342)

2015-04-30 Thread Paul Moore
New submission from Paul Moore: Although the new generator methods introduced in PEP 342 are documented, the term "coroutine" is not defined anywhere. In particular, the fact that Python coroutines work in conjunction with an event loop rather than transferring control directly between each ot

[issue23495] The writer.writerows method should be documented as accepting any iterable (not only a list)

2015-04-30 Thread Martijn Pieters
Martijn Pieters added the comment: I'd be happy to provide a patch for the DictWriter.writerows code; I was naively counting on it accepting an iterable and that it would not pull the whole sequence into memory (while feeding it gigabytes of CSV data). -- nosy: +mjpieters

[issue24085] large memory overhead when pyc is recompiled

2015-04-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is transitory memory consumption. Once the source is compiled to bytecode, memory consumption falls down to its previous level. Do you care that much about it? -- nosy: +pitrou ___ Python tracker

[issue24086] Configparser interpolation is unexpected

2015-04-30 Thread Trevor Bekolay
New submission from Trevor Bekolay: I was having an issue installing a package in Python 3, which installed properly in Python 2. This is the error message I got: Complete output from command python setup.py egg_info: Traceback (most recent call last): ... snip unhelpful traceback

[issue24085] large memory overhead when pyc is recompiled

2015-04-30 Thread Buck Evan
Buck Evan added the comment: Also, we've reproduced this in both linux and osx. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue24085] large memory overhead when pyc is recompiled

2015-04-30 Thread Buck Evan
New submission from Buck Evan: In the attached example I show that there's a significant memory overhead present whenever a pre-compiled pyc is not present. This only occurs with more than 5225 objects (dictionaries in this case) allocated. At 13756 objects, the mysterious pyc overhead is 50% o

[issue24079] xml.etree.ElementTree.Element.text does not conform to the documentation

2015-04-30 Thread Jérôme Laurens
Jérôme Laurens added the comment: Erratum def innertext(elt): return (elt.text or '') +''.join(innertext(e)+(e.tail or '') for e in elt) -- ___ Python tracker ___ __

[issue24079] xml.etree.ElementTree.Element.text does not conform to the documentation

2015-04-30 Thread Jérôme Laurens
Jérôme Laurens added the comment: The totsstring(..., method='text') is not suitable for the inner text because it adds the tail of the top element. A proper implementation would be def innertext(elt): return (elt.text or '') +''.join(innertext(e)+e.tail for e in elt) that can be included

[issue24060] Clearify necessities for logging with timestamps

2015-04-30 Thread R. David Murray
R. David Murray added the comment: Not to my eyes. It clearly says that if no formatting string is specified, the default is used, and that formatTime is used only if the message string contains asctime. Up to Vinay whether he thinks it is worth adding something like "which does not include

[issue24084] pstats: sub-millisecond display

2015-04-30 Thread Romuald Brunet
New submission from Romuald Brunet: When running pstats with functions that take less than 0.5 millisecond (per call for example), the value shown is '0.000, which isn't really helpful. This patch aims to show the value in microseconds instead of seconds for values that would otherwise be disp

[issue23441] rlcompleter: tab on empty prefix => insert spaces

2015-04-30 Thread R. David Murray
R. David Murray added the comment: Per the discussion in issue 5845, I'm setting this to release blocker to make sure it gets committed before the next release. I'm also adding 3.4 as I think this is a bug. Any objections to that? -- nosy: +larry priority: normal -> release blocker s

[issue24081] Obsolete caveat in reload() docs

2015-04-30 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +brett.cannon, eric.snow, ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue24083] MSVCCompiler.get_msvc_path() doesn't work on Win x64

2015-04-30 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I checked the registry to find the correct root. This would be Software\Microsoft\VisualStudio\. However, VC 9.0 no longer seems to set the variables the method is looking for, so even if the .__root attribute problem gets fixed, the method would not find

[issue23910] property_descr_get reuse argument tuple

2015-04-30 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue24083] MSVCCompiler.get_msvc_path() doesn't work on Win x64

2015-04-30 Thread Marc-Andre Lemburg
New submission from Marc-Andre Lemburg: Trying to use .get_msvc_path() on an distutils.msvccompiler.MSVCCompiler() instance raises an AttributeError: MSVCCompiler instance has no attribute '_MSVCCompiler__root' The reason seems to be that self.__root is not set for Win x64 in .__init__(). Her

[issue10544] yield expression inside generator expression does nothing

2015-04-30 Thread A. Jesse Jiryu Davis
Changes by A. Jesse Jiryu Davis : -- nosy: +emptysquare ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue23910] property_descr_get reuse argument tuple

2015-04-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 661cdbd617b8 by Raymond Hettinger in branch 'default': Issue #23910: Optimize property() getter calls. Patch by Joe Jevnik https://hg.python.org/cpython/rev/661cdbd617b8 -- nosy: +python-dev ___ Python t

[issue24052] sys.exit(code) returns "success" to the OS for some nonzero values of code

2015-04-30 Thread R. David Murray
R. David Murray added the comment: Printing the actual value feels more consistent with the documented API, so I'm in favor of that (ie: don't let errors pass silently). I'm sure someone somewhere is depending on this :(, but I see you have versions marked for 3.5 only, which makes sense to m

[issue24082] Obsolete note in argument parsing (c-api/arg.rst)

2015-04-30 Thread Petr Viktorin
New submission from Petr Viktorin: A note in the docs for the "u" format unit saus NULs are not allowed, but the previous sentence says they aren't accepted. -- assignee: docs@python components: Documentation files: 0002-Remove-obsolete-note-in-argument-parsing-docs.patch keywords: patc

[issue24081] Obsolete caveat in reload() docs

2015-04-30 Thread Petr Viktorin
New submission from Petr Viktorin: imp.reload() and importlib.reload() docs state:: If a module is syntactically correct but its initialization fails, the first :keyword:`import` statement for it does not bind its name locally, but does store a (partially initialized) module object i

[issue24080] asyncio.Event.wait() Task was destroyed but it is pending

2015-04-30 Thread Matt Johnston
New submission from Matt Johnston: asyncio.Event.wait() doesn't seem to be cancelled by asyncio.wait_for(). Ctrl-c in the attached example produces output below. I'm not certain the code is correct though the documentation for wait_for() suggests it should work. Without the wait_for() it doesn

[issue24079] xml.etree.ElementTree.Element.text does not conform to the documentation

2015-04-30 Thread Jérôme Laurens
Jérôme Laurens added the comment: Since the text and tail notions seem tightly coupled, I would vote for a more detailed explanation in the text doc and a forward link in the tail documentation. """ text The text attribute holds the text between the element's begin tag and the next tag

[issue4356] Add "key" argument to "bisect" module functions

2015-04-30 Thread Eric Reynolds
Eric Reynolds added the comment: In the meantime here is a workaround https://gist.github.com/ericremoreynolds/2d80300dabc70eebc790 -- nosy: +ericreynolds ___ Python tracker ___

[issue21518] Expose RegUnLoadKey in winreg

2015-04-30 Thread Claudiu Popa
Claudiu Popa added the comment: Hello, Can anyone review the last patch? Hopefully it is the final version, since the beta is really at the corner and I definitely would like to have this in 3.5. -- ___ Python tracker

[issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument

2015-04-30 Thread Claudiu Popa
Changes by Claudiu Popa : -- nosy: +Claudiu.Popa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument

2015-04-30 Thread Claudiu Popa
Changes by Claudiu Popa : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue24005] Documentation Error: Extra line Break

2015-04-30 Thread Tim Golden
Tim Golden added the comment: Jaivish Kothari, Thanks for making the effort to contribute. Can I suggest you have a look at the Core Mentorship site: http://pythonmentors.com/ and perhaps join the Core Mentorship list: http://mail.python.org/mailman/listinfo/core-mentorship TJG

[issue24079] xml.etree.ElementTree.Element.text does not conform to the documentation

2015-04-30 Thread Stefan Behnel
Stefan Behnel added the comment: I agree that the wording in the documentation isn't great: """ text The text attribute can be used to hold additional data associated with the element. As the name implies this attribute is usually a string but may be any application-specific object. If th