diff options
author | Dustin Ingram <di@users.noreply.github.com> | 2018-07-08 13:26:08 -0500 |
---|---|---|
committer | Dustin Ingram <di@users.noreply.github.com> | 2018-07-08 19:53:58 -0500 |
commit | a91c571942baf303ac8cbd2cc2676252bed7d4bc (patch) | |
tree | 8e19db3e36048c6ef895593b6ab8f334a5fac09d /setuptools/command/upload.py | |
parent | 244ff322aec693a437f6a3f7bb6d147811712647 (diff) | |
download | python-setuptools-git-a91c571942baf303ac8cbd2cc2676252bed7d4bc.tar.gz |
Deprecate upload and register commands
Diffstat (limited to 'setuptools/command/upload.py')
-rw-r--r-- | setuptools/command/upload.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index a44173a9..72f24d8f 100644 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -1,4 +1,5 @@ import getpass +from distutils import log from distutils.command import upload as orig @@ -8,6 +9,16 @@ class upload(orig.upload): in a variety of different ways. """ + def run(self): + try: + orig.upload.run(self) + finally: + self.announce( + "WARNING: Uploading via this command is deprecated, use twine " + "to upload instead (https://pypi.org/p/twine/)", + log.WARN + ) + def finalize_options(self): orig.upload.finalize_options(self) self.username = ( |