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

pyfunction: fix from_py_with on Option<T> argument #2592

Merged
merged 1 commit into from
Aug 26, 2022

Conversation

davidhewitt
Copy link
Member

This fixes #2280 by making it do the "obvious" thing - an argument #[pyo3(from_py_with = "foo")] x: Option<i32> requires foo to be a function with returns PyResult<Option<i32>>. Turns out there was just a slight typo in the macro-generated code.

@davidhewitt davidhewitt merged commit 73c8532 into PyO3:main Aug 26, 2022
@davidhewitt davidhewitt deleted the issue-2280 branch August 26, 2022 19:25
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.

from_py_with doesn't seem to play nicely with optional arguments
2 participants