GeezerVison is showing github.com — gh-149044: Improve Py_tp_base[s] docs & error message for non-type bases by encukou · Pull Request #151252 · python/cpython
Conversation
encukou
commented
Jun 10, 2026
•
edited by bedevere-app
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
The initial implementation of PEP 820 worsened the error message when non-types are given as base types in Py_tp_bases & Py_tp_base (as Peter noted in the review).
Bring back the 'bases must be types' wording and add a 'got' note for easier debugging.
Improve slot ID documentation, and soft-deprecate Py_tp_base (as per the PEP).
Add more tests.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…ype bases
The initial implementation of PEP 820 worsened the error message
when non-types are given as base types in Py_tp_bases & Py_tp_base.
Bring back the 'bases must be types' wording and add a 'got' note for
easier debugging.
Improve slot ID documentation, and soft-deprecate Py_tp_base
(as per the PEP).
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks @encukou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
philthompson10
pushed a commit
to philthompson10/cpython
that referenced
this pull request
Jun 17, 2026
…ype bases (pythonGH-151252)
The initial implementation of PEP 820 worsened the error message
when non-types are given as base types in Py_tp_bases & Py_tp_base.
Bring back the 'bases must be types' wording and add a 'got' note for
easier debugging.
Improve slot ID documentation, and soft-deprecate Py_tp_base
(as per the PEP).
encukou
added a commit
that referenced
this pull request
Jun 18, 2026
…type bases (GH-151252) (GH-151606)
gh-149044: Improve Py_tp_base[s] docs & error message for non-type bases (GH-151252)
The initial implementation of PEP 820 worsened the error message
when non-types are given as base types in Py_tp_bases & Py_tp_base.
Bring back the 'bases must be types' wording and add a 'got' note for
easier debugging.
Improve slot ID documentation, and soft-deprecate Py_tp_base
(as per the PEP).
(cherry picked from commit 16185e9)
Co-authored-by: Petr Viktorin <[email protected]>
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️
Hi! The buildbot AMD64 Debian root 3.15 (tier-1) has failed when building commit e9c7cc1.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/2019/builds/205) and take a look at the build logs.
- Check if the failure is related to this commit (e9c7cc1) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/2019/builds/205
Failed tests:
- test.test_multiprocessing_fork.test_misc
Failed subtests:
- test_large_pool - test.test_multiprocessing_fork.test_misc.MiscTestCase.test_large_pool
Summary of the results of the build (if available):
==
Click to see traceback logs
Traceback (most recent call last):
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/test/_test_multiprocessing.py", line 7306, in test_large_pool
rc, out, err = script_helper.assert_python_ok(testfn)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/test/support/script_helper.py", line 182, in assert_python_ok
return _assert_python(True, *args, **env_vars)
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/test/support/script_helper.py", line 167, in _assert_python
res.fail(cmd_line)
~~~~~~~~^^^^^^^^^^
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/test/support/script_helper.py", line 80, in fail
raise AssertionError(f"Process return code is {exitcode}\n"
...<10 lines>...
f"---")
AssertionError: Process return code is 1
command line: ['/root/buildarea/3.15.angelico-debian-amd64/build/python', '-X', 'faulthandler', '-I', '@test_1451345_tmpæ']
Traceback (most recent call last):
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/test/_test_multiprocessing.py", line 7306, in test_large_pool
rc, out, err = script_helper.assert_python_ok(testfn)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/test/support/script_helper.py", line 182, in assert_python_ok
return _assert_python(True, *args, **env_vars)
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/test/support/script_helper.py", line 167, in _assert_python
res.fail(cmd_line)
~~~~~~~~^^^^^^^^^^
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/test/support/script_helper.py", line 80, in fail
raise AssertionError(f"Process return code is {exitcode}\n"
...<10 lines>...
f"---")
AssertionError: Process return code is 1
command line: ['/root/buildarea/3.15.angelico-debian-amd64/build/python', '-X', 'faulthandler', '-I', '@test_1421029_tmpæ']
Traceback (most recent call last):
File "<string>", line 1, in <module>
import sys; from multiprocessing.forkserver import main; main(10, 11, ['__main__'], sys_argv=sys.argv[1:], **{'sys_path': ['/root/buildarea/3.15.angelico-debian-amd64/build/target/lib/python315.zip', '/root/buildarea/3.15.angelico-debian-amd64/build/Lib', '/root/buildarea/3.15.angelico-debian-amd64/build/build/lib.linux-x86_64-3.15'], 'main_path': '/root/buildarea/3.15.angelico-debian-amd64/build/build/test_python_1451345æ/@test_1451345_tmpæ', 'authkey_r': 13})
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/multiprocessing/forkserver.py", line 406, in main
pid = os.fork()
OSError: [Errno 12] Cannot allocate memory
Traceback (most recent call last):
File "/root/buildarea/3.15.angelico-debian-amd64/build/build/test_python_1451345æ/@test_1451345_tmpæ", line 4, in <module>
with multiprocessing.Pool(200) as p:
~~~~~~~~~~~~~~~~~~~~^^^^^
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/multiprocessing/context.py", line 119, in Pool
return Pool(processes, initializer, initargs, maxtasksperchild,
context=self.get_context())
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/multiprocessing/pool.py", line 215, in __init__
self._repopulate_pool()
~~~~~~~~~~~~~~~~~~~~~^^
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/multiprocessing/pool.py", line 306, in _repopulate_pool
return self._repopulate_pool_static(self._ctx, self.Process,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
self._processes,
^^^^^^^^^^^^^^^^
...<3 lines>...
self._maxtasksperchild,
^^^^^^^^^^^^^^^^^^^^^^^
self._wrap_exception)
^^^^^^^^^^^^^^^^^^^^^
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/multiprocessing/pool.py", line 329, in _repopulate_pool_static
w.start()
~~~~~~~^^
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
~~~~~~~~~~~^^^^^^
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/multiprocessing/context.py", line 309, in _Popen
return Popen(process_obj)
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/multiprocessing/popen_forkserver.py", line 35, in __init__
super().__init__(process_obj)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/multiprocessing/popen_fork.py", line 20, in __init__
self._launch(process_obj)
~~~~~~~~~~~~^^^^^^^^^^^^^
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/multiprocessing/popen_forkserver.py", line 59, in _launch
self.pid = forkserver.read_signed(self.sentinel)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/multiprocessing/forkserver.py", line 472, in read_signed
raise EOFError('unexpected EOF')
EOFError: unexpected EOF
---
Traceback (most recent call last):
File "<string>", line 1, in <module>
import sys; from multiprocessing.forkserver import main; main(10, 11, ['__main__'], sys_argv=sys.argv[1:], **{'sys_path': ['/root/buildarea/3.15.angelico-debian-amd64/build/target/lib/python315.zip', '/root/buildarea/3.15.angelico-debian-amd64/build/Lib', '/root/buildarea/3.15.angelico-debian-amd64/build/build/lib.linux-x86_64-3.15'], 'main_path': '/root/buildarea/3.15.angelico-debian-amd64/build/build/test_python_1421029æ/@test_1421029_tmpæ', 'authkey_r': 13})
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/multiprocessing/forkserver.py", line 406, in main
pid = os.fork()
OSError: [Errno 12] Cannot allocate memory
Traceback (most recent call last):
File "/root/buildarea/3.15.angelico-debian-amd64/build/build/test_python_1421029æ/@test_1421029_tmpæ", line 4, in <module>
with multiprocessing.Pool(200) as p:
~~~~~~~~~~~~~~~~~~~~^^^^^
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/multiprocessing/context.py", line 119, in Pool
return Pool(processes, initializer, initargs, maxtasksperchild,
context=self.get_context())
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/multiprocessing/pool.py", line 215, in __init__
self._repopulate_pool()
~~~~~~~~~~~~~~~~~~~~~^^
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/multiprocessing/pool.py", line 306, in _repopulate_pool
return self._repopulate_pool_static(self._ctx, self.Process,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
self._processes,
^^^^^^^^^^^^^^^^
...<3 lines>...
self._maxtasksperchild,
^^^^^^^^^^^^^^^^^^^^^^^
self._wrap_exception)
^^^^^^^^^^^^^^^^^^^^^
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/multiprocessing/pool.py", line 329, in _repopulate_pool_static
w.start()
~~~~~~~^^
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
~~~~~~~~~~~^^^^^^
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/multiprocessing/context.py", line 309, in _Popen
return Popen(process_obj)
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/multiprocessing/popen_forkserver.py", line 35, in __init__
super().__init__(process_obj)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/multiprocessing/popen_fork.py", line 20, in __init__
self._launch(process_obj)
~~~~~~~~~~~~^^^^^^^^^^^^^
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/multiprocessing/popen_forkserver.py", line 59, in _launch
self.pid = forkserver.read_signed(self.sentinel)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/multiprocessing/forkserver.py", line 472, in read_signed
raise EOFError('unexpected EOF')
EOFError: unexpected EOF
---
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|