Closed scpeters closed 5 months ago
Fixes a compiler warning on garden.
Original PR description:
Version 2.12 of pybind11 was recently merged to homebrew-core:
This release includes https://github.com/pybind/pybind11/pull/4772, which causes a compiler warning in sdformat:
python/src/sdf/_gz_sdformat_pybind11.cc:153:25: warning: 'operator()' is deprecated: Please use py::set_error() instead (https://github.com/pybind/pybind11/pull/4772) [-Wdeprecated-declarations] sdfErrorsException(e.what()); ^ /usr/local/include/pybind11/pybind11.h:2623:5: note: 'operator()' has been explicitly marked deprecated here PYBIND11_DEPRECATED("Please use py::set_error() instead " ^ /usr/local/include/pybind11/detail/common.h:202:43: note: expanded from macro 'PYBIND11_DEPRECATED' # define PYBIND11_DEPRECATED(reason) [[deprecated(reason)]] ^ 1 warning generated.
This adds a version check and a fix for newer versions of pybind11.
codecheck
Note to maintainers: Remember to use Rebase-and-Merge.
Backport #1389 to garden
Fixes a compiler warning on garden.
Original PR description:
Fix warning with pybind11 2.12
Summary
Version 2.12 of pybind11 was recently merged to homebrew-core:
This release includes https://github.com/pybind/pybind11/pull/4772, which causes a compiler warning in sdformat:
This adds a version check and a fix for newer versions of pybind11.
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Rebase-and-Merge.