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

adjust path for GIL Refs deprecation warnings #3968

Merged
merged 2 commits into from
Mar 19, 2024

Conversation

davidhewitt
Copy link
Member

I noticed that the UI tests are emitting warnings like

error: use of deprecated method `pyo3::methods::Extractor::<T>::extract_gil_ref`: use `&Bound<'_, T>` instead for this function argument

That pyo3::methods path bothered me as I want to deprecate that module (probably a 0.22 thing at this point). I thought we might be able to get something more meaningful, so I shuffled code around a little. Now we get:

error: use of deprecated method `pyo3::deprecations::GilRefs::<T>::extract_gil_ref`: use `&Bound<'_, T>` instead for this function argument

Do folks think this is any nicer? Think we can make the path even better for readers?

cc @Icxolu as this probably will have merge conflicts with code you're typing 😬

@davidhewitt davidhewitt added the CI-skip-changelog Skip checking changelog entry label Mar 18, 2024
@Icxolu
Copy link
Contributor

Icxolu commented Mar 18, 2024

In my opinion this does look nicer, and separating the construct used purely for deprecation warnings makes sense, so that we can easily find them when it's finally time to remove the, again.

@davidhewitt
Copy link
Member Author

Great! I'll rebase this once #3967 goes in and get this merged 👍

(Probably first thing in the morning now.)

@davidhewitt davidhewitt added this pull request to the merge queue Mar 19, 2024
Merged via the queue into PyO3:main with commit 02e188e Mar 19, 2024
40 of 42 checks passed
@davidhewitt davidhewitt deleted the gil-ref-warnings branch March 19, 2024 22:07
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.

3 participants