Skip to content

Commit 1c5bc85

Browse files
committed
Conditional version bump for Python 3.12+
1 parent 12ef776 commit 1c5bc85

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

include/pybind11/detail/internals.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,12 @@
3434
/// further ABI-incompatible changes may be made before the ABI is officially
3535
/// changed to the new version.
3636
#ifndef PYBIND11_INTERNALS_VERSION
37-
# define PYBIND11_INTERNALS_VERSION 4
37+
# if PY_VERSION_HEX >= 0x030C0000
38+
// Version bump for Python 3.12+, before first 3.12 beta release.
39+
# define PYBIND11_INTERNALS_VERSION 5
40+
# else
41+
# define PYBIND11_INTERNALS_VERSION 4
42+
# endif
3843
#endif
3944

4045
PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)

0 commit comments

Comments
 (0)