Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix for Python 4: replace unsafe six.PY3 with PY2 #1959
Summary of changes
We don't yet know if 3.10 or 4.0 will follow Python 3.9, but whichever it is, it will probably happen in 2020 when Python 3.9 reaches beta and work begins on Python 3.9+1.
There's some code which uses
if six.PY3: print("Python 3+ code") else: print "Python 2 code"
PY3 = sys.version_info == 3
When run on Python 4, this will run the Python 2 code! Instead, use
Found using https://github.com/asottile/flake8-2020
Pull Request Checklist