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 optional GIL Ref in function argument #3975

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

davidhewitt
Copy link
Member

This PR adjusts the GIL Refs deprecation warning machinery so that Option<&T> emits deprecation warnings for GIL Refs in function arguments.

Initially in #3847 I wasn't going to bother, but it seems worth it given that Option<&T> is quite a common pattern and sort of has special support in PyO3 for other functionality like optional arguments.

Indeed, adding this warning caught a few final GIL Refs sneaking around in our codebase 👀

@davidhewitt davidhewitt added the CI-skip-changelog Skip checking changelog entry label Mar 20, 2024
@davidhewitt davidhewitt mentioned this pull request Mar 20, 2024
@davidhewitt davidhewitt added this pull request to the merge queue Mar 21, 2024
Merged via the queue into PyO3:main with commit 351c6a0 Mar 21, 2024
42 of 43 checks passed
@davidhewitt davidhewitt deleted the option-gil-ref-deprecation branch March 21, 2024 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-skip-changelog Skip checking changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants