Skip to content

Commit

Permalink
Updated pybind11 to 2.12.0 (openvinotoolkit#24140)
Browse files Browse the repository at this point in the history
### Details:
 - Removed WA for cross-compilation case
- It's possible because fix pybind/pybind11#4856
is included to latest released version
  • Loading branch information
ilya-lavrenov authored and alvoron committed Apr 29, 2024
1 parent 8237b62 commit 8399396
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 5 deletions.
1 change: 0 additions & 1 deletion .github/workflows/linux_riscv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ jobs:
-DENABLE_PYTHON=ON \
-DENABLE_WHEEL=ON \
-DPYTHON_MODULE_EXTENSION=$(riscv64-linux-gnu-python3-config --extension-suffix) \
-DPYBIND11_PYTHON_EXECUTABLE_LAST=${OPENVINO_BUILD_DIR}/env/bin/python3.10 \
-DENABLE_TESTS=ON \
-DENABLE_PYTHON_PACKAGING=ON \
-DENABLE_SYSTEM_PROTOBUF=ON \
Expand Down
5 changes: 3 additions & 2 deletions conan.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"xbyak/6.73#250bc3bc73379f90f255876c1c00a4cd%1691853024.351",
"snappy/1.1.10#916523630083f6d855cb2977de8eefb6%1689780661.062",
"rapidjson/cci.20220822#8ca51918340f3a21127822258e95ec0f%1663194355.698",
"pybind11/2.10.4#dd44c80a5ed6a2ef11194380daae1248%1682692198.909",
"pybind11/2.12.0#1bf487c19d580200ba9b74afcc4174b4%1711607911.876",
"pugixml/1.13#f615c1fcec55122b2e177d17061276e7%1691917296.869",
"protobuf/3.21.12#d9f5f4e3b86552552dda4c0a2e928eeb%1685218275.69",
"opencl-icd-loader/2023.04.17#5f73dd9f0c023d416a7f162e320b9c77%1692732261.088",
Expand All @@ -31,5 +31,6 @@
"automake/1.16.5#058bda3e21c36c9aa8425daf3c1faf50%1688481772.751",
"autoconf/2.71#53be95d228b2dcb30dc199cb84262d8f%1693395343.513"
],
"python_requires": []
"python_requires": [],
"config_requires": []
}
2 changes: 1 addition & 1 deletion conanfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rapidjson/[>=1.1.0]
xbyak/[>=6.62]
snappy/[>=1.1.7]
onnx/1.15.0
pybind11/[>=2.10.1]
pybind11/[>=2.12.0]
flatbuffers/[>=22.9.24]

[tool_requires]
Expand Down
5 changes: 5 additions & 0 deletions src/bindings/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,11 @@ if(Python3_VERSION_MINOR GREATER_EQUAL 11)
else()
set(pybind11_min_version 2.8.0)
endif()
if(CMAKE_CROSSCOMPILING)
set(pybind11_min_version 2.12.0)
endif()
# search for FindPython3.cmake instead of legacy modules
set(PYBIND11_FINDPYTHON ON)

find_package(Python3 REQUIRED COMPONENTS Interpreter ${python3_development_component})
find_package(pybind11 ${pybind11_min_version} QUIET)
Expand Down
6 changes: 6 additions & 0 deletions src/bindings/python/src/pyopenvino/frontend/manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ void regclass_frontend_FrontEndManager(py::module m) {
});
}

OPENVINO_SUPPRESS_DEPRECATED_START

// CVS-139194: migrate to new exception handling https://github.com/pybind/pybind11/pull/4772

void regclass_frontend_GeneralFailureFrontEnd(py::module m) {
static py::exception<ov::frontend::GeneralFailure> exc(std::move(m), "GeneralFailure");
py::register_exception_translator([](std::exception_ptr p) {
Expand Down Expand Up @@ -158,3 +162,5 @@ void regclass_frontend_NotImplementedFailureFrontEnd(py::module m) {
}
});
}

OPENVINO_SUPPRESS_DEPRECATED_END
2 changes: 1 addition & 1 deletion src/bindings/python/thirdparty/pybind11
Submodule pybind11 updated 91 files
+1 −1 .github/CONTRIBUTING.md
+9 −1 .github/dependabot.yml
+111 −74 .github/workflows/ci.yml
+3 −3 .github/workflows/configure.yml
+4 −4 .github/workflows/format.yml
+1 −1 .github/workflows/labeler.yml
+8 −8 .github/workflows/pip.yml
+7 −7 .github/workflows/upstream.yml
+21 −19 .pre-commit-config.yaml
+19 −2 .readthedocs.yml
+57 −6 CMakeLists.txt
+5 −4 README.rst
+1 −1 docs/advanced/embedding.rst
+11 −11 docs/advanced/exceptions.rst
+1 −1 docs/advanced/functions.rst
+29 −0 docs/advanced/misc.rst
+1 −1 docs/benchmark.py
+182 −2 docs/changelog.rst
+12 −4 docs/compiling.rst
+86 −42 docs/release.rst
+28 −0 docs/upgrade.rst
+142 −9 include/pybind11/cast.h
+18 −13 include/pybind11/detail/class.h
+15 −3 include/pybind11/detail/common.h
+1 −1 include/pybind11/detail/init.h
+16 −5 include/pybind11/detail/internals.h
+51 −10 include/pybind11/detail/type_caster_base.h
+3 −2 include/pybind11/eigen/tensor.h
+2 −1 include/pybind11/functional.h
+9 −1 include/pybind11/gil.h
+91 −0 include/pybind11/gil_safe_call_once.h
+157 −22 include/pybind11/numpy.h
+121 −48 include/pybind11/pybind11.h
+22 −5 include/pybind11/pytypes.h
+8 −7 include/pybind11/stl.h
+28 −56 include/pybind11/stl_bind.h
+125 −0 include/pybind11/typing.h
+1 −1 noxfile.py
+1 −1 pybind11/_version.py
+3 −1 pybind11/setup_helpers.py
+8 −11 pyproject.toml
+9 −4 tests/CMakeLists.txt
+1 −0 tests/conftest.py
+2 −2 tests/cross_module_interleaved_error_already_set.cpp
+2 −0 tests/extra_python_package/test_files.py
+4 −4 tests/pybind11_cross_module_tests.cpp
+9 −3 tests/pybind11_tests.cpp
+14 −8 tests/requirements.txt
+7 −0 tests/test_buffers.py
+2 −2 tests/test_builtin_casters.py
+7 −0 tests/test_callbacks.py
+14 −0 tests/test_class.py
+1 −2 tests/test_cmake_build/CMakeLists.txt
+3 −3 tests/test_cmake_build/installed_embed/CMakeLists.txt
+3 −3 tests/test_cmake_build/installed_function/CMakeLists.txt
+3 −3 tests/test_cmake_build/installed_target/CMakeLists.txt
+9 −3 tests/test_cmake_build/subdirectory_embed/CMakeLists.txt
+9 −3 tests/test_cmake_build/subdirectory_function/CMakeLists.txt
+9 −3 tests/test_cmake_build/subdirectory_target/CMakeLists.txt
+4 −0 tests/test_constants_and_functions.cpp
+12 −0 tests/test_custom_type_casters.cpp
+17 −0 tests/test_eigen_matrix.cpp
+8 −1 tests/test_eigen_matrix.py
+6 −3 tests/test_enum.py
+54 −13 tests/test_exceptions.cpp
+1 −1 tests/test_exceptions.h
+21 −2 tests/test_exceptions.py
+2 −2 tests/test_factory_constructors.py
+46 −0 tests/test_kwargs_and_defaults.cpp
+37 −1 tests/test_kwargs_and_defaults.py
+19 −15 tests/test_methods_and_attributes.py
+9 −3 tests/test_numpy_array.py
+29 −4 tests/test_numpy_dtypes.cpp
+11 −3 tests/test_numpy_dtypes.py
+45 −0 tests/test_python_multiple_inheritance.cpp
+35 −0 tests/test_python_multiple_inheritance.py
+26 −3 tests/test_pytypes.cpp
+57 −1 tests/test_pytypes.py
+19 −0 tests/test_sequences_and_iterators.cpp
+13 −0 tests/test_sequences_and_iterators.py
+15 −12 tests/test_smart_ptr.cpp
+12 −12 tests/test_stl.py
+80 −0 tests/test_stl_binders.cpp
+44 −6 tests/test_stl_binders.py
+2 −2 tests/test_type_caster_pyobject_ptr.cpp
+24 −1 tools/FindPythonLibsNew.cmake
+29 −1 tools/make_changelog.py
+30 −16 tools/pybind11Common.cmake
+1 −1 tools/pybind11Config.cmake.in
+77 −22 tools/pybind11NewTools.cmake
+13 −7 tools/pybind11Tools.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ if(Python3_VERSION_MINOR GREATER_EQUAL 11)
else()
set(pybind11_min_version 2.8.0)
endif()
if(CMAKE_CROSSCOMPILING)
set(pybind11_min_version 2.12.0)
endif()
# search for FindPython3.cmake instead of legacy modules
set(PYBIND11_FINDPYTHON ON)

find_package(pybind11 ${pybind11_min_version} QUIET)

Expand Down

0 comments on commit 8399396

Please sign in to comment.