You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Soft-deprecate sys.api_version and the C API's PYTHON_API_VERSION #121028
PYTHON_API_VERSION and the related sys.api_version module attribute were last changed for Python 2.6.
At the moment they're not documented at all, so anyone stumbling across them (e.g. by running dir(sys)) may be legitimately confused as to what they're for.
They're not actually for anything, they're an old idea to help manage cross-version extension module compatibility checks that was superseded by the introduction of the stable ABI in PEP 384.
This ticket covers adding these values to the documentation specifically so they can be given an explicit soft deprecation notice (we don't have any plans to actually remove them, since their ongoing maintenance cost is essentially zero - prior to the Discourse thread linked below, I doubt anyone had even remembered these existed in the past decade)
I documented PYTHON_API_VERSION & PYTHON_ABI_VERSION a while back, after forgetting about that discussion and sys.api_version...
PR to finish this: #136463
Activity
hugovk commentedon Jun 26, 2024
There's very little use in the top 8k PyPI projects:
pythongh-121028: Soft-deprecate sys.api_version
encukou commentedon Jul 9, 2025
I documented PYTHON_API_VERSION & PYTHON_ABI_VERSION a while back, after forgetting about that discussion and
sys.api_version...PR to finish this: #136463
gh-121028: Soft-deprecate sys.api_version (GH-136463)
pythongh-121028: Soft-deprecate sys.api_version (pythonGH-136463)
[3.14] gh-121028: Soft-deprecate sys.api_version (GH-136463) (GH-136928)
pythongh-121028: Soft-deprecate sys.api_version (pythonGH-136463)
pythongh-121028: Soft-deprecate sys.api_version (pythonGH-136463)
[3.14] pythongh-121028: Soft-deprecate sys.api_version (pythonGH-136463…