You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
3.5.2 breaks config parsing in flake8 on python 2.7 #27
In the line if PY2 and isinstance(filenames, bytes) and sys.py3kwarning:, the addition of and sys.py3kwarning makes it so flake8 can't read config files. sys.py3kwarning seems to only be True if you pass -3 to the python interpreter, and this is not set by default in flake8.
Reacted by Krzysztof Przybyła, Raphael Nestler, Nicola Soranzo and Guilherme da Costa
if PY2 and isinstance(filenames, bytes) and sys.py3kwarning:
warnings.warn(something)
filenames = [filenames]
When sys.py3kwarning is false (which is the default on at least my python2.7) the condition check is always false and filename is not converted to a list.
I would recommend to just revert 884b8e6 which is obviously wrong and craft another patch that move the sys.py3kwarning to its own guard:
if PY2 and isinstance(filenames, bytes)
if sys.py3kwarning:
warnings.warn(something)
filenames = [filenames]
Activity
gvangool commentedon Jan 25, 2019
I have created a patch for this, https://github.com/gvangool/configparser/tree/fix-regression-in-3.5.2. But the current master is already updated to match the Python 3.7 release.
harkylton commentedon Jan 25, 2019
@gvangool Thanks. I've downgraded to
3.5.1for now, just wanted to highlight the issue before it propagates to other projects.nsoranzo commentedon Jan 25, 2019
See also https://github.com/jaraco/configparser/pull/24/files#r250956907
hashar commentedon Jan 25, 2019
if PY2 and isinstance(filenames, bytes) and sys.py3kwarning:
warnings.warn(something)
filenames = [filenames]
When sys.py3kwarning is false (which is the default on at least my python2.7) the condition check is always false and filename is not converted to a list.
I would recommend to just revert 884b8e6 which is obviously wrong and craft another patch that move the sys.py3kwarning to its own guard:
Thx!
Pin configparser==3.5.1
jaraco commentedon Jan 25, 2019
Will have a fix shortly.
Update changelog and bump version. Ref #27.
jaraco commentedon Jan 25, 2019
Fix released as 3.5.3.
Revert "Pin configparser==3.5.1"
Update skeleton description to describe the periodic collapse. Fixes #27