Revert "Merge pull request #3578 from davidhewitt/typed-helpers" #3794
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 toPyObject
instead 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.