Revert "Merge pull request #3578 from davidhewitt/typed-helpers"#3794
Merged
davidhewitt merged 1 commit intoPyO3:mainfrom Feb 3, 2024
Merged
Revert "Merge pull request #3578 from davidhewitt/typed-helpers"#3794davidhewitt merged 1 commit intoPyO3:mainfrom
davidhewitt merged 1 commit intoPyO3:mainfrom
Conversation
Member
Author
|
cc @messense / @adamreichold as you were original reviewers here. As this code never made it into a release, I'm going to just proceed to merge this revert immediately to make the job cleaner for @snuderl in #3793 |
63 tasks
CodSpeed Performance ReportMerging #3794 will degrade performances by 13.51%Comparing Summary
Benchmarks breakdown
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This reverts #3578, setting the return type of
py.None(),py.NotImplemented(), andpy.Ellipsis()back toPyObjectinstead of GIL Ref to their typed singletons.I still believe that returning better typed values would be a good thing, but now with the migration to the GIL Refs API also landing in 0.21 I think that the extra churn caused by this change is not helpful right at this minute. In particular because this patch changed
py.None()to return&PyNone, which is a GIL Ref API, introducing that change right now feels in contradiction with the general theme of the 0.21 release.I propose to revert this change for now and land it in a few releases time as
Borrowed<PyNone>etc as the future return types, when the rest of the dust has settled a bit.