Skip to content

[ThirdParty] Bump pybind11 version to v3.0.0 #74489

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake/external/pybind11.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ set(PYBIND_PATCH_COMMAND "")
if(LINUX
AND (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9)
set(PYBIND_TAG v2.13.6)
set(PYBIND_TAG v3.0.0)
file(TO_NATIVE_PATH
${PADDLE_SOURCE_DIR}/patches/pybind/detail/internals.h.patch native_dst)
# Note: [Why calling some `git` commands before `patch`?]
Expand Down
21 changes: 9 additions & 12 deletions patches/pybind/detail/internals.h.patch
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
diff --git a/include/pybind11/detail/internals.h b/include/pybind11/detail/internals.h
index 232bc32d..b6491c11 100644
index ad2ff74c..bc4731c6 100644
--- a/include/pybind11/detail/internals.h
+++ b/include/pybind11/detail/internals.h
@@ -203,11 +203,18 @@ struct internals {
PyTypeObject *static_property_type;
PyTypeObject *default_metaclass;
PyObject *instance_base;
@@ -120,7 +120,14 @@ public:
}

private:
+#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ <= 8
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wmissing-field-initializers"
+#endif
// Unused if PYBIND11_SIMPLE_GIL_MANAGEMENT is defined:
PYBIND11_TLS_KEY_INIT(tstate)
#if PYBIND11_INTERNALS_VERSION > 4
PYBIND11_TLS_KEY_INIT(loader_life_support_tls_key)
#endif // PYBIND11_INTERNALS_VERSION > 4
PYBIND11_TLS_KEY_INIT(mutable key_)
+#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ <= 8
+# pragma GCC diagnostic pop
+#endif
// Unused if PYBIND11_SIMPLE_GIL_MANAGEMENT is defined:
PyInterpreterState *istate = nullptr;
};

PYBIND11_NAMESPACE_BEGIN(detail)
2 changes: 1 addition & 1 deletion third_party/pybind
Submodule pybind updated 252 files
Loading