-
Resolve pybind11 deprecation warning. · e01527cd
Observed while locally testing https://github.com/pybind/pybind11_abseil/pull/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
Ralf W. Grosse-Kunstleve committed
| Name |
Last commit
|
Last Update |
|---|---|---|
| .github | Loading commit data... | |
| pybind11_abseil | Loading commit data... | |
| scripts | Loading commit data... | |
| LICENSE | Loading commit data... | |
| README.md | Loading commit data... | |
| WORKSPACE | Loading commit data... | |
| requirements.txt | Loading commit data... |