From 87a5a71a9a01b9ed9888df92d10531ae4c1de606 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sat, 26 Feb 2022 19:51:41 -0500 Subject: [PATCH 1/2] FIX: support python311 In 18b5dd68c6b616257ae243c0b6bb965ffc885a23 / python/cpython#31530 / https://bugs.python.org/issue46836 the _frame struct was moved to an internal header, however the public API is primarily read-only. --- include/pybind11/detail/common.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/pybind11/detail/common.h b/include/pybind11/detail/common.h index ea09bb3fdf..71cab8b275 100644 --- a/include/pybind11/detail/common.h +++ b/include/pybind11/detail/common.h @@ -213,6 +213,9 @@ # error "PYTHON < 3.6 IS UNSUPPORTED. pybind11 v2.9 was the last to support Python 2 and 3.5." #endif #include +#if PY_VERSION_HEX >= 0x030b00A5 +#include "internal/pycore_frame.h" +#endif #include /* Python #defines overrides on all sorts of core functions, which From 45fb02fdaa712d8a8486c6c09ee80e800649b352 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 27 Feb 2022 00:54:57 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- include/pybind11/detail/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pybind11/detail/common.h b/include/pybind11/detail/common.h index 71cab8b275..3846a13b2c 100644 --- a/include/pybind11/detail/common.h +++ b/include/pybind11/detail/common.h @@ -214,7 +214,7 @@ #endif #include #if PY_VERSION_HEX >= 0x030b00A5 -#include "internal/pycore_frame.h" +# include "internal/pycore_frame.h" #endif #include