diff --git a/distutils/command/register.py b/distutils/command/register.py index 1089daf7..9645401f 100644 --- a/distutils/command/register.py +++ b/distutils/command/register.py @@ -11,7 +11,6 @@ import urllib.parse import urllib.request from distutils._log import log -from warnings import warn from more_itertools import always_iterable @@ -65,19 +64,6 @@ def run(self): else: self.send_metadata() - def check_metadata(self): - """Deprecated API.""" - warn( - "distutils.command.register.check_metadata is deprecated; " - "use the check command instead", - DeprecationWarning, - ) - check = self.distribution.get_command_obj('check') - check.ensure_finalized() - check.strict = self.strict - check.restructuredtext = True - check.run() - def _set_config(self): """Reads the configuration file and set attributes.""" config = self._read_pypirc() diff --git a/distutils/command/sdist.py b/distutils/command/sdist.py index eda6afe8..d723a1c9 100644 --- a/distutils/command/sdist.py +++ b/distutils/command/sdist.py @@ -8,7 +8,6 @@ from distutils._log import log from glob import glob from itertools import filterfalse -from warnings import warn from ..core import Command from ..errors import DistutilsOptionError, DistutilsTemplateError @@ -177,17 +176,6 @@ def run(self): # or zipfile, or whatever. self.make_distribution() - def check_metadata(self): - """Deprecated API.""" - warn( - "distutils.command.sdist.check_metadata is deprecated, \ - use the check command instead", - PendingDeprecationWarning, - ) - check = self.distribution.get_command_obj('check') - check.ensure_finalized() - check.run() - def get_file_list(self): """Figure out the list of files to include in the source distribution, and put it in 'self.filelist'. This might involve diff --git a/distutils/tests/test_sdist.py b/distutils/tests/test_sdist.py index 7daaaa63..c49a4bfc 100644 --- a/distutils/tests/test_sdist.py +++ b/distutils/tests/test_sdist.py @@ -4,7 +4,6 @@ import pathlib import shutil # noqa: F401 import tarfile -import warnings import zipfile from distutils.archive_util import ARCHIVE_FORMATS from distutils.command.sdist import sdist, show_formats @@ -20,7 +19,6 @@ import pytest from more_itertools import ilen -from .compat.py38 import check_warnings from .unix_compat import grp, pwd, require_uid_0, require_unix_id SETUP_PY = """ @@ -275,14 +273,6 @@ def test_metadata_check_option(self, caplog): cmd.run() assert len(self.warnings(caplog.messages, 'warning: check: ')) == 0 - def test_check_metadata_deprecated(self): - # makes sure make_metadata is deprecated - dist, cmd = self.get_cmd() - with check_warnings() as w: - warnings.simplefilter("always") - cmd.check_metadata() - assert len(w.warnings) == 1 - def test_show_formats(self, capsys): show_formats()