Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup several aspects of the Python bindings #1693

Conversation

matthewdcong
Copy link
Contributor

This MR cleans up several aspects of the pybind11 Python bindings. It's intended to have no change in outward user-facing functionality, but provides future-proofing for the bindings as pybind11 evolves.

  1. The redundant explicit bindings for the Math types have been removed. These are not used (and should not be exposed) since we have typecasters implemented for the functionality which take precedence.
  2. Implemented type casters for TypedMetadata. This means that Vec3SMetadata values in the MetaMap will call the Vec3SMetadata type caster which will subsequently call the Vec3f typecaster resulting in re-usable functionality. This also enables us to pass TypedMetadata values between C++ and Python more explicitly.
  3. Removed Python 2 support
  4. Switched from obj.cast<T>() to the equivalent but preferred py::cast<T>(obj).

@matthewdcong matthewdcong requested a review from kmuseth as a code owner October 24, 2023 23:22
@linux-foundation-easycla
Copy link

CLA Not Signed

Copy link
Contributor

@kmuseth kmuseth left a comment

Choose a reason for hiding this comment

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

looks good to me

@kmuseth kmuseth enabled auto-merge (squash) October 27, 2023 23:00
auto-merge was automatically disabled October 28, 2023 06:03

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants