Skip to content

Commit 30d3aa5

Browse files
committed
Importing pybind11 smart_holder PR #2910 from GitHub.
pybind/pybind11#2910 Also importing a few other changes from smart_holder branch, to bring third_party/pybind11 in sync with HEAD. Two tests under third_party/clif have to be adjusted in connection with PR #2910. The TGP test is for an intermediate snapshot of this CL, but it is highly unlikely that the changes made after that snapshot have any impact outside third_party/pybind11 or third_party/clif. Manual retesting succeeds: ``` blaze test third_party/pybind11/... third_party/pybind11_abseil/... third_party/pybind11_protobuf/... third_party/clif/... ``` http://sponge2/c54daa2b-9216-4898-82ae-9d5ac6c8ff26 When testing with ASAN all test pass, except one breakage unrelated to this CL: http://sponge2/03bd6edc-7b01-4b32-939d-fc760d81eaa0 The ASAN breakage was introduced with cl/363927286 and is being worked on separately. - 784092dfd29d861af6fa611c6920c172389d97c4 Missing cast from const unique_ptr& (#2904) by Robert Haschke <[email protected]> - 2ada792085777d9cc8b4006b60476f4a103b6870 Pure clang-format cleanup (after #2904), NO other changes. by Ralf W. Grosse-Kunstleve <[email protected]> - 245d31cb0369fa51d94641853bb7beb6ed144b4f Renaming PYBIND11_SMART_POINTER_HOLDER_TYPE_CASTERS to PY... by Ralf W. Grosse-Kunstleve <[email protected]> - 62a8d35831525d5dcc4f6a53717d36a11c143f2a Fixing oversight: clang-format pybind11.h (affecting smar... by Ralf W. Grosse-Kunstleve <[email protected]> - 3f35af74410dcace27b6cf9e8203934e13a32249 Adding smart_holder branch to workflow_dispatch in all pl... by Ralf W. Grosse-Kunstleve <[email protected]> - 5319ca3817c77bb1fae233086ceeb71ec142c36f Using `dynamic_cast<AliasType>` to determine `pointee_dep... by Ralf W. Grosse-Kunstleve <[email protected]> PiperOrigin-RevId: 363957176
1 parent 25c08fa commit 30d3aa5

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

clif/pybind11/staging/smart_ptrs_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,9 @@ def testSmartPtrs(self):
7575
smart_ptrs.PerformUP(add)
7676
self.assertEqual(
7777
str(ctx.exception),
78-
'Ownership of instance with virtual overrides in Python cannot be'
79-
' transferred to C++.')
78+
'Alias class (also known as trampoline) does not inherit from'
79+
' py::virtual_overrider_self_life_support, therefore the'
80+
' ownership of this instance cannot safely be transferred to C++.')
8081

8182
add = Add(1230, 4)
8283
self.assertEqual(smart_ptrs.PerformSP(add), 1234)

clif/testing/python/smart_ptrs_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,9 @@ def testSmartPtrs(self, wrapper_lib):
116116
wrapper_lib.PerformUP(add)
117117
self.assertEqual(
118118
str(ctx.exception),
119-
'Ownership of instance with virtual overrides in Python cannot be'
120-
' transferred to C++.')
119+
'Alias class (also known as trampoline) does not inherit from'
120+
' py::virtual_overrider_self_life_support, therefore the'
121+
' ownership of this instance cannot safely be transferred to C++.')
121122

122123
add = AddParameterized(wrapper_lib)(1230, 4)
123124
# This works with the C-API code generator only because the reference count

0 commit comments

Comments
 (0)