Switch imports based on python versions, my bad

This commit is contained in:
Bruno Oliveira 2018-03-29 23:15:03 -03:00
parent 6a81aae4f2
commit 3fc2c94b5e
1 changed files with 2 additions and 2 deletions

View File

@ -38,11 +38,11 @@ PY35 = sys.version_info[:2] >= (3, 5)
PY36 = sys.version_info[:2] >= (3, 6) PY36 = sys.version_info[:2] >= (3, 6)
MODULE_NOT_FOUND_ERROR = 'ModuleNotFoundError' if PY36 else 'ImportError' MODULE_NOT_FOUND_ERROR = 'ModuleNotFoundError' if PY36 else 'ImportError'
if _PY2: if _PY3:
# those raise DeprecationWarnings in Python >=3.7
from collections.abc import MutableMapping as MappingMixin # noqa from collections.abc import MutableMapping as MappingMixin # noqa
from collections.abc import Sequence # noqa from collections.abc import Sequence # noqa
else: else:
# those raise DeprecationWarnings in Python >=3.7
from collections import MutableMapping as MappingMixin # noqa from collections import MutableMapping as MappingMixin # noqa
from collections import Sequence # noqa from collections import Sequence # noqa