[issue44952] list need to filter again because the continue empty str value?

2021-08-18 Thread py_ok
py_ok <1979239...@qq.com> added the comment: Yes,I remember that my error in Java,like you say it`s skiped --原始邮件-- 发件人: "Python tracker"https://bugs.python.org/issue44952;; ___ --

[issue44952] list need to filter again because the continue empty str value?

2021-08-18 Thread Steven D'Aprano
Steven D'Aprano added the comment: To understand why your code doesn't work, run this: items = ['a', '', 'b', '', 'c', '', 'd', '', 'e', ''] print(len(items)) for index, item in enumerate(items): print(index, repr(item), items) if item == '': items.remove('') When you

[issue44952] list need to filter again because the continue empty str value?

2021-08-18 Thread py_ok
py_ok <1979239...@qq.com> added the comment: Thanks,Very timely resolve my problem -- stage: -> resolved status: open -> closed ___ Python tracker ___

[issue44952] list need to filter again because the continue empty str value?

2021-08-18 Thread Steven D'Aprano
Steven D'Aprano added the comment: Not a bug. Use this instead: def rv(items): for item in items[:]: # iterate over a copy if not (item.isspace() or item == ''): items.remove(item) return items Or the same as above, as a list comprehension, no need to make a

[issue44921] dict subclassing is slow

2021-08-18 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44952] list need to filter again because the continue empty str value?

2021-08-18 Thread py_ok
New submission from py_ok <1979239...@qq.com>: I`m poor in english.please run my code,Thanks. def rv(list): for i in list: #print(type(i)) #print(i.__len__()) if (i.isspace() or i=='' or len(i)==0): list.remove(i) return list list=['k', '', '', '',

[issue44944] Addition of _heappush_max method to complete the max heap implementation in Python's heapq module

2021-08-18 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue44951] selector.EpollSelector: EPOLLEXCLUSIVE, round 2

2021-08-18 Thread David Gilman
David Gilman added the comment: I also played with making another whole subclass that has it on by default, see this package https://github.com/dgilman/selector-epoll-exclusive That class could have EPOLLEXCLUSIVE on by default but could raise NotImplemented if you try and modify() it.

[issue44951] selector.EpollSelector: EPOLLEXCLUSIVE, round 2

2021-08-18 Thread David Gilman
Change by David Gilman : -- keywords: +patch pull_requests: +26284 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27819 ___ Python tracker ___

[issue44951] selector.EpollSelector: EPOLLEXCLUSIVE, round 2

2021-08-18 Thread David Gilman
New submission from David Gilman : Note that this is a different approach from the one taken in https://bugs.python.org/issue35517 although the issue is still the same. I've written a patch that allows users of selector.EpollSelector to enable EPOLLEXCLUSIVE on their file descriptors. This

[issue44942] Add number pad enter bind to TK's simpleDialog

2021-08-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: This proposal is not a bug fix. In my testing on Windows today, Ryan is correct in saying (on the PR) that kp return key normally acts is same as normal return key. True regardless of Numlock. This is *also true*, at least on Windows, of instances of

[issue44830] Broken Mozilla devguide link in "Dealing with Bugs" doc section

2021-08-18 Thread Jack DeVries
Jack DeVries added the comment: @terry.reedy ok, a PR to restore the docs with the new link is open. -- ___ Python tracker ___ ___

[issue44830] Broken Mozilla devguide link in "Dealing with Bugs" doc section

2021-08-18 Thread Jack DeVries
Change by Jack DeVries : -- pull_requests: +26283 pull_request: https://github.com/python/cpython/pull/27818 ___ Python tracker ___

[issue44941] Add check_methods function to standard library

2021-08-18 Thread Finn Mason
Finn Mason added the comment: I strongly feel that `check_methods` shouldn't be in collections.abc, even though that's where it's originally found, because it's not related specifically to collections but to ABCs and classes in general. I would prefer for it to be implemented in `abc` or

[issue44950] Math

2021-08-18 Thread Dennis Sweeney
Dennis Sweeney added the comment: This is not a bug, see the tutorial page here: https://docs.python.org/3.9/tutorial/floatingpoint.html Also, in the future, it's best to report bugs by thoroughly describing the actual/expected behavior in text and copy/pasting code, rather than just

[issue44079] [sqlite3] remove superfluous statement weak ref list from connection object

2021-08-18 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue44079] [sqlite3] remove superfluous statement weak ref list from connection object

2021-08-18 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 243b6c3b8fd3144450c477d99f01e31e7c3ebc0f by Erlend Egeberg Aasland in branch 'main': bpo-44079: Strip superfluous statement cache from sqlite3.Connection (GH-25998)

[issue44950] Math

2021-08-18 Thread Hamish
New submission from Hamish : Error shown in image -- components: Interpreter Core files: unknowasdasdasdn.png messages: 399874 nosy: hamish555 priority: normal severity: normal status: open title: Math type: behavior versions: Python 3.9 Added file:

[issue42491] Tkinter wait_visibility hanging when used in thread

2021-08-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: tcl/tk can be compiled without or with thread support. For 8.5, the default was without. For 8.6, the default is with. The Windows and macOS installers include 8.6 compiled with the default. I have not previously heard of problems with thread when it is

[issue44830] Broken Mozilla devguide link in "Dealing with Bugs" doc section

2021-08-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: Fixing the link now, given that it is possible, and someone someday writing a new doc to replace it are different issues. This issue is about the link. -- ___ Python tracker

[issue44947] SyntaxError: trailing comma not allowed ... misleading

2021-08-18 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 4e4d35d3325fb1e05dad43bd1ec73f14c3c5dc0a by Łukasz Langa in branch '3.9': [3.9] bpo-44947: Refine the syntax error for trailing commas in import statements (GH-27814) (GH-27817)

[issue44947] SyntaxError: trailing comma not allowed ... misleading

2021-08-18 Thread Łukasz Langa
Change by Łukasz Langa : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue44830] Broken Mozilla devguide link in "Dealing with Bugs" doc section

2021-08-18 Thread Thomas Grainger
Thomas Grainger added the comment: Depends on the redirect type they create. If it's temporary we should keep the same URL, if it's permanent or otherwise has bookmark updating semantics we should update the URL to follow the redirect On Wed, 18 Aug 2021, 21:40 Jack DeVries, wrote: > > Jack

[issue44947] SyntaxError: trailing comma not allowed ... misleading

2021-08-18 Thread Łukasz Langa
Change by Łukasz Langa : -- pull_requests: +26282 pull_request: https://github.com/python/cpython/pull/27817 ___ Python tracker ___

[issue44830] Broken Mozilla devguide link in "Dealing with Bugs" doc section

2021-08-18 Thread Jack DeVries
Jack DeVries added the comment: All right, consider the needle in the haystack officially found. This page has the same content as the missing page: https://bugzilla.mozilla.org/page.cgi?id=bug-writing.html Thank you @buhtz for opening an issue with Mozilla; they are eventually going to

[issue44947] SyntaxError: trailing comma not allowed ... misleading

2021-08-18 Thread miss-islington
miss-islington added the comment: New changeset 846a10fc45ef83b41d1b1b568a9ee8012f37c8c2 by Miss Islington (bot) in branch '3.10': bpo-44947: Refine the syntax error for trailing commas in import statements (GH-27814)

[issue44947] SyntaxError: trailing comma not allowed ... misleading

2021-08-18 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset b2f68b190035540872072ac1d2349e7745e85596 by Pablo Galindo Salgado in branch 'main': bpo-44947: Refine the syntax error for trailing commas in import statements (GH-27814)

[issue44947] SyntaxError: trailing comma not allowed ... misleading

2021-08-18 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +26281 pull_request: https://github.com/python/cpython/pull/27816 ___ Python tracker

[issue44874] Deprecate Py_TRASHCAN_SAFE_BEGIN/END

2021-08-18 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 31ee985db86c1339d00bd0d3cc1712019460670a by Irit Katriel in branch 'main': bpo-44874: deprecate Py_TRASHCAN_SAFE_BEGIN and Py_TRASHCAN_SAFE_END (GH-27693) https://github.com/python/cpython/commit/31ee985db86c1339d00bd0d3cc1712019460670a

[issue44524] __name__ attribute in typing module

2021-08-18 Thread miss-islington
Change by miss-islington : -- pull_requests: +26280 pull_request: https://github.com/python/cpython/pull/27815 ___ Python tracker ___

[issue44524] __name__ attribute in typing module

2021-08-18 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset a3a4d20d6798aa2975428d51f3a4f890248810cb by Yurii Karabas in branch 'main': bpo-44524: Fix cryptic TypeError message when trying to subclass special forms in `typing` (GH-27710)

[issue44815] asyncio.gather no DeprecationWarning if task are passed

2021-08-18 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks, Sam! ✨  ✨ -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue44929] Some RegexFlag cannot be printed in the repr

2021-08-18 Thread Ethan Furman
Ethan Furman added the comment: `_name_` is only None if the entire enum value is outside any named member and `_boundary_` is `KEEP` -- so class Example(Flag, boundary=KEEP): first = auto() second = auto() third = auto() >>> Example(0) module.Example(0)

[issue44815] asyncio.gather no DeprecationWarning if task are passed

2021-08-18 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset b2779b2aa16acb3fd1297ccfe2fe5aaa007f74ae by Sam Bull in branch '3.9': [3.9] bpo-44815: Always show deprecation in asyncio.gather/sleep() (GH-27569) https://github.com/python/cpython/commit/b2779b2aa16acb3fd1297ccfe2fe5aaa007f74ae --

[issue44943] Integrate PyHyphen into the textwrap module?

2021-08-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Many years ago I write highly optimized hyphenation module (as a part of OrnamentBook project https://sourceforge.net/projects/pybookreader/files/OrnamentBook/). I could contribute the code to the stdlib. But the problem is that the algorithm depends on

[issue44947] SyntaxError: trailing comma not allowed ... misleading

2021-08-18 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +26279 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27814 ___ Python tracker

[issue44947] SyntaxError: trailing comma not allowed ... misleading

2021-08-18 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: The problem is not the keyword, is that we are parsing correctly until the "and" and we find the comma there. It happens with anything that invalidates more items: >>> from math import sin, cos, $ tan File "", line 1 from math import sin, cos,

[issue44947] SyntaxError: trailing comma not allowed ... misleading

2021-08-18 Thread Andre Roberge
Andre Roberge added the comment: Based on what I just read on https://github.com/davidhalter/parso/blob/master/parso/python/issue_list.txt I gather that this exception is only raised in the context of an import statement with a trailing comma (usually followed by nothing). --

[issue44949] test_readline: test_auto_history_disabled() fails randomly on aarch64 RHEL8 Refleaks 3.9, 3.10 and 3.x

2021-08-18 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 6fb62b42f4db56ed5efe0ca4c1059049276c1083 by Victor Stinner in branch 'main': bpo-44949: Fix test_readline auto history tests (#27813) https://github.com/python/cpython/commit/6fb62b42f4db56ed5efe0ca4c1059049276c1083 --

[issue44173] Stored (uncompressed) ZipExtFile in zipfile can be seekable at lower cost

2021-08-18 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: -> gregory.p.smith nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list

[issue44895] refleak test failure in test_exceptions

2021-08-18 Thread STINNER Victor
STINNER Victor added the comment: You can also play with the clear() method of frame objects and traceback.clear_frames() (which expects a traceback object). -- ___ Python tracker

[issue44895] refleak test failure in test_exceptions

2021-08-18 Thread STINNER Victor
STINNER Victor added the comment: > test leaked [-4, 4, -4] references, sum=-4 If I disable the GC, the script no longer detects "leaks". Same using a GC threshold of 800. Using a GC threshold between 100 and 700, I reproduce the [-4, 4, -4] references leak. Funny bug. --

[issue44895] refleak test failure in test_exceptions

2021-08-18 Thread STINNER Victor
STINNER Victor added the comment: Irit: do you still reproduce the issue using gc.disable()? Or you can try different values to call gc.set_threshold(). You may also try different values in ns.huntrleaks, like: ns.huntrleaks = (3, 20, 'tt_out.py'). With 20 iterations, do you still reproduce

[issue44943] Integrate PyHyphen into the textwrap module?

2021-08-18 Thread Elsie Hupp
Elsie Hupp added the comment: I mainly suggested PyHyphen because (at a fairly superficial glance) it has been around for over a decade, and it extends an existing module rather than adding a new one. To be fair, `textwrap` itself is relatively niche, and it's my understanding that it's

[issue44949] test_readline: test_auto_history_disabled() fails randomly on aarch64 RHEL8 Refleaks 3.9, 3.10 and 3.x

2021-08-18 Thread STINNER Victor
STINNER Victor added the comment: I ran the test manually on the buildbot worker. Sometimes, the test process gets the EIO error even before getting the 2 newline bytes (b"\r\n"). I wrote PR 27813 to simply not expect the newline character. Adding flush=True to the print("History length:",

[issue44949] test_readline: test_auto_history_disabled() fails randomly on aarch64 RHEL8 Refleaks 3.9, 3.10 and 3.x

2021-08-18 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +26278 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27813 ___ Python tracker ___

[issue44926] typing.get_type_hints() raises for type aliases with forward references

2021-08-18 Thread Ken Jin
Ken Jin added the comment: > Ken Jin, can you guide Maximilian towards a successful doc update PR? It seems that Maximilian has already made some contributions to CPython, so I'm sure he's somewhat familiar with our workflow :). Nonetheless, @Maximilian if you need any help, please do ping

[issue44949] test_readline: test_auto_history_disabled() fails randomly on aarch64 RHEL8 Refleaks 3.9, 3.10 and 3.x

2021-08-18 Thread STINNER Victor
STINNER Victor added the comment: I failed to reproduce the issue on Fedora 34 (readline-8.1-2.fc34.i686). $ ./python -m test test_readline -m test_auto_history_disabled -j40 -F (...) 0:19:35 load avg: 42.40 [10785] test_readline passed 0:19:35 load avg: 42.40 [10786] test_readline passed

[issue44925] [docs] Confusing deprecation notice for typing.IO

2021-08-18 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- nosy: +Jelle Zijlstra ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44926] typing.get_type_hints() raises for type aliases with forward references

2021-08-18 Thread Guido van Rossum
Guido van Rossum added the comment: We could mention this in the docs for one or more of the following: - type aliases (old or new syntax) - forward references - get_type_hints() Ken Jin, can you guide Maximilian towards a successful doc update PR? --

[issue44942] Add number pad enter bind to TK's simpleDialog

2021-08-18 Thread Guido van Rossum
Guido van Rossum added the comment: Sorry, CLA is signed, but I'd like Terry Reedy to have a peek. -- nosy: +terry.reedy ___ Python tracker ___

[issue44949] test_readline: test_auto_history_disabled() fails randomly on aarch64 RHEL8 Refleaks 3.9, 3.10 and 3.x

2021-08-18 Thread STINNER Victor
Change by STINNER Victor : -- title: test_readline: test_auto_history_disabled() fails on aarch64 RHEL8 Refleaks 3.9, 3.10 and 3.x -> test_readline: test_auto_history_disabled() fails randomly on aarch64 RHEL8 Refleaks 3.9, 3.10 and 3.x ___ Python

[issue44949] test_readline: test_auto_history_disabled() fails on aarch64 RHEL8 Refleaks 3.9, 3.10 and 3.x

2021-08-18 Thread STINNER Victor
New submission from STINNER Victor : test_readline fails randomly on aarc64 RHEL8 buildbots (3.9, 3.10 and 3.x). In some builds, test_readline fails but then pass when re-run in verbose mode. Example: https://buildbot.python.org/all/#/builders/41/builds/148 --- 0:02:56 load avg: 2.79

[issue40512] [subinterpreters] Meta issue: per-interpreter GIL

2021-08-18 Thread STINNER Victor
STINNER Victor added the comment: PyStructSequence_InitType2() is not compatible with subinterpreters: it uses static types. Moreover, it allocates tp_members memory which is not released when the type is destroyed. But I'm not sure that the type is ever destroyed, since this API is

[issue44944] Addition of _heappush_max method to complete the max heap implementation in Python's heapq module

2021-08-18 Thread Eric V. Smith
New submission from Eric V. Smith : This has been discussed and rejected in at least issue 27295 and issue 42240, and probably others. -- nosy: +eric.smith ___ Python tracker

[issue44948] DeprecationWarning: Using ioctl() method

2021-08-18 Thread Thomas Trummer
New submission from Thomas Trummer : DeprecationWarning: Using ioctl() method on sockets returned from get_extra_info('socket') will be prohibited in asyncio 3.9. Please report your use case to bugs.python.org. Use case: def connection_made(self, transport: asyncio.BaseTransport) -> None:

[issue44743] asyncio DatagramProtocol stops calling callbacks after OSError

2021-08-18 Thread Thomas Trummer
Change by Thomas Trummer : -- nosy: +Thomas Trummer ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44937] test_regrest: test_tools_script_run_tests() failed on GHA Windows x64

2021-08-18 Thread Ken Jin
Change by Ken Jin : -- nosy: +kj ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43805] multiprocessing.Queue hangs when process on other side dies

2021-08-18 Thread Jon Clucas
Change by Jon Clucas : -- nosy: +shnizzedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22393] multiprocessing.Pool shouldn't hang forever if a worker process dies unexpectedly

2021-08-18 Thread Jon Clucas
Change by Jon Clucas : -- nosy: +shnizzedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44942] Add number pad enter bind to TK's simpleDialog

2021-08-18 Thread Guido van Rossum
Guido van Rossum added the comment: It’s fine. We now need the PR author to sign the CLA. -- nosy: +gvanrossum ___ Python tracker ___

[issue44942] Add number pad enter bind to TK's simpleDialog

2021-08-18 Thread Electro707
Change by Electro707 : -- nosy: +Electro707 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44947] SyntaxError: trailing comma not allowed ... misleading

2021-08-18 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Hummm, interesting. I wonder if this only happens with keywords or if this can be reproduced with other constructs -- ___ Python tracker

[issue44943] Integrate PyHyphen into the textwrap module?

2021-08-18 Thread Eric V. Smith
Eric V. Smith added the comment: Thank you for the suggestion. Hyphenation seems like a niche requirement to me, probably too niche and with too many design decisions to include it in the stdlib. It's also not clear to my why PyHyphen would be the best option for this, as opposed to the

[issue44944] Addition of _heappush_max method to complete the max heap implementation in Python's heapq module

2021-08-18 Thread Yatharth Mathur
Change by Yatharth Mathur : -- components: +Library (Lib) ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44852] Add ability to wholesale silence DeprecationWarnings while running the test suite

2021-08-18 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset ebe7e6d86cf8f54d449d49866698d7f4c700cc7c by Miss Islington (bot) in branch '3.9': bpo-44852: Support filtering over warnings without a set message (GH-27793) (GH-27810)

[issue44852] Add ability to wholesale silence DeprecationWarnings while running the test suite

2021-08-18 Thread miss-islington
miss-islington added the comment: New changeset d1c0e4413dd544270df1f5b8a145fd4370cb759b by Miss Islington (bot) in branch '3.10': bpo-44852: Support filtering over warnings without a set message (GH-27793) https://github.com/python/cpython/commit/d1c0e4413dd544270df1f5b8a145fd4370cb759b

[issue44947] SyntaxError: trailing comma not allowed ... misleading

2021-08-18 Thread Andre Roberge
Andre Roberge added the comment: This message is not new to Python 3.10 as it is also shown with Python 3.9.5. >>> from math import sin, cos, and tan File "", line 1 from math import sin, cos, and tan ^ SyntaxError: trailing comma not allowed without

[issue44946] Integer operations are inefficient for "medium" integers.

2021-08-18 Thread Mark Shannon
Mark Shannon added the comment: Just changes to longobject.c. There are still various minor inefficiencies in testing to see whether an int is a medium value, and then throwing away size information before creating result objects. I'm not expecting this to make much difference, but every

[issue44947] SyntaxError: trailing comma not allowed ... misleading

2021-08-18 Thread Andre Roberge
New submission from Andre Roberge : Consider the following four slightly different examples: Python 3.10.0rc1 ... >>> from math import sin and cos File "", line 1 from math import sin and cos ^^^ SyntaxError: invalid syntax >>> from math import sin, cos, and

[issue44852] Add ability to wholesale silence DeprecationWarnings while running the test suite

2021-08-18 Thread miss-islington
Change by miss-islington : -- pull_requests: +26277 pull_request: https://github.com/python/cpython/pull/27810 ___ Python tracker ___

[issue44852] Add ability to wholesale silence DeprecationWarnings while running the test suite

2021-08-18 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +26276 pull_request: https://github.com/python/cpython/pull/27809 ___ Python tracker

[issue44852] Add ability to wholesale silence DeprecationWarnings while running the test suite

2021-08-18 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 8cf07d3db3eed02b43350a5f9dbf68f1c839ea82 by Łukasz Langa in branch 'main': bpo-44852: Support filtering over warnings without a set message (GH-27793) https://github.com/python/cpython/commit/8cf07d3db3eed02b43350a5f9dbf68f1c839ea82 --

[issue44938] Expose PyErr_ChainExceptions in the stable API

2021-08-18 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Serhiy, what do you suggest we should do then? -- ___ Python tracker ___ ___

[issue44946] Integer operations are inefficient for "medium" integers.

2021-08-18 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44946] Integer operations are inefficient for "medium" integers.

2021-08-18 Thread Mark Dickinson
Mark Dickinson added the comment: See also #21955, #10044, and https://github.com/python/cpython/blob/3240bc62f4e0afa09964f3afc845697f0a0806b9/Python/ceval.c#L1986-L1991 -- ___ Python tracker

[issue44946] Integer operations are inefficient for "medium" integers.

2021-08-18 Thread Mark Dickinson
Mark Dickinson added the comment: We already special-case medium integers in the Objects/longobject.c code, in various places. For example for addition, here: https://github.com/python/cpython/blob/3240bc62f4e0afa09964f3afc845697f0a0806b9/Objects/longobject.c#L3070-L3072 Are you proposing

[issue44946] Integer operations are inefficient for "medium" integers.

2021-08-18 Thread Mark Shannon
New submission from Mark Shannon : "Medium" integers are those with a single internal digit or zero. Medium integers are integers in the range -2**30 to +2**30 on 64 bit machines. "Small" integers, -5 to 256 are cached, but are represented as medium integers internally. To a good

[issue44941] Add check_methods function to collections.abc in standard library

2021-08-18 Thread Ken Jin
Change by Ken Jin : -- nosy: +rhettinger, stutzbach title: Add check_methods function to standard library -> Add check_methods function to collections.abc in standard library versions: +Python 3.11 ___ Python tracker

[issue44925] [docs] Confusing deprecation notice for typing.IO

2021-08-18 Thread Ken Jin
Ken Jin added the comment: Yep! You can choose to add a new section under "Other concrete types", maybe "typing.io and typing.re submodules" then talk about how we could import from them in the past, but they're now deprecated and going to be removed. Alternatively, you can remove the

[issue44945] Specialize BINARY_ADD using PEP 659 machinery.

2021-08-18 Thread Mark Shannon
New submission from Mark Shannon : Specializing BINARY_ADD is worthwhile for two reasons: Specializing for ints, floats and strings may give us some small speedup. It removes the complex checks for the special case of extending a string, `s = s + ...` from the normal instruction to a

[issue44926] typing.get_type_hints() raises for type aliases with forward references

2021-08-18 Thread Maximilian Hils
Maximilian Hils added the comment: Thanks Guido! I agree on not pursuing the List["Foo"] case for the reasons you mentioned. Let me know if you think it'd be useful to mention this limitation briefly in one of the relevant PEPs or somewhere else. I'm not sure if it meets the bar for

[issue44449] Segfault in _PyTrash_begin when faulthandler tries to dump thread stacks

2021-08-18 Thread STINNER Victor
STINNER Victor added the comment: _Py_DumpTracebackThreads() should not use Py_DECREF(). It's a bug. It must only *read* memory, not *modify* memory since it's called from a signal handler. It's a regression in dump_traceback(). Python 3.9 and 3.10 use: frame =

[issue44929] Some RegexFlag cannot be printed in the repr

2021-08-18 Thread Łukasz Langa
Łukasz Langa added the comment: Ethan, could you take a look at the PR? I added a few failing test methods since `repr` handling for global enum flags wasn't covered and looks unfinished. If you tell us what the expected return values should be, I'll finish the fix. -- nosy:

[issue44878] Clumsy dispatching on interpreter entry.

2021-08-18 Thread Mark Shannon
Mark Shannon added the comment: I'm somewhat surprised by that. After all, the only change in control flow was the change from a break to a goto in exception handling. I would have expected PR27726 to have made much more difference. There are a few possibilities, including: 1. It's just a

[issue41165] [Python 3.10] Remove APIs deprecated long enough

2021-08-18 Thread Hugo van Kemenade
Hugo van Kemenade added the comment: ## unittest What's needed to move forward with removing the deprecated aliases? A deprecation warning is shown for `python3 -m unittest test_bar` and `python3 test_bar.py` (tested Python 3.6-3.10). No deprecation warning is shown for `python setup.py

[issue44701] Create a @deprecated decorator (annotation)

2021-08-18 Thread Christian Buhtz
Christian Buhtz added the comment: This discussion on python-ideas https://mail.python.org/archives/list/python-id...@python.org/thread/62CTVNQ2GIS4B6WUBX23K4CCCK5MCGYL/ -- nosy: +buhtz ___ Python tracker

[issue44878] Clumsy dispatching on interpreter entry.

2021-08-18 Thread neonene
neonene added the comment: FYI, PR27727 ("Remove loop...") seems to be a bit slower than the previous commit (f08e6d1bb3c5655f184af88c6793e90908bb6338) on my Windows build (msvc14.29.16.10). pyperformance shows that Windows x64 PGO: 34 slower, 11 faster, 13 not significant, Geometric

[issue20041] TypeError when f_trace is None and tracing.

2021-08-18 Thread Ryan Mast (nightlark)
Change by Ryan Mast (nightlark) : -- nosy: +rmast ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26545] [doc] os.walk is limited by python's recursion limit

2021-08-18 Thread Ryan Mast (nightlark)
Change by Ryan Mast (nightlark) : -- nosy: +rmast ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15373] copy.copy() does not properly copy os.environment

2021-08-18 Thread Ryan Mast (nightlark)
Change by Ryan Mast (nightlark) : -- nosy: +rmast ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: