From a91c571942baf303ac8cbd2cc2676252bed7d4bc Mon Sep 17 00:00:00 2001 From: Dustin Ingram Date: Sun, 8 Jul 2018 13:26:08 -0500 Subject: Deprecate upload and register commands --- setuptools/command/upload.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'setuptools/command/upload.py') 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 = ( -- cgit v1.2.1