gh-97850: Deprecate `find_module` and `get_module` in `pkgutil`
Refs https://github.com/python/cpython/issues/64138
- Issue: gh-97850
Thank you for the reviews: @merwok and @CAM-Gerlach
It is much better now. I was not aware of ._deprecated helper.
I've also checked that get_loader does not get 2 warnings (because it is using find_loader inside):
>>> import pkgutil
>>> pkgutil.get_loader('os')
<stdin>:1: DeprecationWarning: 'pkgutil.get_loader' is deprecated and slated for removal in Python 3.14; use importlib.util.find_spec instead
<_frozen_importlib_external.SourceFileLoader object at 0x1012d55f0>
>>>
test_pkgutil tests are also clean, no unwanted warnings. I will look through all logs again when it is completed.
I've also merged one of the @CAM-Gerlach's suggestion, so you get a credit for your awesome proposals! 🤝
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.
Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.
I've also merged one of the @CAM-Gerlach's suggestion, so you get a credit for your awesome proposals! handshake
Just FYI, you can apply some or all of them at once by going to the Files changed tab, clicking Add to batch on each suggestion and then clicking `Commit (with an appropriate message).
@brettcannon I forgot to send the magic phrase!
I have made the requested changes; please review again
Thanks for making the requested changes!
@brettcannon: please review the changes made to this pull request.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.
Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.
I have made the requested changes; please review again 🙂
Thanks for making the requested changes!
@brettcannon: please review the changes made to this pull request.
Oups, just found out that my push with pkgutil.rst change did not make it into this branch :(
Redid it now, it worked!
@sobolevn the changes look good, but now there are unfortunately merge conflicts.
Done :)
Thanks!
Thank you for this additional cleanup!