Skip to content

Soft-deprecate sys.api_version and the C API's PYTHON_API_VERSION #121028

Open
@ncoghlan

Description

@ncoghlan

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)

(from https://discuss.python.org/t/should-we-document-that-python-api-version-sys-api-version-are-no-longer-updated/)

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions