Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve pybind11 deprecation warning.
Observed while locally testing #7: ``` In file included from /usr/local/google/home/rwgk/forked/pybind11_abseil/pybind11_abseil/tests/absl_example.cc:23: /usr/local/google/home/rwgk/forked/pybind11_abseil/pybind11_abseil/absl_casters.h: In member function ‘bool pybind11::detail::type_caster<absl::lts_20211102::Duration>::load(pybind11::handle, bool)’: /usr/local/google/home/rwgk/forked/pybind11_abseil/pybind11_abseil/absl_casters.h:194:48: warning: ‘bool pybind11::handle::operator==(const pybind11::handle&) const’ is deprecated: Use obj1.is(obj2) instead [-Wdeprecated-declarations] 194 | if (src == object(py_duration_t.attr("max"))) { | ^ In file included from /usr/local/google/home/rwgk/forked/pybind11_abseil/tmp_build/_deps/pybind11-src/include/pybind11/detail/type_caster_base.h:12, from /usr/local/google/home/rwgk/forked/pybind11_abseil/tmp_build/_deps/pybind11-src/include/pybind11/cast.h:15, from /usr/local/google/home/rwgk/forked/pybind11_abseil/tmp_build/_deps/pybind11-src/include/pybind11/attr.h:14, from /usr/local/google/home/rwgk/forked/pybind11_abseil/tmp_build/_deps/pybind11-src/include/pybind11/detail/class.h:1, from /usr/local/google/home/rwgk/forked/pybind11_abseil/tmp_build/_deps/pybind11-src/include/pybind11/pybind11.h:13, from /usr/local/google/home/rwgk/forked/pybind11_abseil/tmp_build/_deps/pybind11-src/include/pybind11/complex.h:12, from /usr/local/google/home/rwgk/forked/pybind11_abseil/pybind11_abseil/tests/absl_example.cc:6: /usr/local/google/home/rwgk/forked/pybind11_abseil/tmp_build/_deps/pybind11-src/include/pybind11/pytypes.h:290:10: note: declared here 290 | bool operator==(const handle &h) const { return m_ptr == h.m_ptr; } | ^~~~~~~~ ``` PiperOrigin-RevId: 555974032
- Loading branch information