-
Notifications
You must be signed in to change notification settings - Fork 784
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 PyModuleMethods
#3703
Conversation
CodSpeed Performance ReportMerging #3703 will not alter performanceComparing Summary
|
I might be able to drive up coverage by adding more tests & also following the same strategy of |
Well, I started down the road of adding the new module constructors, and deprecating the existing ones. It creates a lot of documentation churn to deal with the deprecation warnings, which is pretty painful to deal with. In the spirit of #3681 (comment), I'm now wondering if we should slow things down even more and start purely by introducing the Once we have a complete implementation released in 0.21 we can start thinking for what the best way to start encouraging users to migrate should be. This also gives more time for |
If we agree that not deprecating anything for now might be better, I'll also open a PR to undo the deprecations already merged. |
FWIW, from a user perspective, I'd find the warnings valuable. Basically every use of the old APIs is a performance opportunity, so having those clearly marked is helpful. |
I do agree with that too, and adding these warnings was helping me find all the locations internally in PyO3 where these are used. I suppose we are happy with documentation being updated to encourage users to use the new APIs? It's more churn in our code here, but maybe we just accept that it's going to be period of a lot of churn in PyO3 and we just have to look forward to the "great reckoning release". That said, introducing and deprecating the module constructors here produced a lot of busywork so I definitely don't want to do the deprecations as part of this diff. |
Sorry for distributing the discussion over multiple places. (Maybe we should use #3882?) See also #3681 (comment) with the TL;DR that I think shipping without deprecations by default would be nicer. Downstream projects who want to commit to a complete migration can disable the |
Thanks as always for the review, pushed an updated form of the commit here. I'll still defer adding the constructors / feature-toggled deprecations in a follow up PR. Making these changes I also wondered whether we want to split the part which is for building new modules out into a |
939deef
to
da1e20f
Compare
Split from #3606