New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined names in Python 3 #1039

Closed
cclauss opened this Issue Jan 10, 2018 · 0 comments

Comments

2 participants
@cclauss
Contributor

cclauss commented Jan 10, 2018

flake8 testing of https://github.com/Supervisor/supervisor on Python 3.6.3

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./supervisor/compat.py:32:31: F821 undefined name 'file'
        if isinstance(stream, file):
                              ^
./supervisor/web.py:128:37: F821 undefined name 'unicode'
                if isinstance(body, unicode):
                                    ^
./supervisor/web.py:394:33: F821 undefined name 'e'
                                e.code, e.text)
                                ^
./supervisor/web.py:394:41: F821 undefined name 'e'
                                e.code, e.text)
                                        ^
./supervisor/web.py:446:33: F821 undefined name 'e'
                                e.code, e.text)
                                ^
./supervisor/web.py:446:41: F821 undefined name 'e'
                                e.code, e.text)
                                        ^
  • file was removed from Python 3
  • unicode was removed from Python 3 because all strs are Unicode.
  • variable scoping in closures are different in Python 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment