Fix build with pybind11 3.x (Fedora rawhide / fedora > 44) pybind11 3.x added a static_assert that forbids py::call_guard<> on the def_property / def_property_readonly family: error: static assertion failed: def_property family does not currently support call_guard. Use a py::cpp_function instead. Convert the two affected read-only properties to wrap their getter in a py::cpp_function that releases the GIL internally, preserving the original "GIL is released while running this function" behaviour. Regular cls.def() calls keep using py::call_guard<> and are intentionally left unchanged. --- a/src/bindings/python/src/pyopenvino/core/core.cpp +++ b/src/bindings/python/src/pyopenvino/core/core.cpp @@ -769,8 +769,10 @@ void regclass_Core(py::module m) { )"); cls.def_property_readonly("available_devices", - &ov::Core::get_available_devices, - py::call_guard(), + py::cpp_function([](ov::Core& self) { + py::gil_scoped_release release; + return self.get_available_devices(); + }), R"( Returns devices available for inference Core objects goes over all registered plugins. --- a/src/bindings/python/src/pyopenvino/core/infer_request.cpp +++ b/src/bindings/python/src/pyopenvino/core/infer_request.cpp @@ -819,10 +819,10 @@ void regclass_InferRequest(py::module m) { cls.def_property_readonly( "profiling_info", - [](InferRequestWrapper& self) { + py::cpp_function([](InferRequestWrapper& self) { + py::gil_scoped_release release; return self.m_request.get_profiling_info(); - }, - py::call_guard(), + }), R"( Performance is measured per layer to get feedback on the most time-consuming operation. Not all plugins provide meaningful data!