summaryrefslogtreecommitdiff
path: root/setuptools/command/register.py
diff options
context:
space:
mode:
authorPaul Ganssle <paul@ganssle.io>2019-10-31 11:25:57 -0400
committerPaul Ganssle <paul@ganssle.io>2019-11-02 15:10:29 -0400
commitf413f95e95b34b26d9ed9d9c43b3e4b3d30caecc (patch)
treeb064d6fa23466fcfd560cc513a661d6f5e38392e /setuptools/command/register.py
parent6ac7b4ee036ef8e6954198689d214e8ee9b29118 (diff)
downloadpython-setuptools-git-f413f95e95b34b26d9ed9d9c43b3e4b3d30caecc.tar.gz
Remove "upload" and "register" commands.
The upload and register commands were deprecated over a year ago, in July 2018 (PR GH-1410, discussed in issue GH-1381). It is time to actively remove them in favor of twine.
Diffstat (limited to 'setuptools/command/register.py')
-rw-r--r--setuptools/command/register.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/setuptools/command/register.py b/setuptools/command/register.py
index 98bc0156..b8266b9a 100644
--- a/setuptools/command/register.py
+++ b/setuptools/command/register.py
@@ -1,18 +1,18 @@
from distutils import log
import distutils.command.register as orig
+from setuptools.errors import RemovedCommandError
+
class register(orig.register):
- __doc__ = orig.register.__doc__
+ """Formerly used to register packages on PyPI."""
def run(self):
- try:
- # Make sure that we are using valid current name/version info
- self.run_command('egg_info')
- orig.register.run(self)
- finally:
- self.announce(
- "WARNING: Registering is deprecated, use twine to "
- "upload instead (https://pypi.org/p/twine/)",
- log.WARN
- )
+ msg = (
+ "The register command has been removed, use twine to upload "
+ + "instead (https://pypi.org/p/twine)"
+ )
+
+ self.announce("ERROR: " + msg, log.ERROR)
+
+ raise RemovedCommandError(msg)