File tree Expand file tree Collapse file tree 3 files changed +26
-10
lines changed
Expand file tree Collapse file tree 3 files changed +26
-10
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,23 @@ See :ref:`stable` for a discussion of API and ABI stability across versions.
3434 This can be ``0xA `` for alpha, ``0xB `` for beta, ``0xC `` for release
3535 candidate or ``0xF `` for final.
3636
37+
38+ .. c :namespace :: NULL
39+ .. c :macro :: PY_RELEASE_LEVEL_ALPHA
40+ :no-typesetting:
41+ .. c :macro :: PY_RELEASE_LEVEL_BETA
42+ :no-typesetting:
43+ .. c :macro :: PY_RELEASE_LEVEL_GAMMA
44+ :no-typesetting:
45+ .. c :macro :: PY_RELEASE_LEVEL_FINAL
46+ :no-typesetting:
47+
48+ For completeness, the values are available as macros:
49+ :c:macro: `!PY_RELEASE_LEVEL_ALPHA ` (``0xA ``),
50+ :c:macro: `!PY_RELEASE_LEVEL_BETA ` (``0xB ``),
51+ :c:macro: `!PY_RELEASE_LEVEL_GAMMA ` (``0xC ``), and
52+ :c:macro: `!PY_RELEASE_LEVEL_FINAL ` (``0xF ``).
53+
3754.. c :macro :: PY_RELEASE_SERIAL
3855
3956 The ``2 `` in ``3.4.1a2 ``. Zero for final releases.
@@ -46,6 +63,10 @@ See :ref:`stable` for a discussion of API and ABI stability across versions.
4663 Use this for numeric comparisons, for example,
4764 ``#if PY_VERSION_HEX >= ... ``.
4865
66+ .. c :macro :: PY_VERSION
67+
68+ The Python version as a string, for example, ``"3.4.1a2" ``.
69+
4970
5071Run-time version
5172----------------
Original file line number Diff line number Diff line change @@ -820,15 +820,18 @@ struct:
820820 .. versionadded:: 3.5
821821
822822.. c:macro:: PYTHON_API_VERSION
823+ PYTHON_API_STRING
823824
824- The C API version. Defined for backwards compatibility.
825+ The C API version, as an integer (``1013 ``) and string (``"1013" ``), respectively.
826+ Defined for backwards compatibility.
825827
826828 Currently, this constant is not updated in new Python versions, and is not
827829 useful for versioning. This may change in the future.
828830
829831.. c:macro:: PYTHON_ABI_VERSION
832+ PYTHON_ABI_STRING
830833
831- Defined as ``3`` for backwards compatibility.
834+ Defined as ``3`` and ``"3"``, respectively, for backwards compatibility.
832835
833836 Currently, this constant is not updated in new Python versions, and is not
834837 useful for versioning. This may change in the future.
Original file line number Diff line number Diff line change @@ -58,14 +58,6 @@ PY_SIZE_MAX
5858PY_UINT32_T
5959PY_UINT64_T
6060PY_ULLONG_MAX
61- # patchlevel.h
62- PYTHON_ABI_STRING
63- PYTHON_API_STRING
64- PY_RELEASE_LEVEL_ALPHA
65- PY_RELEASE_LEVEL_BETA
66- PY_RELEASE_LEVEL_FINAL
67- PY_RELEASE_LEVEL_GAMMA
68- PY_VERSION
6961# unicodeobject.h
7062Py_UNICODE_SIZE
7163# cpython/methodobject.h
You can’t perform that action at this time.
0 commit comments