From 50dfc255b85b33d1ada64a887e1fa7d6eed0ca12 Mon Sep 17 00:00:00 2001 From: Yuval Tassa Date: Sun, 15 Mar 2026 12:45:44 -0700 Subject: [PATCH] Fix pybind11 v3.0 compatibility in callbacks.cc PiperOrigin-RevId: 884074529 Change-Id: I20e7a8d6f6069895afbc3e18d0612f3b2edfaeb7 --- python/mujoco/callbacks.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/mujoco/callbacks.cc b/python/mujoco/callbacks.cc index c6a99351..ea565127 100644 --- a/python/mujoco/callbacks.cc +++ b/python/mujoco/callbacks.cc @@ -91,8 +91,7 @@ static enable_if_not_const_t MjWrapperLookup(Raw* ptr) { // TODO(stunya): Figure out a way to do this without invoking py::detail. { py::gil_scoped_acquire gil; - const auto [src, type] = - py::detail::type_caster_base>::src_and_type(wrapper); + auto* type = py::detail::get_type_info(typeid(MjWrapper)); if (type) { py::object instance = py::reinterpret_steal( py::detail::find_registered_python_instance(wrapper, type));