I have renamed a python class that is part of a library. I am willing to leave a possibility to use its previous name for some time but would like to warn user that it\'s de
Please have a look at warnings.warn.
As you'll see, the example in the documentation is a deprecation warning:
def deprecation(message): warnings.warn(message, DeprecationWarning, stacklevel=2)