Commit 18a3cae3 authored by Jason R. Coombs's avatar Jason R. Coombs

Update Python 2 warning to include a minimum sunset date and add a preamble to...

Update Python 2 warning to include a minimum sunset date and add a preamble to make referencing the warning more reliable. Ref #1458.
parent 71aa3327
Add minimum sunset date and preamble to Python 2 warning.
......@@ -7,7 +7,8 @@ msg = textwrap.dedent("""
You are running Setuptools on Python 2, which is no longer
supported and
>>> SETUPTOOLS WILL STOP WORKING <<<
in a subsequent release. Please ensure you are installing
in a subsequent release (no sooner than 2020-04-20).
Please ensure you are installing
Setuptools using pip 9.x or later or pin to `setuptools<45`
in your environment.
If you have done those things and are still encountering
......@@ -16,4 +17,6 @@ msg = textwrap.dedent("""
about the steps that led to this unsupported combination.
""")
sys.version_info < (3,) and warnings.warn("*" * 60 + msg + "*" * 60)
pre = "Setuptools will stop working on Python 2\n"
sys.version_info < (3,) and warnings.warn(pre + "*" * 60 + msg + "*" * 60)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment