Skip to content

Commit 3d38185

Browse files
committed
Removed deprecated 'check_warnings' from 'sdist' and 'regitser' commands.
1 parent bcba955 commit 3d38185

File tree

3 files changed

+0
-36
lines changed

3 files changed

+0
-36
lines changed

distutils/command/register.py

-14
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import urllib.parse
1212
import urllib.request
1313
from distutils._log import log
14-
from warnings import warn
1514

1615
from more_itertools import always_iterable
1716

@@ -65,19 +64,6 @@ def run(self):
6564
else:
6665
self.send_metadata()
6766

68-
def check_metadata(self):
69-
"""Deprecated API."""
70-
warn(
71-
"distutils.command.register.check_metadata is deprecated; "
72-
"use the check command instead",
73-
DeprecationWarning,
74-
)
75-
check = self.distribution.get_command_obj('check')
76-
check.ensure_finalized()
77-
check.strict = self.strict
78-
check.restructuredtext = True
79-
check.run()
80-
8167
def _set_config(self):
8268
"""Reads the configuration file and set attributes."""
8369
config = self._read_pypirc()

distutils/command/sdist.py

-12
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from distutils._log import log
99
from glob import glob
1010
from itertools import filterfalse
11-
from warnings import warn
1211

1312
from ..core import Command
1413
from ..errors import DistutilsOptionError, DistutilsTemplateError
@@ -177,17 +176,6 @@ def run(self):
177176
# or zipfile, or whatever.
178177
self.make_distribution()
179178

180-
def check_metadata(self):
181-
"""Deprecated API."""
182-
warn(
183-
"distutils.command.sdist.check_metadata is deprecated, \
184-
use the check command instead",
185-
PendingDeprecationWarning,
186-
)
187-
check = self.distribution.get_command_obj('check')
188-
check.ensure_finalized()
189-
check.run()
190-
191179
def get_file_list(self):
192180
"""Figure out the list of files to include in the source
193181
distribution, and put it in 'self.filelist'. This might involve

distutils/tests/test_sdist.py

-10
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import pathlib
55
import shutil # noqa: F401
66
import tarfile
7-
import warnings
87
import zipfile
98
from distutils.archive_util import ARCHIVE_FORMATS
109
from distutils.command.sdist import sdist, show_formats
@@ -20,7 +19,6 @@
2019
import pytest
2120
from more_itertools import ilen
2221

23-
from .compat.py38 import check_warnings
2422
from .unix_compat import grp, pwd, require_uid_0, require_unix_id
2523

2624
SETUP_PY = """
@@ -275,14 +273,6 @@ def test_metadata_check_option(self, caplog):
275273
cmd.run()
276274
assert len(self.warnings(caplog.messages, 'warning: check: ')) == 0
277275

278-
def test_check_metadata_deprecated(self):
279-
# makes sure make_metadata is deprecated
280-
dist, cmd = self.get_cmd()
281-
with check_warnings() as w:
282-
warnings.simplefilter("always")
283-
cmd.check_metadata()
284-
assert len(w.warnings) == 1
285-
286276
def test_show_formats(self, capsys):
287277
show_formats()
288278

0 commit comments

Comments
 (0)