Skip to content
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

[workspace] Bump pybind11 fork to latest commit (merge w/ upstream v2.11.1) #20362

Merged
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
10 changes: 0 additions & 10 deletions bindings/pydrake/common/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -161,16 +161,6 @@ drake_cc_library(
],
)

drake_cc_library(
name = "monostate_pybind",
hdrs = ["monostate_pybind.h"],
declare_installed_headers = False,
visibility = ["//visibility:public"],
deps = [
"@pybind11",
],
)

drake_cc_library(
name = "serialize_pybind",
hdrs = ["serialize_pybind.h"],
Expand Down
30 changes: 0 additions & 30 deletions bindings/pydrake/common/monostate_pybind.h

This file was deleted.

5 changes: 3 additions & 2 deletions bindings/pydrake/common/test/type_safe_index_pybind_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,16 @@ GTEST_TEST(TypeSafeIndexTest, CheckCasting) {
// TypeSafeIndex<> is not implicitly constructible from an int.
// TODO(eric.cousineau): Consider relaxing this to *only* accept `int`s, and
// puke if another `TypeSafeIndex<U>` is encountered.
ASSERT_THROW(py::eval("pass_thru_index(10)"), std::runtime_error);
ASSERT_THROW(py::eval("pass_thru_index(10)"), py::error_already_set);
CheckValue("pass_thru_index(Index(10))", 10);
CheckValue("pass_thru_index(Index(10))", Index{10});

struct OtherTag {};
using OtherIndex = TypeSafeIndex<OtherTag>;
BindTypeSafeIndex<OtherIndex>(m, "OtherIndex");

ASSERT_THROW(py::eval("pass_thru_index(OtherIndex(10))"), std::runtime_error);
ASSERT_THROW(
py::eval("pass_thru_index(OtherIndex(10))"), py::error_already_set);
py::object py_index = py::eval("Index(10)");
ASSERT_THROW(py_index.cast<OtherIndex>(), std::runtime_error);

Expand Down
1 change: 0 additions & 1 deletion bindings/pydrake/geometry/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ drake_pybind_library(
"//bindings/pydrake/common:default_scalars_pybind",
"//bindings/pydrake/common:deprecation_pybind",
"//bindings/pydrake/common:identifier_pybind",
"//bindings/pydrake/common:monostate_pybind",
"//bindings/pydrake/common:serialize_pybind",
"//bindings/pydrake/common:sorted_pair_pybind",
"//bindings/pydrake/common:type_pack",
Expand Down
1 change: 0 additions & 1 deletion bindings/pydrake/geometry/geometry_py_scene_graph.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
pydrake.geometry module. */

#include "drake/bindings/pydrake/common/default_scalars_pybind.h"
#include "drake/bindings/pydrake/common/monostate_pybind.h"
#include "drake/bindings/pydrake/common/type_pack.h"
#include "drake/bindings/pydrake/common/value_pybind.h"
#include "drake/bindings/pydrake/documentation_pybind.h"
Expand Down
1 change: 0 additions & 1 deletion bindings/pydrake/multibody/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ drake_pybind_library(
"//bindings/pydrake:documentation_pybind",
"//bindings/pydrake/common:cpp_template_pybind",
"//bindings/pydrake/common:default_scalars_pybind",
"//bindings/pydrake/common:monostate_pybind",
"//bindings/pydrake/common:serialize_pybind",
"//bindings/pydrake/common:type_pack",
],
Expand Down
1 change: 0 additions & 1 deletion bindings/pydrake/multibody/meshcat_py.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "drake/bindings/pydrake/common/cpp_template_pybind.h"
#include "drake/bindings/pydrake/common/default_scalars_pybind.h"
#include "drake/bindings/pydrake/common/monostate_pybind.h"
#include "drake/bindings/pydrake/common/serialize_pybind.h"
#include "drake/bindings/pydrake/common/type_pack.h"
#include "drake/bindings/pydrake/documentation_pybind.h"
Expand Down
4 changes: 4 additions & 0 deletions tools/workspace/pybind11/package.BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ _HDRS = [
"include/pybind11/detail/type_caster_base.h",
"include/pybind11/detail/typeid.h",
"include/pybind11/eigen.h",
"include/pybind11/eigen/common.h",
"include/pybind11/eigen/matrix.h",
"include/pybind11/eigen/tensor.h",
"include/pybind11/embed.h",
"include/pybind11/eval.h",
"include/pybind11/functional.h",
Expand All @@ -40,6 +43,7 @@ _HDRS = [
"include/pybind11/stl.h",
"include/pybind11/stl/filesystem.h",
"include/pybind11/stl_bind.h",
"include/pybind11/type_caster_pyobject_ptr.h",
]

check_lists_consistency(
Expand Down
4 changes: 2 additions & 2 deletions tools/workspace/pybind11/pybind11-config-version.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
set(PACKAGE_VERSION "2.9.0.dev1")
set(PACKAGE_COMPAT_VERSION "2.9.0.dev1")
set(PACKAGE_VERSION "2.11.1")
set(PACKAGE_COMPAT_VERSION "2.11.1")

if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE)
Expand Down
2 changes: 1 addition & 1 deletion tools/workspace/pybind11/pybind11-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ unset(_targetsDefined)
unset(_targetsNotDefined)
unset(_expectedTargets)

set(pybind11_VERSION "2.9.0.dev1")
set(pybind11_VERSION "2.11.1")

add_library(pybind11::embed INTERFACE IMPORTED)
set_target_properties(pybind11::embed PROPERTIES
Expand Down
4 changes: 2 additions & 2 deletions tools/workspace/pybind11/repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ _REPOSITORY = "RobotLocomotion/pybind11"
# https://github.com/RobotLocomotion/pybind11/blob/drake/include/pybind11/detail/common.h
# and if it has changed, then update the version number in the two
# pybind11-*.cmake files in the current directory to match.
_COMMIT = "36695db542e1c34f6db7ca3ebb0415de30762395"
_COMMIT = "c1b0cddf0af5dbca6030fe51fcba25c386bf46a6"

_SHA256 = "36b35032ae6279af6257588856b0284b8106221c816b26509a05801c54d60e30"
_SHA256 = "b98c9ec522a89fabef86b23d6ea530a2291eafd518f6a7a8a18b0f58b7e3515e"

def pybind11_repository(
name,
Expand Down