Add helpers for deprecating modules.

Review Request #13014 — Created May 4, 2023 and submitted — Latest diff uploaded

Information

housekeeping
master

Reviewers

This introduces two new functions for deprecating modules:
module_deprecated() and module_moved().

module_deprecated() can be called in the body of a module to emit a
deprecation warning when the module is imported.

module_moved() is similar, but takes a destination module, and points
consumers to that module in the deprecation message.

Unit tests pass on all supported versions of Python.

Diff Revision 2 (Latest)

orig
1
2

Commits

First Last Summary ID Author
Add helpers for deprecating modules.
This introduces two new functions for deprecating modules: `module_deprecated()` and `module_moved()`. `module_deprecated()` can be called in the body of a module to emit a deprecation warning when the module is imported. `module_moved()` is similar, but takes a destination module, and points consumers to that module in the deprecation message.
37c3603b44686de183e4cb1356375c4adf762940 Christian Hammond
README.md
housekeeping/__init__.py
housekeeping/modules.py
housekeeping/tests/test_modules.py
Loading...