Skip to content

Commit

Permalink
In the warnings, provide link to issue template.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jul 2, 2024
1 parent bd1d338 commit ef37d17
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions _distutils_hack/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
import os


report_url = (
"https://github.com/pypa/setuptools/issues/new?"
"template=distutils-deprecation.yaml"
)


def warn_distutils_present():
if 'distutils' not in sys.modules:
return
Expand All @@ -26,7 +32,8 @@ def clear_distutils():
warnings.warn(
"Setuptools is replacing distutils. Support for replacing "
"an already imported distutils is deprecated. In the future, "
"this condition will fail.",
"this condition will fail. "
f"Register concerns at {report_url}"
)
mods = [
name
Expand All @@ -49,7 +56,8 @@ def enabled():
"Reliance on distutils from stdlib is deprecated. Users "
"must rely on setuptools to provide the distutils module. "
"Avoid importing distutils or import setuptools first, "
"and avoid setting SETUPTOOLS_USE_DISTUTILS=stdlib."
"and avoid setting SETUPTOOLS_USE_DISTUTILS=stdlib. "
f"Register concerns at {report_url}"
)
return which == 'local'

Expand Down

0 comments on commit ef37d17

Please sign in to comment.