mirror of
https://github.com/python/cpython.git
synced 2026-06-28 13:50:17 -04:00
e9c7cc1f0b
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 16185e9fe2)
Co-authored-by: Petr Viktorin <encukou@gmail.com>