[issue42668] re.escape does not correctly escape newlines

2020-12-17 Thread Matthew Barnett
Matthew Barnett added the comment: In a regex, putting a backslash before any character that's not an ASCII-range letter or digit makes it a literal. re.escape doesn't special-case control characters. Its purpose is to make a string that might contain metacharacters into one that's a

[issue42668] re.escape does not correctly escape newlines

2020-12-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > If the escape-result still contains a verbatim newline, why escape this > character at all? Because in verbose mode it is ignored. This is why \n and other ASCII whitespace characters, and '#', which starts a comment, should be escaped. '\\\n' and

[issue42668] re.escape does not correctly escape newlines

2020-12-17 Thread Martin Altmayer
Martin Altmayer added the comment: Thanks for the explanation, I did not know re.VERBOSE. I still think the behavior is a bit confusing, but it's probably not worth the effort to change this. -- type: behavior -> enhancement ___ Python tracker

[issue42666] getting a class source regresses in Python 3.9

2020-12-17 Thread Thomas Viehmann
Thomas Viehmann added the comment: I might add that this is a case I hit in the PyTorch test suite. I tried to fix this a long time ago in a pricipled way in https://bugs.python.org/issue33826 and Guido explained that fixing it was too heavy handed to be worthwile in

[issue23522] Misleading note in Statistics module documentation

2020-12-17 Thread Irit Katriel
Irit Katriel added the comment: I agree with Jake's comment, but I think the solution is to remove that Note altogether. This document is a software manual, not a statistics textbook, and as such it should just state clearly what the statistics module does. If someone doesn't know whether

[issue26564] Malloc debug hooks: display memory block traceback on error

2020-12-17 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: +22679 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23819 ___ Python tracker ___

[issue26564] Malloc debug hooks: display memory block traceback on error

2020-12-17 Thread Irit Katriel
Irit Katriel added the comment: I'm reopening this to commit a fix for a comment which became obsolete following this change: https://hg.python.org/cpython/rev/18a19e62bac5. -- nosy: +iritkatriel status: closed -> open ___ Python tracker

[issue26564] Malloc debug hooks: display memory block traceback on error

2020-12-17 Thread miss-islington
miss-islington added the comment: New changeset 1c70d40e94741578ce28b8851fb65372ac2e7942 by Miss Islington (bot) in branch '3.9': bpo-26564: fix obsolete comment in traceback.c (GH-23819) https://github.com/python/cpython/commit/1c70d40e94741578ce28b8851fb65372ac2e7942 --

[issue26564] Malloc debug hooks: display memory block traceback on error

2020-12-17 Thread Irit Katriel
Change by Irit Katriel : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue26564] Malloc debug hooks: display memory block traceback on error

2020-12-17 Thread STINNER Victor
STINNER Victor added the comment: > I am wondering why 53/22? 5/2 is as good for 8-bytes long -- both gives > 21-bytes buffer. 53/22 is closer to math.log(256)/math.log(10) than 5/2, and 8*53 should not overflow :-) -- ___ Python tracker

[issue42529] CPython DLL initialization routine failed from PYC cache file

2020-12-17 Thread Steve Dower
Steve Dower added the comment: Monkeypatching native types looks suspect as anything, but probably not the cause here. Good luck :) So I checked some of our code around dynamic loads and it's got to be caused by the loader in our LoadLibrary call, not when we call your module init function.

[issue42645] break/continue or return in finally block occurs twice in trace.

2020-12-17 Thread Mark Shannon
Change by Mark Shannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue42665] Should PyLong_AsLongAndOverflow raise exception on overflow?

2020-12-17 Thread Zackery Spytz
Zackery Spytz added the comment: > No, it should not. I agree. -- nosy: +ZackerySpytz ___ Python tracker ___ ___ Python-bugs-list

[issue42613] freeze.py doesn't support sys.platlibdir different than lib nor multiarch

2020-12-17 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +22677 pull_request: https://github.com/python/cpython/pull/23817 ___ Python tracker

[issue42669] "except" documentation still suggests nested tuples are allowed

2020-12-17 Thread Colin Watson
New submission from Colin Watson : In Python 2, it was possible to use `except` with a nested tuple, and occasionally natural. For example, `zope.formlib.interfaces.InputErrors` is a tuple of several exception classes, and one might reasonably think to do something like this (this is real

[issue26564] Malloc debug hooks: display memory block traceback on error

2020-12-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am wondering why 53/22? 5/2 is as good for 8-bytes long -- both gives 21-bytes buffer. I do not propose to change anything. It is just curiosity. -- nosy: +serhiy.storchaka ___ Python tracker

[issue42625] Segmentation fault of PyState_AddModule()

2020-12-17 Thread hai shi
hai shi added the comment: Thanks victor, petr for your comment and review. I closed this bpo and PR. I paste victor's explanation in here in case other developers have the same question too: Getting a crash is the expected behaviour if you don't respect a function API. Most C functions are

[issue42667] shelve module is not thread-safe during accessing different databases from different threads

2020-12-17 Thread gardener.willy
New submission from gardener.willy : Shelve module uses "import dbm" instruction while opening database. Dbm module has global dictionary "_modules". This dictionary modifies during database opening operation. When different threads simultaneously try to open different databases, unexpected

[issue26564] Malloc debug hooks: display memory block traceback on error

2020-12-17 Thread miss-islington
miss-islington added the comment: New changeset cecbaa3a80d5ae28cdd4129d6d2c4395c12a89e4 by Miss Islington (bot) in branch '3.8': bpo-26564: fix obsolete comment in traceback.c (GH-23819) https://github.com/python/cpython/commit/cecbaa3a80d5ae28cdd4129d6d2c4395c12a89e4 --

[issue42665] Should PyLong_AsLongAndOverflow raise exception on overflow?

2020-12-17 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : No, it should not. -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list

[issue31904] Python should support VxWorks RTOS

2020-12-17 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset ba760f3710eccdfae2b680a5f94fe0160ddb1536 by pxinwr in branch 'master': bpo-31904: Skip some asyncio tests on VxWorks (#23815) https://github.com/python/cpython/commit/ba760f3710eccdfae2b680a5f94fe0160ddb1536 -- nosy: +asvetlov

[issue42613] freeze.py doesn't support sys.platlibdir different than lib nor multiarch

2020-12-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +22678 pull_request: https://github.com/python/cpython/pull/23818 ___ Python tracker ___

[issue42669] "except" documentation still suggests nested tuples are allowed

2020-12-17 Thread Colin Watson
Change by Colin Watson : -- keywords: +patch pull_requests: +22682 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23822 ___ Python tracker ___

[issue42246] Implement PEP 626 -- Precise line numbers for debugging

2020-12-17 Thread Mark Shannon
Mark Shannon added the comment: New changeset bf353f3c2d937772a8cf30b15fd8eb7b82665ccb by Mark Shannon in branch 'master': bpo-42246: Make sure that `f_lasti`, and thus `f_lineno`, is set correctly after raising or reraising an exception (GH-23803)

[issue41804] test_epoll fails test_control_and_wait() randomly on aarch64 RHEL8 Refleaks 3.9

2020-12-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset 718bf1a7a1a39ca6f2381a299d00d8318732104a by Miss Islington (bot) in branch '3.8': bpo-41804: Enhance test_epoll.test_control_and_wait() (GH-23795) (GH-23814) https://github.com/python/cpython/commit/718bf1a7a1a39ca6f2381a299d00d8318732104a

[issue42375] subprocess DragonFlyBSD build update

2020-12-17 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8, Python 3.9 ___ Python tracker ___

[issue42375] subprocess DragonFlyBSD build update

2020-12-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset 8d0a01c99b2a810bfe13d654b294c25a10151aa4 by Miss Islington (bot) in branch '3.9': bpo-42375: subprocess DragonFlyBSD build update. (GH-23320) (GH-23388) https://github.com/python/cpython/commit/8d0a01c99b2a810bfe13d654b294c25a10151aa4

[issue42375] subprocess DragonFlyBSD build update

2020-12-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset 4f65907f38339809532bc06ffc1382c2c09180e2 by Miss Islington (bot) in branch '3.8': bpo-42375: subprocess DragonFlyBSD build update. (GH-23320) (GH-23389) https://github.com/python/cpython/commit/4f65907f38339809532bc06ffc1382c2c09180e2

[issue42668] re.escape does not correctly escape newlines

2020-12-17 Thread Martin Altmayer
New submission from Martin Altmayer : re.escape('\n') returns '\\\n', i.e. a string consisting of a backslash and a newline. I believe it should return '\\n', i.e. a backslash and an 'n'. If the escape-result still contains a verbatim newline, why escape this character at all? Note that

[issue42667] shelve module is not thread-safe during accessing different databases from different threads

2020-12-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +brett.cannon, eric.snow, ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42613] freeze.py doesn't support sys.platlibdir different than lib nor multiarch

2020-12-17 Thread miss-islington
miss-islington added the comment: New changeset 829272e67bbd4b2cc76c01cd20265eb114b392a2 by Miss Islington (bot) in branch '3.8': bpo-42613: Fix freeze.py config directory (GH-23792) https://github.com/python/cpython/commit/829272e67bbd4b2cc76c01cd20265eb114b392a2 --

[issue26564] Malloc debug hooks: display memory block traceback on error

2020-12-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset 40125ab3252453bf205ed906e46bf9741c27bf9d by Irit Katriel in branch 'master': bpo-26564: fix obsolete comment in traceback.c (GH-23819) https://github.com/python/cpython/commit/40125ab3252453bf205ed906e46bf9741c27bf9d --

[issue26564] Malloc debug hooks: display memory block traceback on error

2020-12-17 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +22680 pull_request: https://github.com/python/cpython/pull/23820 ___ Python tracker

[issue26564] Malloc debug hooks: display memory block traceback on error

2020-12-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +22681 pull_request: https://github.com/python/cpython/pull/23821 ___ Python tracker ___

[issue42651] Recursive traceback crashes Python Interpreter

2020-12-17 Thread Ronald Oussoren
Ronald Oussoren added the comment: This might be related to #42500 -- nosy: +ronaldoussoren ___ Python tracker ___ ___

[issue42529] CPython DLL initialization routine failed from PYC cache file

2020-12-17 Thread Karl Nelson
Karl Nelson added the comment: Without the pyc everything goes fine... ``` ... _bootlocale' # <_frozen_importlib_external.SourceFileLoader object at 0x0222E9FD5A30> import 'site' # <_frozen_importlib_external.SourceFileLoader object at 0x0222E9F88F40> Python 3.9.0

[issue42613] freeze.py doesn't support sys.platlibdir different than lib nor multiarch

2020-12-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset 79c535796da4a1377364910e309b97e53c3e51ef by Miss Islington (bot) in branch '3.9': bpo-42613: Fix freeze.py config directory (GH-23792) (GH-23817) https://github.com/python/cpython/commit/79c535796da4a1377364910e309b97e53c3e51ef --

[issue42613] freeze.py doesn't support sys.platlibdir different than lib nor multiarch

2020-12-17 Thread STINNER Victor
Change by STINNER Victor : -- versions: +Python 3.8, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42651] Recursive traceback crashes Python Interpreter

2020-12-17 Thread Xinmeng Xia
Xinmeng Xia added the comment: In issue#36272, they discuss a bug in logging module. They show an example which is similar as this one. So I think I think there might be a similar bug in traceback module. -- ___ Python tracker

[issue42652] recursive in finally clause cause Python interpreter crash.

2020-12-17 Thread Ronald Oussoren
Ronald Oussoren added the comment: This might be related to #42500 -- nosy: +ronaldoussoren ___ Python tracker ___ ___

[issue42529] CPython DLL initialization routine failed from PYC cache file

2020-12-17 Thread Karl Nelson
Karl Nelson added the comment: Thanks, I will see if I can get additional diagnostics today. Otherwise I will have to start recompiling Python with diagnostic hooks. I have never had to rebuild python on windows so it may take a while to figure out how to make progress. The monkey patch

[issue42668] re.escape does not correctly escape newlines

2020-12-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue42652] recursive in finally clause cause Python interpreter crash.

2020-12-17 Thread Xinmeng Xia
Xinmeng Xia added the comment: In issue #42500, crashes is resulted by recursion and try-except. Program like following will crash the interpreter. = def foo(): try: 1/0 except: pass foo() foo() = However with traceback module,

[issue42529] CPython DLL initialization routine failed from PYC cache file

2020-12-17 Thread Steve Dower
Steve Dower added the comment: You'll find it leads up to a LoadLibraryExW call in Python/dynload_win.c that is failing with ERROR_DLL_INIT_FAILED (1114) in GetLastError(). From that point on, it's looking solely at _jpype.pyd and its dependencies, and it could be any of them failing to

[issue42670] Missing word in itertools.product

2020-12-17 Thread Scott Noyes
New submission from Scott Noyes : -Accordingly, it only useful with finite inputs. +Accordingly, it is only useful with finite inputs. -- assignee: docs@python components: Documentation messages: 383257 nosy: docs@python, snoyes priority: normal severity: normal status: open title:

[issue42670] Missing word in itertools.product

2020-12-17 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch nosy: +ZackerySpytz nosy_count: 2.0 -> 3.0 pull_requests: +22683 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23823 ___ Python tracker

[issue42667] shelve module is not thread-safe during accessing different databases from different threads

2020-12-17 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42663] zoneinfo does not support full range of allowed transition hours in fallback string

2020-12-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch nosy: +serhiy.storchaka nosy_count: 1.0 -> 2.0 pull_requests: +22686 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/23825 ___ Python tracker

[issue42660] _zoneinfo.c incorrectly checks bounds of `day` variable in calenderrule_new

2020-12-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +22687 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/23825 ___ Python tracker

[issue42529] CPython DLL initialization routine failed from PYC cache file

2020-12-17 Thread Karl Nelson
Karl Nelson added the comment: Well that gives me a place to search from. Unfortunately statics are not likely the source of the issue. I scrubbed all C++ structures from the project into a big structure which has only a single global pointer which I initialize in the init method. It

[issue42667] shelve module is not thread-safe during accessing different databases from different threads

2020-12-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I added import experts because the issue looks relates to race condition in import. Willy, can the issue be reproduced on more modern Python releases (3.8 or 3.9)? It could help if you provide minimal script which reproduces it. -- nosy:

[issue10496] Python startup should not require passwd entry

2020-12-17 Thread Peixing Xin
Change by Peixing Xin : -- nosy: +pxinwr nosy_count: 28.0 -> 29.0 pull_requests: +22685 pull_request: https://github.com/python/cpython/pull/23530 ___ Python tracker ___

[issue42115] Caching infrastructure for the evaluation loop: specialised opcodes

2020-12-17 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > IMO you need to implement LOAD_METHOD support for all kinds of calls, > including the ones that use kwargs, to see any improvement. I will try to do some prototyping around that to see how much can we gain in that route. In any case, adding

[issue42660] _zoneinfo.c incorrectly checks bounds of `day` variable in calenderrule_new

2020-12-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 23825 refactors parsing. There is now a single function for parsing numbers. It saves around 70 lines of code and makes easy to implement support of full range of transition hours. It could be possible to represent transition time as 32-bit offset in

[issue31904] Python should support VxWorks RTOS

2020-12-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset 75dabfe7a8324a16687959cc401deb72b104a575 by pxinwr in branch 'master': bpo-31904: posixpath.expanduser() handles None user home on VxWorks (GH-23530) https://github.com/python/cpython/commit/75dabfe7a8324a16687959cc401deb72b104a575 --

[issue42115] Caching infrastructure for the evaluation loop: specialised opcodes

2020-12-17 Thread Yury Selivanov
Yury Selivanov added the comment: > I will try to do some prototyping around that to see how much can we gain in > that route. In any case, adding LOAD_METHOD support for all kinds of calls > should be an improvement by itself even without caching, no? Exactly. As one argument for

[issue42671] Make the Python finalization more deterministic

2020-12-17 Thread STINNER Victor
New submission from STINNER Victor : At exit, Python calls Py_Finalize() which tries to clear every single Python objects. The order is which Python objects are cleared is not fully deterministic. Py_Finalize() uses an heuristic to attempt to clear modules of sys.modules in the "best" order.

[issue42672] tkinter/__init__.py raises a NameError if NoDefaultRoot()

2020-12-17 Thread Ivo Shipkaliev
Change by Ivo Shipkaliev : -- components: Tkinter files: default_root.diff keywords: patch nosy: shippo_ priority: normal severity: normal status: open title: tkinter/__init__.py raises a NameError if NoDefaultRoot() type: behavior versions: Python 3.10 Added file:

[issue42115] Caching infrastructure for the evaluation loop: specialised opcodes

2020-12-17 Thread Yury Selivanov
Yury Selivanov added the comment: > I think I am closing the PR as it seems that the gains are not good enough > (and there is quite a lot of noise by comparing the benchmarks together). IMO you need to implement LOAD_METHOD support for all kinds of calls, including the ones that use

[issue42670] Missing word in itertools.product

2020-12-17 Thread miss-islington
miss-islington added the comment: New changeset 074ad5123f18923bdb5fa0b6e4bf24de45e32ba9 by Zackery Spytz in branch 'master': bpo-42670: Fix a missing word in the itertools.product() docs (GH-23823) https://github.com/python/cpython/commit/074ad5123f18923bdb5fa0b6e4bf24de45e32ba9

[issue42600] Cancelling tasks waiting for asyncio.Conditions crashes w/ RuntimeError: Lock is not acquired.

2020-12-17 Thread Yury Selivanov
Yury Selivanov added the comment: Hey Hynek! :) Can you submit a PR? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42670] Missing word in itertools.product

2020-12-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +22684 pull_request: https://github.com/python/cpython/pull/23824 ___ Python tracker ___

[issue42671] Make the Python finalization more deterministic

2020-12-17 Thread STINNER Victor
STINNER Victor added the comment: I took some notes on latest changes of the Python finalization order: https://pythondev.readthedocs.io/finalization.html#reorder-python-finalization Not directly related, I also took notes on the "weird GC behavior during Python finalization" (such as the

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-12-17 Thread STINNER Victor
STINNER Victor added the comment: I marked the following issues as duplicates of this one: * bpo-15651: PEP 3121, 384 refactoring applied to elementtree module * bpo-15650: PEP 3121, 384 refactoring applied to dbm module * bpo-15712: PEP 3121, 384 Refactoring applied to unicodedata module *

[issue42651] Recursive traceback crashes Python Interpreter

2020-12-17 Thread Steve Stagg
Steve Stagg added the comment: Confirmed that bpo-42500 fixes this traceback, in commit 4e7a69bdb6 Parent commit: user@obsidian ~/t/f/cpython (master)> git checkout 93a0ef7 Note: switching to '93a0ef7'. HEAD is now at 93a0ef7647 Correct return type in Modules/_ssl.c::sslmodule_legacy

[issue42671] Make the Python finalization more deterministic

2020-12-17 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +22688 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23826 ___ Python tracker ___

[issue42651] Recursive traceback crashes Python Interpreter

2020-12-17 Thread Steve Stagg
Steve Stagg added the comment: Sorry, previous should have read "Fixes the abort" -- ___ Python tracker ___ ___ Python-bugs-list

[issue42652] recursive in finally clause cause Python interpreter crash.

2020-12-17 Thread Steve Stagg
Steve Stagg added the comment: This was also fixed by bpo-42500, in commit 4e7a69bdb6 === user@obsidian ~/t/f/cpython ((93a0ef76…))> git checkout 4e7a69bd^ HEAD is now at 93a0ef7647 Correct return type in Modules/_ssl.c::sslmodule_legacy (GH-23609) + make distclean + CFLAGS=-O0 + ./configure

[issue15712] PEP 3121, 384 Refactoring applied to unicodedata module

2020-12-17 Thread STINNER Victor
STINNER Victor added the comment: Fixed by multiple changes, especially: commit c8c4200b65b2159bbb13cee10d67dfb3676fef26 Author: Victor Stinner Date: Mon Oct 26 23:19:22 2020 +0100 bpo-42157: Convert unicodedata.UCD to heap type (GH-22991) Convert the unicodedata extension

[issue15669] PEP 3121, 384 Refactoring applied to sre module

2020-12-17 Thread STINNER Victor
STINNER Victor added the comment: Fixed by: commit a6109ef68d421712ba368ef502c4789e8de113e0 Author: Erlend Egeberg Aasland Date: Fri Nov 20 13:36:23 2020 +0100 bpo-1635741: Convert _sre types to heap types and establish module state (PEP 384) (GH-23393) -- nosy: +vstinner

[issue42671] Make the Python finalization more deterministic

2020-12-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Modules are already cleared in the reverse order. Clearing module attributes in the reverse order looks interesting. It increases chance that modules and other imported names which can be used in __del__ will be deleted after executing __del__ if the

[issue15651] PEP 3121, 384 refactoring applied to elementtree module

2020-12-17 Thread STINNER Victor
STINNER Victor added the comment: Fixed by: commit a6109ef68d421712ba368ef502c4789e8de113e0 Author: Erlend Egeberg Aasland Date: Fri Nov 20 13:36:23 2020 +0100 bpo-1635741: Convert _sre types to heap types and establish module state (PEP 384) (GH-23393) -- nosy: +vstinner

[issue15650] PEP 3121, 384 refactoring applied to dbm module

2020-12-17 Thread STINNER Victor
STINNER Victor added the comment: Fixed by: commit bf69a8f99f1b0e19a59509c6c4d7015a31d881a1 Author: Dong-hee Na Date: Tue Jun 16 01:20:54 2020 +0900 bpo-1635741: Port _dbm module to multiphase initialization (GH-20848) -- nosy: +vstinner resolution: -> duplicate stage: ->

[issue42671] Make the Python finalization more deterministic

2020-12-17 Thread STINNER Victor
STINNER Victor added the comment: I wrote this issue to attempt to fix a leak in PR 23811 which converts the _thread extension module to the multiphase initialization API (PEP 489). -- ___ Python tracker

[issue42600] Cancelling tasks waiting for asyncio.Conditions crashes w/ RuntimeError: Lock is not acquired.

2020-12-17 Thread Yurii Karabas
Yurii Karabas <1998uri...@gmail.com> added the comment: Hey Yurii, I have fixed this issue. The actual problem was that `wait_for` cancels passed future but doesn't wait until it finished. -- ___ Python tracker

[issue42199] bytecode_helper assertNotInBytecode fails too eagerly

2020-12-17 Thread Dino Viehland
Dino Viehland added the comment: New changeset 6e799be0a18d0bb5bbbdc77cd3c30a229d31dfb4 by Max Bernstein in branch 'master': bpo-42199: Fix bytecode_helper assertNotInBytecode (#23031) https://github.com/python/cpython/commit/6e799be0a18d0bb5bbbdc77cd3c30a229d31dfb4 -- nosy:

[issue15725] PyType_FromSpecWithBases bugfix

2020-12-17 Thread STINNER Victor
STINNER Victor added the comment: Tons of extension modules have been ported to the multiphase initialization API (PEP 489) in bpo-1635741 without this fix. I don't think that it's needed. -- nosy: +vstinner resolution: -> not a bug stage: -> resolved status: open -> closed

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-12-17 Thread STINNER Victor
STINNER Victor added the comment: Statistics on C extension modules using the new API (PyModuleDef_Init) / total: * 3.9: 52 / 120 (43%) * master: 94 / 119 (79%) 25 extension modules are still using the old API (PyModule_Create). -- ___ Python

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-12-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset 6104013838e181e3c698cb07316f449a0c31ea96 by Victor Stinner in branch 'master': bpo-1635741: Port _thread to multiphase init (GH-23811) https://github.com/python/cpython/commit/6104013838e181e3c698cb07316f449a0c31ea96 --

[issue42671] Make the Python finalization more deterministic

2020-12-17 Thread STINNER Victor
STINNER Victor added the comment: > Modules are already cleared in the reverse order. In Python 3.9, _PyImport_Cleanup() of Python/import.c contains the comment: /* Since dict is ordered in CPython 3.6+, modules are saved in importing order. First clear modules imported

[issue42600] Cancelling tasks waiting for asyncio.Conditions crashes w/ RuntimeError: Lock is not acquired.

2020-12-17 Thread Yurii Karabas
Change by Yurii Karabas <1998uri...@gmail.com>: -- keywords: +patch nosy: +uriyyo nosy_count: 4.0 -> 5.0 pull_requests: +22689 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23829 ___ Python tracker

[issue15674] PEP 3121, 384 Refactoring applied to _thread module

2020-12-17 Thread STINNER Victor
STINNER Victor added the comment: Fixed by: New changeset 6104013838e181e3c698cb07316f449a0c31ea96 by Victor Stinner in branch 'master': bpo-1635741: Port _thread to multiphase init (GH-23811) https://github.com/python/cpython/commit/6104013838e181e3c698cb07316f449a0c31ea96 -- nosy:

[issue15848] PEP 3121, 384 Refactoring applied to xxsubtype module

2020-12-17 Thread STINNER Victor
STINNER Victor added the comment: See bpo-4 "[C API] Convert a few stdlib extensions to the limited C API (PEP 384)" for the PEP 384 part. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue15651] PEP 3121, 384 refactoring applied to elementtree module

2020-12-17 Thread STINNER Victor
STINNER Victor added the comment: > Fixed by: (...) bpo-1635741: Convert _sre types to heap types... Oops, I commented the wrong issue. I reopen it. -- resolution: duplicate -> status: closed -> open superseder: Py_Finalize() doesn't clear all Python objects at exit ->

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-12-17 Thread STINNER Victor
STINNER Victor added the comment: > * bpo-15651: PEP 3121, 384 refactoring applied to elementtree module Oops, this was a mistake. This one is not fixed yet. -- ___ Python tracker

[issue42671] Make the Python finalization more deterministic

2020-12-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I experimented with different approaches last evening. Just changing the order of clearing the module dict does not help your first example, because the __main__ module is garbage collected, but its dict is not cleared. Adding _PyModule_ClearDict() in

[issue22228] Adapt bash readline operate-and-get-next function

2020-12-17 Thread Lele Gaifax
Lele Gaifax added the comment: Apparently, now the operate-and-get-next function has been moved to the readline library, so hopefully it will be easier to get its advantage. See point 2.j in https://lwn.net/Articles/839213/ -- ___ Python tracker

[issue42665] Should PyLong_AsLongAndOverflow raise exception on overflow?

2020-12-17 Thread Ganesh Kathiresan
Change by Ganesh Kathiresan : -- components: C API nosy: ganesh3597 priority: normal severity: normal status: open title: Should PyLong_AsLongAndOverflow raise exception on overflow? type: behavior versions: Python 3.10 ___ Python tracker

[issue42666] getting a class source regresses in Python 3.9

2020-12-17 Thread Thomas Viehmann
New submission from Thomas Viehmann : getting a class source regresses in Python 3.9 onwards. The following worked in Python 3.8, now it doesn't anymore for 3.9.1 and 3.10.0a2: (save as foo.py) import inspect class Foo: def spam(self): global Bar class Bar:

[issue41804] test_epoll fails test_control_and_wait() randomly on aarch64 RHEL8 Refleaks 3.9

2020-12-17 Thread miss-islington
miss-islington added the comment: New changeset e962e3ad225a211b9f9689742db6e9771d07c505 by Miss Islington (bot) in branch '3.9': bpo-41804: Enhance test_epoll.test_control_and_wait() (GH-23795) https://github.com/python/cpython/commit/e962e3ad225a211b9f9689742db6e9771d07c505 --