How to formally deprecate a pip package How to formally deprecate a pip package python python

How to formally deprecate a pip package


Add the following code to __init__.py of the module if you want it to give the warnings when you import it in other places.

import warningswarnings.warn("deprecated", DeprecationWarning)

From: https://docs.python.org/2/library/warnings.html#temporarily-suppressing-warnings