Skip to content

Commit

Permalink
Removed deprecated 'check_warnings' from 'sdist' and 'regitser' comma…
Browse files Browse the repository at this point in the history
…nds.
  • Loading branch information
jaraco committed Sep 5, 2024
1 parent bcba955 commit 3d38185
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 36 deletions.
14 changes: 0 additions & 14 deletions distutils/command/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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()
Expand Down
12 changes: 0 additions & 12 deletions distutils/command/sdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 0 additions & 10 deletions distutils/tests/test_sdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 = """
Expand Down Expand Up @@ -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()

Expand Down

0 comments on commit 3d38185

Please sign in to comment.