add gil-refs
feature to aid migration
#3707
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As proposed in #3681 (comment), this PR adds a feature which in 0.21 will disable deprecation warnings related to the to-be-removed GIL Refs API.
@adamreichold: we were using the name
pool
in that discussion, however I felt I likedgil-refs
slightly more as the users don't typically interact with the GILPool, however the GIL Refs as a concept are very user-facing. If you have a strong preference for the feature to be calledpool
I can rename to that.In PyO3 0.22 we can make this migration stricter by gating the GIL Refs API behind this feature, and emitting deprecation warnings even when this feature is enabled.
Finally in 0.23 or 0.24 we remove this feature and the accompanying APIs.
I have also pushed an accompanying second commit which is an updated copy of #3693 to begin the migration guide entry for this feature.