
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2019-04-08 16:56 byvstinner, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 12733 | merged | vstinner,2019-04-08 17:03 | |
| PR 12734 | merged | miss-islington,2019-04-08 23:36 | |
| Messages (3) | |||
|---|---|---|---|
| msg339661 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2019-04-08 16:56 | |
Disable the compilation of the built-in _abc module. For example, on Python 3.7 apply the following patch:diff --git a/Modules/Setup.dist b/Modules/Setup.distindex8cc6bf0540..4015527b32 100644--- a/Modules/Setup.dist+++ b/Modules/Setup.dist@@ -114,7 +114,7 @@ _weakref _weakref.c # weak references _functools -DPy_BUILD_CORE _functoolsmodule.c # Tools for working with functions and callable objects _operator _operator.c # operator.add() and similar goodies _collections _collectionsmodule.c # Container types-_abc _abc.c # Abstract base classes+#_abc _abc.c # Abstract base classes itertools itertoolsmodule.c # Functions creating iterators for efficient looping atexit atexitmodule.c # Register functions to be run at interpreter-shutdown _signal -DPy_BUILD_CORE signalmodule.c@@ -363,7 +363,8 @@ xxsubtype xxsubtype.c # Uncommenting the following line tells makesetup that all following modules # are not built (see above for more detail). #-#*disabled*+*disabled* # #_sqlite3 _tkinter _curses pyexpat #_codecs_jp _codecs_kr _codecs_tw unicodedata+_abcRecompile Python, check:$ ./python -c 'import _abc'ModuleNotFoundError: No module named '_abc'Run:$ ./python -u -m test -R 3:3 test_functools -m test_mro_conflicts Error without _abc:test test_functools crashed -- Traceback (most recent call last): File "/home/vstinner/prog/python/3.7/Lib/test/libregrtest/runtest.py", line 180, in runtest_inner refleak = dash_R(the_module, test, test_runner, ns.huntrleaks) File "/home/vstinner/prog/python/3.7/Lib/test/libregrtest/refleak.py", line 71, in dash_R abcs) File "/home/vstinner/prog/python/3.7/Lib/test/libregrtest/refleak.py", line 148, in dash_R_cleanup obj.register(ref()) File "/home/vstinner/prog/python/3.7/Lib/_py_abc.py", line 60, in register raise TypeError("Can only register classes")TypeError: Can only register classesWith built-in _abc module, regrtest is fine.The problem comes from pure-Python reimplementation of abc._get_dump() inLib/test/libregrtest/refleak.py: def _get_dump(cls): # For legacy Python version return (cls._abc_registry, cls._abc_cache, cls._abc_negative_cache, cls._abc_negative_cache_version)The first item tuple must be a set of weak references. Currently, it's a weak set of strong references.Attached PR fix the issue. | |||
| msg339685 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2019-04-08 23:36 | |
New changeset79b5d29041bd85ea3baa050b3fa2481344ea35c9 by Victor Stinner in branch 'master':bpo-36565: Fix libregrtest for Python without builtin _abc (GH-12733)https://github.com/python/cpython/commit/79b5d29041bd85ea3baa050b3fa2481344ea35c9 | |||
| msg339686 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2019-04-08 23:54 | |
New changeset2368d86ed1249505b10561e005fc57f4884619c1 by Victor Stinner (Miss Islington (bot)) in branch '3.7':bpo-36565: Fix libregrtest for Python without builtin _abc (GH-12733) (GH-12734)https://github.com/python/cpython/commit/2368d86ed1249505b10561e005fc57f4884619c1 | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:13 | admin | set | github: 80746 |
| 2019-04-08 23:58:35 | vstinner | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2019-04-08 23:54:24 | vstinner | set | messages: +msg339686 |
| 2019-04-08 23:36:55 | miss-islington | set | pull_requests: +pull_request12657 |
| 2019-04-08 23:36:50 | vstinner | set | messages: +msg339685 |
| 2019-04-08 17:03:21 | vstinner | set | keywords: +patch stage: patch review pull_requests: +pull_request12656 |
| 2019-04-08 16:56:30 | vstinner | create | |