Lines Matching +full:python +full:- +full:version
9 Python's C API is covered by the Backwards Compatibility Policy, :pep:`387`.
11 most changes will be source-compatible, typically by only adding new API.
15 CPython's Application Binary Interface (ABI) is forward- and
16 backwards-compatible across a minor release (if these are compiled the same
17 way; see :ref:`stable-abi-platform` below).
18 So, code compiled for Python 3.10.0 will work on 3.10.8 and vice versa,
28 Python 3.2 introduced the *Limited API*, a subset of Python's C API.
30 compiled once and work with multiple versions of Python.
31 Contents of the Limited API are :ref:`listed below <stable-abi-list>`.
33 To enable this, Python provides a *Stable ABI*: a set of symbols that will
34 remain compatible across Python 3.x versions. The Stable ABI contains symbols
40 embedding Python.)
44 Define this macro before including ``Python.h`` to opt in to only use
45 the Limited API, and to select the Limited API version.
48 corresponding to the lowest Python version your extension supports.
49 The extension will work without recompilation with all Python 3 releases
51 version.
54 minor version (e.g. ``0x030A0000`` for Python 3.10) for stability when
55 compiling with future Python versions.
58 ``0x03020000`` (Python 3.2, the version that introduced Limited API).
61 ``python3.dll`` rather than a version-specific library such as
64 On some platforms, Python will look for and load shared library files named
69 versions of Python.
71 All functions in the Stable ABI are present as functions in Python's shared
77 ---------------------------------
84 The macro can be faster because it can rely on version-specific implementation
90 Python's data structures are improved, but possibly reducing performance.
93 a Limited API extension with a version-specific ABI. This can improve
94 performance for that Python version, but will limit compatibility.
96 distributed where a version-specific one is not available – for example,
97 for prereleases of an upcoming Python version.
101 -------------------
109 with arguments that are invalid in a lower Python version.
111 argument. In Python 3.9, ``NULL`` now selects a default behavior, but in
112 Python 3.8, the argument will be used directly, causing a ``NULL`` dereference
118 For these reasons, we recommend testing an extension with *all* minor Python
119 versions it supports, and preferably to build with the *lowest* such version.
127 ``Py_LIMITED_API`` with Python 3.8 means that the extension will
128 run with Python 3.12, but it will not necessarily *compile* with Python 3.12.
133 .. _stable-abi-platform:
138 ABI stability depends not only on Python, but also on the compiler used,
139 lower-level libraries and compiler options. For the purposes of the Stable ABI,
143 It is the responsibility of each particular distributor of Python
144 to ensure that all Python versions on a particular platform are built
146 This is the case with Windows and macOS releases from ``python.org`` and many
147 third-party distributors.
150 .. _stable-abi-list:
158 .. limited-api-list::