Implement new API for PyNone #3684#3793
Conversation
f268660 to
5e9d97d
Compare
davidhewitt
left a comment
There was a problem hiding this comment.
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 |
davidhewitt
left a comment
There was a problem hiding this comment.
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_boundmethod toPyNoneand deprecate existing one.