summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnderson Bravalheri <andersonbravalheri@gmail.com>2023-01-19 18:49:05 +0000
committerAnderson Bravalheri <andersonbravalheri@gmail.com>2023-01-19 18:49:05 +0000
commite09ae2faa18285cbdfd0be84e2124c116fd1eb53 (patch)
tree9ac2ef3e8a6d5def0044790a9e995288a4919181
parent4fadb9505b02a88858e54fd762e4958886a82bcb (diff)
downloadpython-setuptools-git-e09ae2faa18285cbdfd0be84e2124c116fd1eb53.tar.gz
Revert "Make deprecation warning more visible and mention --use-pep517"
This reverts commit 4fadb9505b02a88858e54fd762e4958886a82bcb. It seems that the changes that were introduced prevent the tests from ever finishing to run.
-rw-r--r--pytest.ini2
-rw-r--r--setuptools/installer.py25
2 files changed, 6 insertions, 21 deletions
diff --git a/pytest.ini b/pytest.ini
index b9e845ea..12007ade 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -40,7 +40,7 @@ filterwarnings=
ignore:The Windows bytes API has been deprecated:DeprecationWarning
# https://github.com/pypa/setuptools/issues/2823
- ignore:(.|\s)*setuptools.installer. is deprecated(.|\s)*
+ ignore:setuptools.installer is deprecated.
# https://github.com/pypa/setuptools/issues/917
ignore:setup.py install is deprecated.
diff --git a/setuptools/installer.py b/setuptools/installer.py
index 28fdf70b..b7096df1 100644
--- a/setuptools/installer.py
+++ b/setuptools/installer.py
@@ -24,7 +24,11 @@ def fetch_build_egg(dist, req): # noqa: C901 # is too complex (16) # FIXME
"""Fetch an egg needed for building.
Use pip/wheel to fetch/build a wheel."""
- _DeprecatedWorkflow.warn(req, stacklevel=2)
+ warnings.warn(
+ "setuptools.installer is deprecated. Requirements should "
+ "be satisfied by a PEP 517 installer.",
+ SetuptoolsDeprecationWarning,
+ )
# Warn if wheel is not available
try:
pkg_resources.get_distribution('wheel')
@@ -98,22 +102,3 @@ def strip_marker(req):
req = pkg_resources.Requirement.parse(str(req))
req.marker = None
return req
-
-
-class _DeprecatedWorkflow(SetuptoolsDeprecationWarning):
- """Deprecated installation or configuration method for requirement: {req}
- !!\n\n
- ########################
- # Deprecated Workflow #
- ########################
- `setuptools.installer` is deprecated. Requirements should
- be satisfied by a PEP 517 installer.
-
- If you are using `pip install` you can try adding the `--use-pep517` flag.
- \n\n!!
- """
-
- @classmethod
- def warn(cls, req, stacklevel=1):
- msg = cls.__doc__.format(req=req)
- warnings.warn(msg, cls, stacklevel=stacklevel+1)