How to formally deprecate a pip package
This might seem a little strange, but I can't really find an acceptable way of doing this after having googled around for quite some time.
Basically I have a pip package that I maintain. It's mostly a wrapper for an external API, and the external API just changed. I sent out a new version of the wrapper, but presumably not everyone keeps their pip packages completely up to date. I made an effort to keep most legacy functionality around, but there were a few features I was unable to preserve.
Is there any way to formally let people know that every package before a certain version has been formally deprecated? Ideally this would tell people to actively upgrade, but I'm not sure how feasible that is.
It seems like pip must have some functionality or best practices for this, but I can't really find any relevant documentation.
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 warnings warnings.warn("deprecated", DeprecationWarning)