-
Notifications
You must be signed in to change notification settings - Fork 779
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
Implement new API for PyNone #3684 #3793
Conversation
f268660
to
5e9d97d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for joining in with our implementation of the new API! I've been wondering a bit about what to do with PyNone
(and similar for PyNotImplemented
and PyEllipsis
, though we can save them for a future PR). I've written some comments below which might be a sensible way for us to migrate PyNone
while taking care not to break users too much. What do you think of those suggestions?
Hey @davidhewitt . You managed to pick this up before I even had a chance to pull up the full PR :) I first wanted to just see the CI run and see what is red. I totally agree about the breaking changes and will add new methods instead. |
No problem, I could see you were still working on it, I just hoped that you might be spared some of the CI pain if I put some ideas down regarding the breaking bits! |
CodSpeed Performance ReportMerging #3793 will degrade performances by 19.44%Comparing Summary
Benchmarks breakdown
|
Well not breaking any public api's indeed does end up being much simpler :) This is probably everything assuming we will wait with migrating the public api for a future version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, this looks good to me! Yes, in particular PyNone::get()
is probably used a lot less than py.None()
, so staying away from changing py.None()
seems like a very good idea for now 😂
Would you be interested in doing similar PRs for PyNotImplemented
and PyEllipsis
? Those singletons work in exactly the same way as PyNone
.
Add
get_bound
method toPyNone
and deprecate existing one.