Let's be more careful with planned removals

Notes on the imp module removal.

The imp removal was scheduled for a long time (the module was marked as deprecated and emitted a warning since Python 3.4), but it was blocked by pip (!): Remove more deprecated importlib APIs from Python 3.12. It also took many years to remove the imp usage in the Python code base. Obviously, last bits were only updated to importlib recently. The impact of imp removal (153 affected projects on PyPI top 5,000 projects) was known and taken in account in the decision. The imp removal was part of the larger change about the importlib module: Meta issue for cleaning up import system cruft.

There is now ongoing work to enhance the “update imp to importlib” documentation and helping affected projects:

2 Likes