[issue28236] In xml.etree.ElementTree Element can be created with empty and None tag

2017-12-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Raymond. Supporting non-string tags is a feature of ElementTree that is used internally (for comments, etc) and can be used in user code. And the C implementation intentionally reproduces this feature. --

[issue32422] Make OrderedDict can be used for LRU from C

2017-12-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a duplicate of issue28239. -- nosy: +serhiy.storchaka resolution: -> duplicate superseder: -> Implement functools.lru_cache() using ordered dict ___ Python tracker

[issue32414] PyCapsule_Import fails when name is in the form 'package.module.capsule'

2017-12-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 4988 will break the case 'module.attr.capsule' if 'module.attr' is not a module. -- nosy: +serhiy.storchaka ___ Python tracker

[issue32398] OSX C++ linking workaround in distutils breaks other packages

2017-12-24 Thread Ronald Oussoren
Ronald Oussoren added the comment: As I mentioned on the pull request it is not clear to me what the actual issue is. What are the settings for building that cause problems? In particular, what are the compiler/linker related variables in Python's Makefile (and

[issue32422] Make OrderedDict can be used for LRU from C

2017-12-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, sorry, you use OrderedDict instead of just ordered dict. It should have different timing and memory consumption. -- resolution: duplicate -> stage: resolved -> status: closed -> open superseder: Implement

[issue32360] Save OrderedDict imports in various stdlibs.

2017-12-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Raymond. I made the same searching before and have found that there are not much opportunities for getting rid of OrderedDict and there are even less cases that will get a benefit from this. -- nosy:

[issue32421] Keeping an exception in cache can segfault the interpreter

2017-12-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue32390] AIX (xlc_r) compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2017-12-24 Thread Xavier de Gaye
Xavier de Gaye added the comment: > The PPC64 AIX 3.x Python buildbot > (http://buildbot.python.org/all/#/builders/10) has been failing upon this > same error for over a month. Michael Felt answered by email: > Not quite a month: 8 days ago (test 357 was the first with

[issue32422] Make OrderedDict can be used for LRU from C

2017-12-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- stage: -> resolved status: open -> closed ___ Python tracker ___

[issue32420] LookupError : unknown encoding : [0x7FF092395AD0] ANOMALY

2017-12-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please provide the output as a text instead of a picture? -- nosy: +serhiy.storchaka ___ Python tracker

[issue32419] Add unittest support for pyc projects

2017-12-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +Library (Lib) -Extension Modules nosy: +ezio.melotti, michael.foord, rbcollins versions: -Python 3.6, Python 3.8 ___ Python tracker

[issue26133] asyncio: ugly error related to signal handlers at exit if the loop is not closed explicitly

2017-12-24 Thread Andrew Svetlov
Change by Andrew Svetlov : -- pull_requests: +4891 ___ Python tracker ___ ___

[issue28236] In xml.etree.ElementTree Element can be created with empty and None tag

2017-12-24 Thread Stefan Behnel
Stefan Behnel added the comment: I also consider it an actual feature of ElementTree to allow arbitrary objects as its tags, even if it's not one of the most prominent. lxml cannot copy this because it is based on C libraries internally, but that shouldn't prevent ET

[issue32414] PyCapsule_Import fails when name is in the form 'package.module.capsule'

2017-12-24 Thread lekma
lekma added the comment: > PR 4988 will break the case 'module.attr.capsule' if 'module.attr' is > not a module. you are right, but is that a case you would expect in an import statement? -- ___ Python tracker

[issue32419] Add unittest support for pyc projects

2017-12-24 Thread R. David Murray
R. David Murray added the comment: Éric: in python3 if no .py is found but a .pyc is found where the .py is expected, it will be imported and run. This supports sourceless package distributions, which is something we only sorta-support :) The change looks simple

[issue32422] Make OrderedDict can be used for LRU from C

2017-12-24 Thread INADA Naoki
INADA Naoki added the comment: I found odict.pop() and odict.popitem() is very inefficient because it look up key multiple times. odict seems not optimized well and very slow than dict in some area... I'll try to optimize it in holidays. --

[issue32422] Make OrderedDict can be used for LRU from C

2017-12-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, I'm the original author and designer of this code, so it would have been appropriate to assign this to me for sign-off on any proposed changes. -- assignee: -> rhettinger ___

[issue28236] In xml.etree.ElementTree Element can be created with empty and None tag

2017-12-24 Thread Gordon P. Hemsley
Gordon P. Hemsley added the comment: Issues of potential relevance to this discussion: * Issue28237 - In xml.etree.ElementTree bytes tag or attributes raises on serialization * Issue5166 - ElementTree and minidom don't prevent creation of not well-formed XML

[issue32422] Make OrderedDict can be used for LRU from C

2017-12-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > FWIW, I'm the original author and designer of this code, so it would have > been appropriate to assign this to me for sign-off on any proposed changes. Not me (the C implementation)? ;-) --

[issue32137] Stack overflow in repr of deeply nested dicts

2017-12-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please take a look at PR 4689 and PR 4812 Raymond? I remember you had objections against similar changes and I have small hesitates. What way of solving this issue in maintained releases do you prefer? --

[issue32411] Idlelib.browser: stop sorting dicts created by pyclbr

2017-12-24 Thread Cheryl Sabella
Cheryl Sabella added the comment: Terry, In test_browser, would it be a good test if mock_pyclbr_tree was created as `mock_pyclbr_tree = {'C0': C0, 'f0': f0}` instead of `mock_pyclbr_tree = {'f0': f0, 'C0': C0}`? The reason that I'm asking is that, under 2.7 and 3.3,

[issue32384] Generator tests is broken in non-CPython implementation

2017-12-24 Thread Srinivas Reddy T
Change by Srinivas Reddy T : -- pull_requests: +4894 ___ Python tracker ___

[issue32422] Make OrderedDict can be used for LRU from C

2017-12-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: Please stop revising every single thing you look at. The traditional design of LRU caches used doubly linked lists for a reason. In particular, when there is a high hit rate, the links can be updated without churning the

[issue28236] In xml.etree.ElementTree Element can be created with empty and None tag

2017-12-24 Thread Gordon P. Hemsley
Gordon P. Hemsley added the comment: To be clear, we are talking about the Element class of the ElementTree module, which is distinct from the ElementTree class of the same module. That said, I personally question the implementation decision to represent things like

[issue29209] Remove old-deprecated ElementTree features

2017-12-24 Thread Gordon P. Hemsley
Change by Gordon P. Hemsley : -- nosy: +gphemsley ___ Python tracker ___ ___

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2017-12-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +4895 ___ Python tracker ___ ___

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

2017-12-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Since this theme has been raised again in issue32422 and old patches no longer apply clearly I have updated patches and benchmark results on 64 bit. $ ./python -m perf timeit -s "from functools import lru_cache; f =

[issue32421] Keeping an exception in cache can segfault the interpreter

2017-12-24 Thread Josh Holland
Change by Josh Holland : -- nosy: +anowlcalledjosh ___ Python tracker ___ ___

[issue28236] In xml.etree.ElementTree Element can be created with empty and None tag

2017-12-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: Marking this as closed. Gordon, thank you for showing an interest in this tracker item. While fixing bugs is of interest, altering long standing intentional design decisions is not useful. The time to do that is before a

[issue32424] Rename copy() to __copy__() in xml.etree.ElementTree.Element Python implementation

2017-12-24 Thread Gordon P. Hemsley
New submission from Gordon P. Hemsley : Currently, the Python implementation of the Element class in xml.etree.ElementTree defines a method called copy() which the C implementation does not define, whereas the C implementation defines a __copy__() method (and a

[issue28236] In xml.etree.ElementTree Element can be created with empty and None tag

2017-12-24 Thread Stefan Behnel
Stefan Behnel added the comment: >That said, I personally question the implementation decision to >represent things like treating comments as an Element with a tag of a >Comment function. This is not going to change. -- ___

[issue32414] PyCapsule_Import fails when name is in the form 'package.module.capsule'

2017-12-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +brett.cannon, eric.snow, ncoghlan ___ Python tracker ___

[issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib

2017-12-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What will you say Raymond? -- ___ Python tracker ___

[issue30722] Tools/demo/redemo.py broken

2017-12-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The news message is verbose but looks misleading to me. There is nothing invalid with usages like getattr(re, 'DOTALL'). It is the same as re.DOTALL, and using enums haven't changed this. -- status: closed -> open

[issue32360] Save OrderedDict imports in various stdlibs.

2017-12-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: > * asyncio/base_events.py: Used for local variable. > * email/_header_value_parser.py: Used for local variable. > * json: Examples (in document and docstring) for keeping order, and json.tool. All of these modules have active

[issue32425] Allow non-default XML parsers to take advantage of a _parse_whole definition in xml.etree.ElementTree.ElementTree.parse()

2017-12-24 Thread Gordon P. Hemsley
Gordon P. Hemsley added the comment: Sorry, the chunks are 64 KiB. -- ___ Python tracker ___

[issue32425] Allow non-default XML parsers to take advantage of a _parse_whole definition in xml.etree.ElementTree.ElementTree.parse()

2017-12-24 Thread Gordon P. Hemsley
New submission from Gordon P. Hemsley : Currently, ElementTree.parse() in xml.etree.ElementTree only invokes _parse_whole() on the parser if no parser is specified and it falls back to the built-in XMLParser. This has two drawbacks: * If the built-in XMLParser is

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2017-12-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The main problem was with the frame.f_lineno setter. I have finally solved it in PR 5006. It solves also the regression in the with statement mentioned in msg307577 (by just restoring the original SETUP_WITH), and some other

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

2017-12-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : Added file: https://bugs.python.org/file47351/lru_cache-pop-set-2.patch ___ Python tracker ___

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

2017-12-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : Added file: https://bugs.python.org/file47350/lru_cache-get-del-set-2.patch ___ Python tracker ___

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

2017-12-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : Added file: https://bugs.python.org/file47352/lru_cache-move_to_end-2.patch ___ Python tracker ___

[issue29084] C API of OrderedDict

2017-12-24 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4896 ___ Python tracker ___

[issue29084] C API of OrderedDict

2017-12-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 1b3029ac8370ac76fa9571aef540e10aed0667ff by Serhiy Storchaka in branch 'master': bpo-29084: Exclude C API for OrderedDict from the limited C API. (#4900)

[issue26133] asyncio: ugly error related to signal handlers at exit if the loop is not closed explicitly

2017-12-24 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6, Python 3.7 -Python 3.5 ___ Python tracker

[issue26133] asyncio: ugly error related to signal handlers at exit if the loop is not closed explicitly

2017-12-24 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 5ff5d1167de88eb37265dcaf1396d12617a0ace7 by Andrew Svetlov (Miss Islington (bot)) in branch '3.6': bpo-26133: Clear signals list on interpreter finalizing (GH-5002) (#5003)

[issue21872] LZMA library sometimes fails to decompress a file

2017-12-24 Thread Shinjo Park
Shinjo Park added the comment: Hi, I think I encountered this bug with Ubuntu 17.10 / Python 3.6.3. The same error was triggered by Python's LZMA library, while the xz command line tool can extract the problematic file. Not sure whether there is the bug in 3.7/3.8. I am

[issue32419] Add unittest support for pyc projects

2017-12-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- stage: -> test needed ___ Python tracker ___

[issue32422] Make OrderedDict can be used for LRU from C

2017-12-24 Thread INADA Naoki
INADA Naoki added the comment: Hmm, it seems my implementation is 30% slower when many mishit scenario. Maybe, dict is faster than OrderedDict about massive insert/discard. But I need to profile it. On the other hand, GC speed looks about 2x faster as expected. $

[issue26133] asyncio: ugly error related to signal handlers at exit if the loop is not closed explicitly

2017-12-24 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4892 ___ Python tracker ___

[issue32335] Failed Python build on Fedora 27

2017-12-24 Thread Amit Ghadge
Amit Ghadge added the comment: build failure output; -- Added file: https://bugs.python.org/file47347/build_.txt ___ Python tracker

[issue32335] Failed Python build on Fedora 27

2017-12-24 Thread Xavier de Gaye
Xavier de Gaye added the comment: I get the same build failure when the following line is commented out in Modules/Setup: _thread _threadmodule.c # low-level threading interface Can you please attach the full output of the build. -- nosy: +xdegaye

[issue32335] Failed Python build on Fedora 27

2017-12-24 Thread Amit Ghadge
Amit Ghadge added the comment: It's work and build succeed. Thanks Xavier -- stage: -> resolved status: open -> closed ___ Python tracker

[issue32413] Document that locals() may return globals()

2017-12-24 Thread Srinivas Reddy T
Change by Srinivas Reddy T : -- keywords: +patch pull_requests: +4893 stage: -> patch review ___ Python tracker ___

[issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups

2017-12-24 Thread Christian Heimes
Change by Christian Heimes : -- nosy: +christian.heimes ___ Python tracker ___ ___

[issue32413] Document that locals() may return globals()

2017-12-24 Thread Srinivas Reddy T
Srinivas Reddy T added the comment: Done. exec(...)'s documentation covers raymond's comment. -- nosy: +thatiparthy ___ Python tracker

[issue26133] asyncio: ugly error related to signal handlers at exit if the loop is not closed explicitly

2017-12-24 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 4f146f9ed133b9ad56d4ee7a653396836af34067 by Andrew Svetlov in branch 'master': bpo-26133: Clear signals list on interpreter finalizing (#5002)

[issue32420] LookupError : unknown encoding : [0x7FF092395AD0] ANOMALY

2017-12-24 Thread Kaoru Kitamura
Kaoru Kitamura added the comment: The below is the output of error. :\Users\kitamura>activate tensorflow パラメーターの書式が違います - [0x7FFD92395AD0] [0x7FFD8F53DFE0] ANOMALY: meaningless REX prefix used [0x7FFD8F555A20] ANOMALY: meaningless REX prefix used [0x7FFD905417D0] ANOMALY:

[issue32335] Failed Python build on Fedora 27

2017-12-24 Thread Xavier de Gaye
Xavier de Gaye added the comment: Your build failure output shows that _threadmodule.c is not compiled and therefore the _thread module is missing. You just need to overwrite the current Modules/Setup file (it is possibly corrupted somehow) as suggested at the start of

[issue32422] Reduce lru_cache memory overhead.

2017-12-24 Thread INADA Naoki
INADA Naoki added the comment: PR-5008 benchmark: $ ./python -m perf compare_to master.json patched2.json -G Faster (9): - gc(100): 98.3 ms +- 0.3 ms -> 29.9 ms +- 0.4 ms: 3.29x faster (-70%) - gc(10): 11.7 ms +- 0.0 ms -> 3.71 ms +- 0.03 ms: 3.14x faster (-68%)

[issue32422] Reduce lru_cache memory overhead.

2017-12-24 Thread INADA Naoki
Change by INADA Naoki : -- keywords: +patch pull_requests: +4897 stage: -> patch review ___ Python tracker ___

[issue32411] Idlelib.browser: stop sorting dicts created by pyclbr

2017-12-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: (f0, C0) is the correct insertion and line number order for the dict that would be returned by pyclbr for a fleshed-out file. After 'sorted' is removed, the mock must imitate that. One could argue that previously, and even now for 3.6, the

[issue32421] Keeping an exception in cache can segfault the interpreter

2017-12-24 Thread Nitish
Nitish added the comment: What is six.reraise in except block? -- nosy: +nitishch ___ Python tracker ___

[issue32422] Reduce lru_cache memory overhead.

2017-12-24 Thread INADA Naoki
INADA Naoki added the comment: > Please stop revising every single thing you look at. The traditional design > of LRU caches used doubly linked lists for a reason. In particular, when > there is a high hit rate, the links can be updated without churning the >

[issue32421] Keeping an exception in cache can segfault the interpreter

2017-12-24 Thread Yonatan Zunger
Yonatan Zunger added the comment: It's just a clean version of reraise. Part of the six (Py2/Py3 compatibility) library, but pretty useful on its own anyway. On Sun, Dec 24, 2017 at 8:37 PM, Nitish wrote: > > Nitish added

[issue29084] C API of OrderedDict

2017-12-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29084] C API of OrderedDict

2017-12-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset d62b7412c18bd5dfa6d7346abfaf8a922818e6db by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-29084: Exclude C API for OrderedDict from the limited C API. (GH-4900) (#5007)

[issue32408] Performance regression in urllib.proxy_bypass_environment

2017-12-24 Thread Xiang Zhang
Xiang Zhang added the comment: Okay, the real performance is: time python2 -c 'import urllib; urllib.proxy_bypass_environment("1.1.1.1")' real0m0.661s user0m0.654s sys 0m0.007s I compile it with a wrong option with the specific GCC version. But still really