Skip to content

Commit e09ae2f

Browse files
committed
Revert "Make deprecation warning more visible and mention --use-pep517"
This reverts commit 4fadb95. It seems that the changes that were introduced prevent the tests from ever finishing to run.
1 parent 4fadb95 commit e09ae2f

File tree

2 files changed

+6
-21
lines changed

2 files changed

+6
-21
lines changed

pytest.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ filterwarnings=
4040
ignore:The Windows bytes API has been deprecated:DeprecationWarning
4141

4242
# https://github.com/pypa/setuptools/issues/2823
43-
ignore:(.|\s)*setuptools.installer. is deprecated(.|\s)*
43+
ignore:setuptools.installer is deprecated.
4444

4545
# https://github.com/pypa/setuptools/issues/917
4646
ignore:setup.py install is deprecated.

setuptools/installer.py

+5-20
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ def fetch_build_egg(dist, req): # noqa: C901 # is too complex (16) # FIXME
2424
"""Fetch an egg needed for building.
2525
2626
Use pip/wheel to fetch/build a wheel."""
27-
_DeprecatedWorkflow.warn(req, stacklevel=2)
27+
warnings.warn(
28+
"setuptools.installer is deprecated. Requirements should "
29+
"be satisfied by a PEP 517 installer.",
30+
SetuptoolsDeprecationWarning,
31+
)
2832
# Warn if wheel is not available
2933
try:
3034
pkg_resources.get_distribution('wheel')
@@ -98,22 +102,3 @@ def strip_marker(req):
98102
req = pkg_resources.Requirement.parse(str(req))
99103
req.marker = None
100104
return req
101-
102-
103-
class _DeprecatedWorkflow(SetuptoolsDeprecationWarning):
104-
"""Deprecated installation or configuration method for requirement: {req}
105-
!!\n\n
106-
########################
107-
# Deprecated Workflow #
108-
########################
109-
`setuptools.installer` is deprecated. Requirements should
110-
be satisfied by a PEP 517 installer.
111-
112-
If you are using `pip install` you can try adding the `--use-pep517` flag.
113-
\n\n!!
114-
"""
115-
116-
@classmethod
117-
def warn(cls, req, stacklevel=1):
118-
msg = cls.__doc__.format(req=req)
119-
warnings.warn(msg, cls, stacklevel=stacklevel+1)

0 commit comments

Comments
 (0)