-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add obnoxious warning about Python 2 being unsupported on this releas…
…e with guidance on how to avoid the warning and what to do if that guidance was ineffective.
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import sys | ||
import warnings | ||
import textwrap | ||
|
||
|
||
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 | ||
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 | ||
this message, please comment in | ||
https://github.com/pypa/setuptools/issues/1458 | ||
about the steps that led to this unsupported combination. | ||
""") | ||
|
||
sys.version_info < (3,) and warnings.warn("*" * 60 + msg + "*" * 60) |
79f1694
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, this import is failing and causing errors when we are trying to run PyInstaller. See #1963. I think instead of
__import__('pkg_resources.py2_warn')
you just wantfrom . import py2_warn
, similar to how on line 79 you seefrom . import py31compat
.79f1694
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, same issue with cx_Freeze.
79f1694
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please report the details in the bug.
79f1694
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolve the problem temporarily
#__import__('pkg_resources.py2_warn')
#changed by Steven
import pkg_resources.py2_warn