gforcada/flake8-isort

SafeConfigParser deprecation warning

Closed this issue · 0 comments

Seeing a lot of warnings while linting with python -W all -m flake8.

/usr/local/lib/python3.6/site-packages/flake8_isort.py:130: DeprecationWarning: The SafeConfigParser class has been renamed to ConfigParser in Python 3.2. This alias will be removed in future versions. Use ConfigParser directly instead.

flake8_isort only tests against Python 3.5 and 3.6 so I'm assuming it's safe to drop support for Python 3.1 and change the import to

try:
    from configparser import ConfigParser as SafeConfigParser
except ImportError:
    from ConfigParser import SafeConfigParser