From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/python~3.12/c-api%2Fapiabiversion.html | 33 ++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 devdocs/python~3.12/c-api%2Fapiabiversion.html (limited to 'devdocs/python~3.12/c-api%2Fapiabiversion.html') diff --git a/devdocs/python~3.12/c-api%2Fapiabiversion.html b/devdocs/python~3.12/c-api%2Fapiabiversion.html new file mode 100644 index 00000000..7ef6a990 --- /dev/null +++ b/devdocs/python~3.12/c-api%2Fapiabiversion.html @@ -0,0 +1,33 @@ +

API and ABI Versioning

CPython exposes its version number in the following macros. Note that these correspond to the version code is built with, not necessarily the version used at run time.

See C API Stability for a discussion of API and ABI stability across versions.

+PY_MAJOR_VERSION
+

The 3 in 3.4.1a2.

+
+PY_MINOR_VERSION
+

The 4 in 3.4.1a2.

+
+PY_MICRO_VERSION
+

The 1 in 3.4.1a2.

+
+PY_RELEASE_LEVEL
+

The a in 3.4.1a2. This can be 0xA for alpha, 0xB for beta, 0xC for release candidate or 0xF for final.

+
+PY_RELEASE_SERIAL
+

The 2 in 3.4.1a2. Zero for final releases.

+
+PY_VERSION_HEX
+

The Python version number encoded in a single integer.

The underlying version information can be found by treating it as a 32 bit number in the following manner:

+ + + + + +

Bytes

Bits (big endian order)

Meaning

Value for 3.4.1a2

1

1-8

PY_MAJOR_VERSION

0x03

2

9-16

PY_MINOR_VERSION

0x04

3

17-24

PY_MICRO_VERSION

0x01

4

25-28

PY_RELEASE_LEVEL

0xA

29-32

PY_RELEASE_SERIAL

0x2

Thus 3.4.1a2 is hexversion 0x030401a2 and 3.10.0 is hexversion 0x030a00f0.

Use this for numeric comparisons, e.g. #if PY_VERSION_HEX >= ....

This version is also available via the symbol Py_Version.

+
+const unsigned long Py_Version
+ Part of the Stable ABI since version 3.11.

The Python runtime version number encoded in a single constant integer, with the same format as the PY_VERSION_HEX macro. This contains the Python version used at run time.

New in version 3.11.

+

All the given macros are defined in Include/patchlevel.h.

+

+ © 2001–2023 Python Software Foundation
Licensed under the PSF License.
+ https://docs.python.org/3.12/c-api/apiabiversion.html +

+
-- cgit v1.2.3