]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-43931: Export Python version as API data (GH-25577)
authorGabriele N. Tornetta <P403n1x87@users.noreply.github.com>
Fri, 10 Dec 2021 01:52:05 +0000 (01:52 +0000)
committerGitHub <noreply@github.com>
Fri, 10 Dec 2021 01:52:05 +0000 (17:52 -0800)
commit50669083fe16a42cba90b5dd8c1a017751f69fd8
treefc2a1c7425e20d7df0b4fa44b23fdf47b5bbf35c
parentda3cf4304f6dd530533bbd2c0913b674cd803744
bpo-43931: Export Python version as API data (GH-25577)

When Python is embedded in other applications, it is not easy to determine which version of Python is being used. This change exposes the Python version as part of the API data. Tools like Austin (https://github.com/P403n1x87/austin) can benefit from this data when targeting applications like uWSGI, as the Python version can then be inferred systematically by looking at the exported symbols rather than relying on unreliable pattern matching or other hacks (like remote code execution etc...).

Automerge-Triggered-By: GH:pablogsal
12 files changed:
Doc/c-api/apiabiversion.rst
Doc/c-api/init.rst
Doc/data/stable_abi.dat
Doc/whatsnew/3.11.rst
Include/pylifecycle.h
Lib/test/test_capi.py
Lib/test/test_stable_abi_ctypes.py
Misc/NEWS.d/next/Core and Builtins/2021-04-24-15-39-23.bpo-43931.zpChDi.rst [new file with mode: 0644]
Misc/stable_abi.txt
Modules/_testcapimodule.c
PC/python3dll.c
Python/getversion.c