[issue24079] xml.etree.ElementTree.Element.text does not conform to the documentation
Raymond Hettinger added the comment: this is well formed xml and has nothing to do with tail. In fact, it does have something to do with tail. The 'TEXT' is a captured as the tail of element b: root3 = ET.fromstring('ab/TEXT/a') root3[0].tail 'TEXT' -- nosy: +eli.bendersky, rhettinger, scoder ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24079 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24005] Documentation Error: Extra line Break
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 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24005 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24079] xml.etree.ElementTree.Element.text does not conform to the documentation
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 the element is created from an XML file the attribute will contain any text found between the element tags. tail The tail attribute can be used to hold additional data associated with the element. This attribute is usually a string but may be any application-specific object. If the element is created from an XML file the attribute will contain any text found after the element’s end tag and before the next tag. Special cases that no-one uses (sticking non-string objects into text/tail) are given too much space and the difference isn't explained as needed. Since the distinction between text and tail is a (great but) rather special feature of ElementTree, it needs to be given more room in the docs. Proposal: text The text attribute holds the immediate text content of the element. It contains any text found up to either the closing tag if the element has no children, or the next opening child tag within the element. For text following an element, see the `tail` attribute. To collect the entire text content of a subtree, see `tostring`. Applications may store arbitrary objects in this attribute. tail The tail attribute holds any text that directly follows the element. For example, in a document like ``aTextb/BTailc/CTail/a``, the `text` attribute of the ``a`` element holds the string Text, and the tail attributes of ``b`` and ``c`` hold the strings BTail and CTail respectively. Applications may store arbitrary objects in this attribute. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24079 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument
Changes by Claudiu Popa pcmantic...@gmail.com: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21423 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument
Changes by Claudiu Popa pcmantic...@gmail.com: -- nosy: +Claudiu.Popa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21423 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21518] Expose RegUnLoadKey in winreg
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 rep...@bugs.python.org http://bugs.python.org/issue21518 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4356] Add key argument to bisect module functions
Eric Reynolds added the comment: In the meantime here is a workaround https://gist.github.com/ericremoreynolds/2d80300dabc70eebc790 -- nosy: +ericreynolds ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4356 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24079] xml.etree.ElementTree.Element.text does not conform to the documentation
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 or None. The tail attribute holds the text between the element's end tag and the next tag or None. For ab1c2d/3/c/b4/a xml data, the a element has None for both text and tail attributes, the b element has text '1' and tail '4', the c element has text '2' and tail None, the d element hast text None and tail '3'. To collect the inner text of an element, see `tostring` with method 'text'. Applications may store arbitrary objects in this attribute. tail The tail attribute holds the text between the element's end tag and the next tag or None. See `text` for more details. Applications may store arbitrary objects in this attribute. It is very important to mention that the 'text' attribute does not always hold a string contrary to what would suggest its name. BTW, I was not aware of the tostring method with 'text' argument. The fact is that the documentation reads Returns an (optionally) encoded string containing the XML data. which is misleading because the text is not xml data in general. This also needs to be rephrased or simply removed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24079 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23910] property_descr_get reuse argument tuple
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 tracker rep...@bugs.python.org http://bugs.python.org/issue23910 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24082] Obsolete note in argument parsing (c-api/arg.rst)
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: patch messages: 242271 nosy: docs@python, encukou priority: normal severity: normal status: open title: Obsolete note in argument parsing (c-api/arg.rst) versions: Python 3.4 Added file: http://bugs.python.org/file39236/0002-Remove-obsolete-note-in-argument-parsing-docs.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24082 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10544] yield expression inside generator expression does nothing
Changes by A. Jesse Jiryu Davis je...@emptysquare.net: -- nosy: +emptysquare ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10544 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24080] asyncio.Event.wait() Task was destroyed but it is pending
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't suffer from pending task destruction. This is Python 3.4.3. Hello World! Hello World! ^CTraceback (most recent call last): File ./loop2.py, line 27, in module loop.run_until_complete(hello_world()) File /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/asyncio/base_events.py, line 304, in run_until_complete self.run_forever() File /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/asyncio/base_events.py, line 276, in run_forever self._run_once() File /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/asyncio/base_events.py, line 1136, in _run_once event_list = self._selector.select(timeout) File /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/selectors.py, line 502, in select kev_list = self._kqueue.control(None, max_ev, timeout) KeyboardInterrupt Task was destroyed but it is pending! task: Task pending coro=wait() running at /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/asyncio/locks.py:242 wait_for=Future pending cb=[Task._wakeup()] cb=[_release_waiter(Future pendi...sk._wakeup()])() at /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/asyncio/tasks.py:335] [1]8134 exit 1 ../venv3/bin/python3 ./loop2.py -- components: asyncio files: loop2.py messages: 242269 nosy: gvanrossum, haypo, matt, yselivanov priority: normal severity: normal status: open title: asyncio.Event.wait() Task was destroyed but it is pending versions: Python 3.4 Added file: http://bugs.python.org/file39234/loop2.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24080 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24081] Obsolete caveat in reload() docs
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 in ``sys.modules``. To reload the module you must first :keyword:`import` it again (this will bind the name to the partially initialized module object) before you can :func:`reload` it. If I reading that correctly, initialization refers to executing the module, so for module containing just:: uninitialized_variable the following:: import sys import x Traceback (most recent call last): File stdin, line 1, in module File /tmp/x.py, line 1, in module uninitialized_variable NameError: name 'uninitialized_variable' is not defined should leave me with a initialized module in sys.modules['x']. However, this is not what happens, in either Python 3.4 or 2.7:: sys.modules['x'] Traceback (most recent call last): File stdin, line 1, in module KeyError: 'x' Here's a patch to remove the caveat in Python 3 docs. If I missed something, and initialization refers to something else, it should be clarified. -- assignee: docs@python components: Documentation files: 0001-Remove-obsolete-caveat-from-reload-docs.patch keywords: patch messages: 242270 nosy: docs@python, encukou priority: normal severity: normal status: open title: Obsolete caveat in reload() docs versions: Python 2.7, Python 3.4 Added file: http://bugs.python.org/file39235/0001-Remove-obsolete-caveat-from-reload-docs.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24081 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24079] xml.etree.ElementTree.Element.text does not conform to the documentation
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 rep...@bugs.python.org http://bugs.python.org/issue24079 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24060] Clearify necessities for logging with timestamps
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 a reference to the date/time after the mention of using the default message if fmt is not supplied. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24060 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24079] xml.etree.ElementTree.Element.text does not conform to the documentation
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 in the doc instead of the mention of the to string trick -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24079 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24085] large memory overhead when pyc is recompiled
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% of memory usage. I've reproduced this issue in python 2.6, 2.7, 3.4. I imagine it's present in all cpythons. $ python -c 'import repro' 16736 $ python -c 'import repro' 8964 $ python -c 'import repro' 8964 $ rm *.pyc; python -c 'import repro' 16740 $ rm *.pyc; python -c 'import repro' 16736 $ rm *.pyc; python -c 'import repro' 16740 -- files: repro.py messages: 242281 nosy: bukzor priority: normal severity: normal status: open title: large memory overhead when pyc is recompiled versions: Python 3.4 Added file: http://bugs.python.org/file39238/repro.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24085 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24087] Documentation doesn't explain the term coroutine (PEP 342)
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 other is not mentioned. -- assignee: docs@python components: Documentation files: coroutine_docs.patch keywords: needs review, patch messages: 242286 nosy: docs@python, gvanrossum, paul.moore priority: normal severity: normal stage: patch review status: open title: Documentation doesn't explain the term coroutine (PEP 342) type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file39239/coroutine_docs.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24087 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24080] asyncio.Event.wait() Task was destroyed but it is pending
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_tasks(): task.cancel() loop.add_signal_handler(signal.SIGINT, sig_interrupt) ... -- nosy: +mpaolini ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24080 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24060] Clearify necessities for logging with timestamps
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 ... and then link to the LogRecord Attributes section. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24060 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24085] large memory overhead when pyc is recompiled
Buck Evan added the comment: Also, we've reproduced this in both linux and osx. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24085 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23495] The writer.writerows method should be documented as accepting any iterable (not only a list)
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23495 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24085] large memory overhead when pyc is recompiled
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 rep...@bugs.python.org http://bugs.python.org/issue24085 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24086] Configparser interpolation is unexpected
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 ... File /usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/configparser.py, line 423, in _interpolate_some found: %r % (rest,)) configparser.Interpolation Command python setup.py egg_info failed with error code 1 in /private/var/folders/12/p4ngkfbx2pnb1ln81csjb19cgn/T/pip-build-6xhgg5x6/nengo This wasn't a super helpful error message. I managed to figure out that Python 3 (or setuptools?) was attempting to parse my ~/.pypirc file, which raised a configparser.InterpolationSyntaxError because my password contained a percent-sign. Configparser doesn't try to interpolate this string in Python 2, so it worked fine. As a workaround, I've changed my PyPI password, but this failure was quite surprising to me. As for what I would expect to happen, I would not expect interpolation to happen if I don't want it to happen. All of the examples shown on in the docs use the syntax %(key)s or ${key}. If this is the only way to interpolate, then why is % ambiguous? Surely we can look forward one character, and if it's not ( then % should be interpreted literally. Instead, configparser requires me to disambiguate with %%. But, this would cause my string to be parsed incorrectly in Python 2's configparser, so I'm unable to make that change. -- components: Library (Lib) messages: 242283 nosy: tbekolay priority: normal severity: normal status: open title: Configparser interpolation is unexpected type: behavior versions: Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24086 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24089] argparse crashes with AssertionError
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 module arguments = parser.parse_args() File /usr/lib/python2.7/argparse.py, line 1701, in parse_args args, argv = self.parse_known_args(args, namespace) File /usr/lib/python2.7/argparse.py, line 1733, in parse_known_args namespace, args = self._parse_known_args(args, namespace) File /usr/lib/python2.7/argparse.py, line 1939, in _parse_known_args start_index = consume_optional(start_index) File /usr/lib/python2.7/argparse.py, line 1879, in consume_optional take_action(action, args, option_string) File /usr/lib/python2.7/argparse.py, line 1807, in take_action action(self, namespace, argument_values, option_string) File /usr/lib/python2.7/argparse.py, line 996, in __call__ parser.print_help() File /usr/lib/python2.7/argparse.py, line 2340, in print_help self._print_message(self.format_help(), file) File /usr/lib/python2.7/argparse.py, line 2314, in format_help return formatter.format_help() File /usr/lib/python2.7/argparse.py, line 281, in format_help help = self._root_section.format_help() File /usr/lib/python2.7/argparse.py, line 211, in format_help func(*args) File /usr/lib/python2.7/argparse.py, line 332, in _format_usage assert ' '.join(opt_parts) == opt_usage AssertionError -- components: Distutils messages: 242299 nosy: dstufft, eric.araujo, spaceone priority: normal severity: normal status: open title: argparse crashes with AssertionError type: crash versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24089 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2651] Strings passed to KeyError do not round trip
Ł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 rep...@bugs.python.org http://bugs.python.org/issue2651 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24085] large memory overhead when pyc is recompiled
Anthony Sottile added the comment: Adding `import gc; gc.collect()` doesn't change the outcome afaict -- nosy: +asottile ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24085 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24074] string, center, ljust, rjust, width paramter should accept None
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 rep...@bugs.python.org http://bugs.python.org/issue24074 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23572] functools.singledispatch fails when not BaseClass is True
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23572 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24005] Documentation Error: Extra line Break
Jaivish Kothari added the comment: Thank you Tim. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24005 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24086] Configparser interpolation is unexpected
Changes by Ned Deily n...@acm.org: -- nosy: +lukasz.langa versions: +Python 3.5 -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24086 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24088] yield expression confusion
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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24088 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10435] Document unicode C-API in reST
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_LOW_SURROGATE Py_UNICODE_MATCH PyUnicode_WSTR_LENGTH PyUnicode_AS_DATA PyUnicode_IS_ASCII PyUnicode_IS_COMPACT PyUnicode_IS_COMPACT_ASCII PyUnicode_IS_READY Py_UNICODE_REPLACEMENT_CHARACTER PyUnicode_FromString PyUnicode_GetMax PyUnicode_Resize PyUnicode_InternImmortal PyUnicode_CHECK_INTERNED PyUnicode_FromOrdinal PyUnicode_GetDefaultEncoding PyUnicode_AsDecodedObject PyUnicode_AsDecodedUnicode PyUnicode_AsEncodedObject PyUnicode_AsEncodedUnicode PyUnicode_BuildEncodingMap PyUnicode_DecodeCodePageStateful PyUnicode_EncodeDecimal PyUnicode_Append PyUnicode_AppendAndDel PyUnicode_Partition PyUnicode_RPartition PyUnicode_RSplit PyUnicode_IsIdentifier Py_UNICODE_strlen Py_UNICODE_strcpy Py_UNICODE_strcat Py_UNICODE_strncpy Py_UNICODE_strcmp Py_UNICODE_strncmp Py_UNICODE_strchr Py_UNICODE_strrchr -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10435 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24086] Configparser interpolation is unexpected
Ł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 that open to find what's the source of the exception and maybe add a more helpful message there. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24086 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24084] pstats: sub-millisecond display
Changes by Ned Deily n...@acm.org: -- nosy: +georg.brandl stage: - patch review versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24084 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23572] functools.singledispatch fails when not BaseClass is True
Łukasz Langa added the comment: Yes, this needs addressing. -- assignee: - lukasz.langa versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23572 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24088] yield expression confusion
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 one of the generator’s methods is called. At a minimum, that seems to be using generator function in two different ways, but I think there are other problems. Proposed: When a generator function is called, it returns a special kind of iterator known as a generator. The iteration starts when one of the generator’s methods is called. -- assignee: docs@python components: Documentation, asyncio messages: 242289 nosy: Jim.Jewett, docs@python, gvanrossum, haypo, yselivanov priority: normal severity: normal status: open title: yield expression confusion type: enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24088 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24076] sum() several times slower on Python 3
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 on a range() can be done O(1): it's just a variation on a arithmetic series) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24076 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23910] property_descr_get reuse argument tuple
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23910 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24083] MSVCCompiler.get_msvc_path() doesn't work on Win x64
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 anything useful. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24083 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24083] MSVCCompiler.get_msvc_path() doesn't work on Win x64
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__(). Here's an example from Python 2.7.9: from distutils.msvccompiler import * c = OldMSVCCompiler() vars(c) {'force': 0, 'verbose': 0, 'dry_run': 0, 'runtime_library_dirs': [], 'libraries': [], 'macros': [], 'objects': [], 'output_dir': None, '_MSVCCompiler__product': 'Microsoft SDK compiler 15.0', 'initialized': False, '_MSVCCompiler__arch': 'AMD64', '_MSVCCompiler__version': 9.0, 'library_dirs': [], 'include_dirs': []} c.get_msvc_paths('include') Traceback (most recent call last): File stdin, line 1, in module File D:\Python27\lib\distutils\msvccompiler.py, line 615, in get_msvc_paths % (self.__root, self.__version)) AttributeError: MSVCCompiler instance has no attribute '_MSVCCompiler__root' The newer implementation of MSVCCompiler in msvc9compiler doesn't have this method, so cannot be used to find the include and library paths. -- components: Distutils messages: 242274 nosy: dstufft, eric.araujo, lemburg priority: normal severity: normal status: open title: MSVCCompiler.get_msvc_path() doesn't work on Win x64 versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24083 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24081] Obsolete caveat in reload() docs
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +brett.cannon, eric.snow, ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24081 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24052] sys.exit(code) returns success to the OS for some nonzero values of code
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 me. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24052 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23441] rlcompleter: tab on empty prefix = insert spaces
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 stage: patch review - commit review type: enhancement - behavior versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23441 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24084] pstats: sub-millisecond display
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 displayed as '0.000' (the display may have to be tweaked for non-utf8 users, as the µ character is used) Example output: ncalls tottime percall cumtime percall filename:lineno(function) 98270.007 7µs0.007 7µs {method 'get' of 'dict' objects} 34270.009 25µs0.017 49µs {map} 107010.006 5µs0.006 5µs {method 'lower' of 'str' objects} 314100.045 14µs0.045 14µs {method 'split' of 'str' objects} 100230.006 6µs0.006 6µs {_weakref.proxy} 318010.009 2µs0.009 2µs {len} 38920.003 7µs0.003 7µs {method 'extend' of 'list' objects} 13970.001 8µs0.001 8µs {method 'replace' of 'str' objects} 104880.010 9µs0.010 9µs {method 'string_literal' of '_mysql.connection' objects} 107022.620 2447µs2.620 2447µs {method 'readline' of 'file' objects} 100230.004 3µs0.004 3µs {method 'info' of '_mysql.connection' objects} 100230.005 5µs0.005 5µs {method 'insert_id' of '_mysql.connection' objects} 143270.022 15µs0.022 15µs {method 'rstrip' of 'str' objects} -- components: Library (Lib) files: pstats-microseconds.patch keywords: patch messages: 242277 nosy: Romuald priority: normal severity: normal status: open title: pstats: sub-millisecond display type: enhancement Added file: http://bugs.python.org/file39237/pstats-microseconds.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24084 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com