Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

pyany: add PyAny::py() #1751

Merged
merged 1 commit into from
Aug 17, 2021
Merged

pyany: add PyAny::py() #1751

merged 1 commit into from
Aug 17, 2021

Conversation

davidhewitt
Copy link
Member

Adds PyAny::py() as a shortcut to get the Python GIL token without importing the PyNativeType trait.

I think this is a nice convenience as well as maybe being more discoverable for users (not many seem to know about the PyNativeType trait).

It'll probably make a few "unused import" warnings when users upgrade to a PyO3 containing this, so I wonder if it's nicer if this waits for 0.15?

@birkenfeld
Copy link
Member

+1 for 0.15.

@davidhewitt davidhewitt added this to the 0.15 milestone Aug 2, 2021
@davidhewitt
Copy link
Member Author

I've rebased this and begun merging other breaking changes for 0.15 now. Is anyone willing to review and approve / reject this?

@davidhewitt davidhewitt merged commit 37d39aa into PyO3:main Aug 17, 2021
@davidhewitt davidhewitt deleted the pyany-py branch August 17, 2021 13:10
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants