◐ Shell
clean mode source ↗

bpo-29576: Improve some deprecations in the importlib by Carreau · Pull Request #32 · python/cpython

fgregg

brettcannon

Add the python version since the functionality is deprecated,
and raise a couple of deprecation warnings in a few places.

Theses functions are marked as deprecated in the documentation, but
especially in existing codebase, programmers tends to not re-check
whether functions are deprecated. So trigger the warning when possible.

It's also more probable that a developer will drop deprecated
functionality if we immediately give them information about
replacement API, and not have them to go find it in the documentation.

Include deprecation information in DocString as well as many tools pull
documentation from there and not from docs.python.org.

Add test making sure `find_loader()` and `find_module()` Both emit a
deprecation warning.

brettcannon

@Carreau Carreau changed the title Improve some deprecations in the importlib bpo-29576: Improve some deprecations in the importlib

Feb 16, 2017

@Carreau

jaraco pushed a commit that referenced this pull request

Dec 2, 2022

jaraco pushed a commit to jaraco/cpython that referenced this pull request

Feb 17, 2023

This was referenced

Feb 11, 2025

@Qanux Qanux mentioned this pull request

Feb 11, 2026