Skip to content

Replace deprecated PYBIND11_OVERLOAD* by PYBIND11_OVERRIDE*#618

Open
alxbilger wants to merge 1 commit into
sofa-framework:masterfrom
alxbilger:deprecatedoverload
Open

Replace deprecated PYBIND11_OVERLOAD* by PYBIND11_OVERRIDE*#618
alxbilger wants to merge 1 commit into
sofa-framework:masterfrom
alxbilger:deprecatedoverload

Conversation

@alxbilger

Copy link
Copy Markdown
Contributor

@fredroy fredroy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is effectively increase the minimum required version of pybind for SofaPython3 to 2.6 (https://pybind11.readthedocs.io/en/stable/changelog.html#v2-6-0-oct-21-2020), as pybind11 introduced this PYBIND11_OVERRIDE macro in this version ; whereas in the cmakefile of SofaPython3 :

find_package(pybind11 2.3 CONFIG QUIET REQUIRED)

I am not necessarily against the change (v2.6 is 6 years old now...), but it has to be noticed

@alxbilger

Copy link
Copy Markdown
Contributor Author

You're right. I did not think about looking at the minimum required version.

The macros PYBIND11_OVERLOAD* are still present in the current master branch of pybind11 (https://github.com/pybind/pybind11/blob/ff1a35cb849247dd14d5c6c9aefae45a7ab6f695/include/pybind11/pybind11.h#L4043), so we can continue to use it. However, the doc does not mention it at all. Of course, it has been replaced by the new macro. That's why I changed it in our code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants