[issue25410] Clean up and fix OrderedDict

2015-10-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset b6e33798f82a by Serhiy Storchaka in branch '3.5': Issue #25410: Cleaned up and fixed minor bugs in C implementation of OrderedDict. https://hg.python.org/cpython/rev/b6e33798f82a New changeset 741ef17e9b86 by Serhiy Storchaka in branch 'default': I

[issue25395] SIGSEGV using json.tool: highly nested OrderedDict

2015-10-17 Thread Martin Panter
Martin Panter added the comment: The following simplified code produces the crash: from collections import OrderedDict obj = [] for _ in range(33): obj = OrderedDict(((None, obj),)) for _ in range(17): obj = [obj] print("Still alive, crash happens at interpreter finalization") This cras

[issue25410] Clean up and fix OrderedDict

2015-10-17 Thread Eric Snow
Eric Snow added the comment: Posted to python-dev: https://mail.python.org/pipermail/python-dev/2015-October/141953.html https://mail.python.org/pipermail/python-dev/2015-October/141954.html -- stage: patch review -> commit review ___ Python tracker

[issue25410] Clean up and fix OrderedDict

2015-10-17 Thread Eric Snow
Eric Snow added the comment: > Backward compatibility related to __class__ assignment was already broken in C > implementation. In 3.4 following code works: [snip] > In 3.5 it doesn't. Depending on what feedback we get from python-dev, that may need to be fixed. I'd be inclined to not worry abo

[issue25410] Clean up and fix OrderedDict

2015-10-17 Thread Eric Snow
Eric Snow added the comment: new patch LGTM -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue25410] Clean up and fix OrderedDict

2015-10-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch addresses Eric's comments. Changes related to #3 are reverted. We will return to this after discussing on Python-Dev. -- ___ Python tracker ___

[issue25410] Clean up and fix OrderedDict

2015-10-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file40803/odict_cleanup_2.patch ___ Python tracker ___ ___ Python-bugs-list m

[issue25430] speed up ipaddress __contain__ method

2015-10-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +ncoghlan, pmoody stage: -> patch review versions: -Python 3.4, Python 3.5 ___ Python tracker ___ ___

[issue25431] implement address in network in ipaddress module

2015-10-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +speed up ipaddress __contain__ method nosy: +ncoghlan, pmoody stage: -> patch review type: -> enhancement versions: -Python 3.4, Python 3.5 ___ Python tracker

[issue25432] isinstance documentation doesn't explain what happens when type is tuple

2015-10-17 Thread eryksun
eryksun added the comment: Since Python has multiple inheritance, it could be misconstrued as a conjunctive test. For example, if c is an instance of C, which subclasses both A and B, then someone might think isinstance(c, (A, B)) requires c to be an instance of both A and B. The description c

[issue25410] Clean up and fix OrderedDict

2015-10-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Regarding Py_TYPE(od) vs. od.__class__, there is a difference for > subclasses, as you demonstrated in your example. [1] Thanks for explaining > your rationale. I now understand your argument about using PyTYPE() for > repr and pickle in C types. I still h

[issue25429] Can segfault Python with itertools.chain.from_iterable

2015-10-17 Thread Zachary Ware
Changes by Zachary Ware : -- stage: -> resolved ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue25432] isinstance documentation doesn't explain what happens when type is tuple

2015-10-17 Thread R. David Murray
R. David Murray added the comment: I don't see any ambiguity here. There are other Python APIs with the same behavior, and all we say is that it can be a tuple (eg: str.startswith). That is, I don't see any other way a tuple could be interpreted that would make any sense. -- nosy: +

[issue25410] Clean up and fix OrderedDict

2015-10-17 Thread Eric Snow
Eric Snow added the comment: Regarding #7, I see what you did now. That looks fine to me. -- ___ Python tracker ___ ___ Python-bugs-l

[issue25431] implement address in network in ipaddress module

2015-10-17 Thread Aleksandr Balezin
Changes by Aleksandr Balezin : -- versions: +Python 3.4, Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue25430] speed up ipaddress __contain__ method

2015-10-17 Thread Aleksandr Balezin
Changes by Aleksandr Balezin : -- versions: +Python 3.4, Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue25405] User install of 3.5 removes py.exe from C:\Windows

2015-10-17 Thread Vinay Sajip
Changes by Vinay Sajip : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue25410] Clean up and fix OrderedDict

2015-10-17 Thread Eric Snow
Eric Snow added the comment: Regarding #5, you're right about OrderedDict().__dict__ being empty for the C implementation. (Nice observation!) So I'm okay with ripping all that code out of odict_reduce(). Since we're still accessing od.__dict__ through _PyObject_GetAttrId() that should not

[issue25410] Clean up and fix OrderedDict

2015-10-17 Thread Eric Snow
Eric Snow added the comment: Regarding Py_TYPE(od) vs. od.__class__, there is a difference for subclasses, as you demonstrated in your example. [1] Thanks for explaining your rationale. I now understand your argument about using PyTYPE() for repr and pickle in C types. I still have concerns

[issue25419] Readline completion of module names in import statements

2015-10-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Added few cursory comments on Rietveld. "sys" and "os.path" cases are not critical and we can ignore them if it complicates the code. But preserving Completer independence from readline looks more important to me. We can just add methods get_line_buffer(), g

[issue25411] SMTPHandler in the logging module fails with unicode strings

2015-10-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset eb843115e052 by Vinay Sajip in branch '3.4': Closes #25411: Improved Unicode support in SMTPHandler. https://hg.python.org/cpython/rev/eb843115e052 New changeset b99b3ddd0ac4 by Vinay Sajip in branch '3.5': Closes #25411: Merged fix from 3.4. https:

[issue25432] isinstance documentation doesn't explain what happens when type is tuple

2015-10-17 Thread Michael Crouch
New submission from Michael Crouch: In the section on isinstance() in the Python Standard Library documentation Chapter 2 (https://docs.python.org/3.6/library/functions.html#isinstance) , it says that classinfo "may be a tuple of type objects", but it doesn't explain what the semantics are in

[issue16182] readline: Wrong tab completion scope indices in Unicode terminals

2015-10-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue12873] 2to3 incorrectly handles multi-line imports from __future__

2015-10-17 Thread Jos de Kloe
Jos de Kloe added the comment: still having this issue with 2to3 from python-tools-2.7.8-11 as packaged by Fedora 21. Any progress since 2011? -- nosy: +jdekloe ___ Python tracker _

[issue25431] implement address in network in ipaddress module

2015-10-17 Thread Александр Балезин
New submission from Александр Балезин: Current realization of _BaseNetwork.__contains__ always returns False if other is _BaseNetwork. This patch implements proper comparison of _BaseNetwork objects. -- components: Library (Lib) files: ipaddress_contains_network.patch keywords: patch m

[issue25411] SMTPHandler in the logging module fails with unicode strings

2015-10-17 Thread simon04
simon04 added the comment: I omitted the date header w/o intent. Basically because I couldn't quickly figure out how to set it. -- ___ Python tracker ___ ___

[issue25430] speed up ipaddress __contain__ method

2015-10-17 Thread Александр Балезин
New submission from Александр Балезин: Current check "address in network" is seems a bit odd: int(self.network_address) <= int(other._ip) < int(self.broadcast_address) This patch make this in bit-operation manner. Perfomace test: import ipaddress import timeit class IPv6Network2(ipaddress.IPv6

[issue25335] ast.literal_eval fails to parse numbers with leading "+"

2015-10-17 Thread Mark Dickinson
Mark Dickinson added the comment: > I am pretty sure the 2.x anomaly is tied up with having short ints plus the > anomaly of having one more negative than positive int. Yes, that was the rationale for folding in the minus operation. It had some odd side-effects, though: >>> -1j -1j >>> -(1j)

[issue22570] Better stdlib support for Path objects

2015-10-17 Thread Torsten Bronger
Torsten Bronger added the comment: Please be conservative with adding methods to Path. FWIW, my own experiences with pathlib have shown that utility methods have the disadvantage of duplicating well-established Python idioms. This reduces code readability in my opinion. While it is desirable

[issue22570] Better stdlib support for Path objects

2015-10-17 Thread Torsten Bronger
Changes by Torsten Bronger : -- nosy: +bronger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue22612] Add block info to unicodedata

2015-10-17 Thread Denis Jacquerye
Changes by Denis Jacquerye : -- nosy: +Denis Jacquerye ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue6331] Add unicode script info to the unicode database

2015-10-17 Thread Denis Jacquerye
Changes by Denis Jacquerye : -- nosy: +Denis Jacquerye ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m