Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Doc/c-api/apiabiversion.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,23 @@ See :ref:`stable` for a discussion of API and ABI stability across versions.
This can be ``0xA`` for alpha, ``0xB`` for beta, ``0xC`` for release
candidate or ``0xF`` for final.


.. c:namespace:: NULL
.. c:macro:: PY_RELEASE_LEVEL_ALPHA
:no-typesetting:
.. c:macro:: PY_RELEASE_LEVEL_BETA
:no-typesetting:
.. c:macro:: PY_RELEASE_LEVEL_GAMMA
:no-typesetting:
.. c:macro:: PY_RELEASE_LEVEL_FINAL
:no-typesetting:

For completeness, the values are available as macros:
:c:macro:`!PY_RELEASE_LEVEL_ALPHA` (``0xA``),
:c:macro:`!PY_RELEASE_LEVEL_BETA` (``0xB``),
:c:macro:`!PY_RELEASE_LEVEL_GAMMA` (``0xC``), and
:c:macro:`!PY_RELEASE_LEVEL_FINAL` (``0xF``).

.. c:macro:: PY_RELEASE_SERIAL
The ``2`` in ``3.4.1a2``. Zero for final releases.
Expand All @@ -46,6 +63,10 @@ See :ref:`stable` for a discussion of API and ABI stability across versions.
Use this for numeric comparisons, for example,
``#if PY_VERSION_HEX >= ...``.

.. c:macro:: PY_VERSION
The Python version as a string, for example, ``"3.4.1a2"``.


Run-time version
----------------
Expand Down
7 changes: 5 additions & 2 deletions Doc/c-api/module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -820,15 +820,18 @@ struct:
.. versionadded:: 3.5

.. c:macro:: PYTHON_API_VERSION
PYTHON_API_STRING

The C API version. Defined for backwards compatibility.
The C API version, as an integer (``1013``) and string (``"1013"``), respectively.
Defined for backwards compatibility.

Currently, this constant is not updated in new Python versions, and is not
useful for versioning. This may change in the future.

.. c:macro:: PYTHON_ABI_VERSION
PYTHON_ABI_STRING

Defined as ``3`` for backwards compatibility.
Defined as ``3`` and ``"3"``, respectively, for backwards compatibility.

Currently, this constant is not updated in new Python versions, and is not
useful for versioning. This may change in the future.
Expand Down
8 changes: 0 additions & 8 deletions Tools/check-c-api-docs/ignored_c_api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,6 @@ PY_SIZE_MAX
PY_UINT32_T
PY_UINT64_T
PY_ULLONG_MAX
# patchlevel.h
PYTHON_ABI_STRING
PYTHON_API_STRING
PY_RELEASE_LEVEL_ALPHA
PY_RELEASE_LEVEL_BETA
PY_RELEASE_LEVEL_FINAL
PY_RELEASE_LEVEL_GAMMA
PY_VERSION
# unicodeobject.h
Py_UNICODE_SIZE
# cpython/methodobject.h
Expand Down
Loading