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

deprecate required argument after Option<T> without signature #2703

Merged
merged 1 commit into from
Jan 15, 2023

Conversation

davidhewitt
Copy link
Member

@davidhewitt davidhewitt commented Oct 22, 2022

This PR is a follow-up to #2702 to make required arguments after Option<T> arguments require a #[pyo3(signature)] annotation to remove the possible ambiguity on whether the developer actually wanted to have a required option (which is what PyO3 is currently forced to assume).

@davidhewitt
Copy link
Member Author

This is now rebased; I would be glad to hear folks' opinions on whether this makes sense to include in 0.18.

Overall I like what this does for removing ambiguity, which fits Rust's conventions well, however it may generate a lot of churn for users (see all the adjustments I made to our tests).

@davidhewitt
Copy link
Member Author

If there's no strong opinions either way, I'll merge this later in the week ahead of preparing the 0.18 branch.

@davidhewitt
Copy link
Member Author

bors r+

@bors
Copy link
Contributor

bors bot commented Jan 15, 2023

Build succeeded:

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.

1 participant