|
10 | 10 | #pragma once |
11 | 11 |
|
12 | 12 | #include "common.h" |
| 13 | +#include "internals_version.h" |
13 | 14 | #include "platform_abi_id.h" |
14 | 15 |
|
15 | 16 | #if defined(PYBIND11_SIMPLE_GIL_MANAGEMENT) |
|
22 | 23 | #include <mutex> |
23 | 24 | #include <thread> |
24 | 25 |
|
25 | | -/// Tracks the `internals` and `type_info` ABI version independent of the main library version. |
26 | | -/// |
27 | | -/// Some portions of the code use an ABI that is conditional depending on this |
28 | | -/// version number. That allows ABI-breaking changes to be "pre-implemented". |
29 | | -/// Once the default version number is incremented, the conditional logic that |
30 | | -/// no longer applies can be removed. Additionally, users that need not |
31 | | -/// maintain ABI compatibility can increase the version number in order to take |
32 | | -/// advantage of any functionality/efficiency improvements that depend on the |
33 | | -/// newer ABI. |
34 | | -/// |
35 | | -/// WARNING: If you choose to manually increase the ABI version, note that |
36 | | -/// pybind11 may not be tested as thoroughly with a non-default ABI version, and |
37 | | -/// further ABI-incompatible changes may be made before the ABI is officially |
38 | | -/// changed to the new version. |
39 | | -#ifndef PYBIND11_INTERNALS_VERSION |
40 | | -# if PY_VERSION_HEX >= 0x030C0000 || defined(_MSC_VER) |
41 | | -// Version bump for Python 3.12+, before first 3.12 beta release. |
42 | | -// Version bump for MSVC piggy-backed on PR #4779. See comments there. |
43 | | -# define PYBIND11_INTERNALS_VERSION 5 |
44 | | -# else |
45 | | -# define PYBIND11_INTERNALS_VERSION 4 |
46 | | -# endif |
47 | | -#endif |
48 | | - |
49 | | -// This requirement is mainly to reduce the support burden (see PR #4570). |
50 | | -static_assert(PY_VERSION_HEX < 0x030C0000 || PYBIND11_INTERNALS_VERSION >= 5, |
51 | | - "pybind11 ABI version 5 is the minimum for Python 3.12+"); |
52 | | - |
53 | 26 | PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE) |
54 | 27 |
|
55 | 28 | using ExceptionTranslator = void (*)(std::exception_ptr); |
|
0 commit comments