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

#[derive(FromPyObject)]: clean up generated code #2414

Merged
merged 3 commits into from Jun 2, 2022

Conversation

davidhewitt
Copy link
Member

Composed of two commits to apply some polish to #[derive(FromPyObject)]:

  • Resolve a case where the macro would raise ValueError without a message for tuple structs when receiving a tuple of invalid length.
  • Add a bunch of helpers to pyo3::impl_::frompyobject so that the generated code is smaller.

At the same time, this cleanup fixes #2397

davidhewitt added a commit to davidhewitt/pyo3 that referenced this pull request Jun 1, 2022
davidhewitt added a commit to davidhewitt/pyo3 that referenced this pull request Jun 2, 2022
@davidhewitt davidhewitt merged commit a388901 into PyO3:main Jun 2, 2022
@davidhewitt davidhewitt deleted the frompyobject-fixes branch June 2, 2022 08:33
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.

cannot find value py in this scope when deriving FromPyObject on struct
1 participant