diff --git a/.github/workflows/linux_riscv.yml b/.github/workflows/linux_riscv.yml index d764c1f96c1645..eab5e4ffed1555 100644 --- a/.github/workflows/linux_riscv.yml +++ b/.github/workflows/linux_riscv.yml @@ -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 \ diff --git a/conan.lock b/conan.lock index 19142643d16ad3..5c01cfd1d37096 100644 --- a/conan.lock +++ b/conan.lock @@ -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", @@ -31,5 +31,6 @@ "automake/1.16.5#058bda3e21c36c9aa8425daf3c1faf50%1688481772.751", "autoconf/2.71#53be95d228b2dcb30dc199cb84262d8f%1693395343.513" ], - "python_requires": [] + "python_requires": [], + "config_requires": [] } \ No newline at end of file diff --git a/conanfile.txt b/conanfile.txt index 5d9920874a629b..7cbc98e354dc20 100644 --- a/conanfile.txt +++ b/conanfile.txt @@ -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] diff --git a/src/bindings/python/CMakeLists.txt b/src/bindings/python/CMakeLists.txt index 83e03d4390f6f0..57a26e5c08c844 100644 --- a/src/bindings/python/CMakeLists.txt +++ b/src/bindings/python/CMakeLists.txt @@ -201,6 +201,9 @@ 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() find_package(Python3 REQUIRED COMPONENTS Interpreter ${python3_development_component}) find_package(pybind11 ${pybind11_min_version} QUIET) diff --git a/src/bindings/python/src/pyopenvino/frontend/manager.cpp b/src/bindings/python/src/pyopenvino/frontend/manager.cpp index 70a39aa9ce77b3..f197d6946f8cab 100644 --- a/src/bindings/python/src/pyopenvino/frontend/manager.cpp +++ b/src/bindings/python/src/pyopenvino/frontend/manager.cpp @@ -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 exc(std::move(m), "GeneralFailure"); py::register_exception_translator([](std::exception_ptr p) { @@ -158,3 +162,5 @@ void regclass_frontend_NotImplementedFailureFrontEnd(py::module m) { } }); } + +OPENVINO_SUPPRESS_DEPRECATED_END diff --git a/src/bindings/python/thirdparty/pybind11 b/src/bindings/python/thirdparty/pybind11 index 2965fa8de3cf9e..3e9dfa28669416 160000 --- a/src/bindings/python/thirdparty/pybind11 +++ b/src/bindings/python/thirdparty/pybind11 @@ -1 +1 @@ -Subproject commit 2965fa8de3cf9e82c789f906a525a76197b186c1 +Subproject commit 3e9dfa2866941655c56877882565e7577de6fc7b diff --git a/tools/mo/unit_tests/mock_mo_frontend/mock_mo_python_api/CMakeLists.txt b/tools/mo/unit_tests/mock_mo_frontend/mock_mo_python_api/CMakeLists.txt index 75b793f045e7ac..463c6c8ab19e12 100644 --- a/tools/mo/unit_tests/mock_mo_frontend/mock_mo_python_api/CMakeLists.txt +++ b/tools/mo/unit_tests/mock_mo_frontend/mock_mo_python_api/CMakeLists.txt @@ -30,6 +30,9 @@ 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() find_package(pybind11 ${pybind11_min_version} QUIET)