In #3 Stefan shows the call site in pyflakes where this is a problem.
Personally I think isort is using the above to try and bridge the 2/3 divide,
but should probably add a compat module.
pyflakes should use:
PY2 = sys.version.starswith('2') or similar.
On my machine I get the same error.
It's due to the following file being present:
~/.local/ lib/python2. 7/site- packages/ builtins. py
Searches: lib/python2. 7/site- packages/ -type f -exec grep -Hn builtins.py {} \; .local/ lib/python2. 7/site- packages/ pies2overrides- 2.6.1-py2. 7.egg-info/ SOURCES. txt:2:builtins. py .local/ lib/python2. 7/site- packages/ pies2overrides- 2.6.1-py2. 7.egg-info/ installed- files.txt: 2:../builtins. py .local/ lib/python2. 7/site- packages/ pies2overrides- 2.6.1-py2. 7.egg-info/ installed- files.txt: 19:../builtins. pyc
$ find ~/.local/
/home/matthew/
/home/matthew/
/home/matthew/
$ find /home/matthew/ .local/ lib/python2. 7/site- packages/ -type f -name requires.txt -exec grep -Hn pies {} \; .local/ lib/python2. 7/site- packages/ pies-2. 6.1-py2. 7.egg-info/ requires. txt:1:pies2over rides .local/ lib/python2. 7/site- packages/ isort-3. 6.2-py2. 7.egg-info/ requires. txt:1:pies> =2.6.0
/home/matthew/
/home/matthew/
$ find /home/matthew/ .local/ lib/python2. 7/site- packages/ -type f -name requires.txt -exec grep -Hn pies {} \; .local/ lib/python2. 7/site- packages/ pies-2. 6.1-py2. 7.egg-info/ requires. txt:1:pies2over rides .local/ lib/python2. 7/site- packages/ isort-3. 6.2-py2. 7.egg-info/ requires. txt:1:pies> =2.6.0
/home/matthew/
/home/matthew/
This has the sole line:
from __builtins__ import *
The offending module on my system is isort.
In #3 Stefan shows the call site in pyflakes where this is a problem.
Personally I think isort is using the above to try and bridge the 2/3 divide,
but should probably add a compat module.
pyflakes should use: starswith( '2') or similar.
PY2 = sys.version.
Will raise a bug in both projects.