Switch imports based on python versions, my bad
This commit is contained in:
parent
6a81aae4f2
commit
3fc2c94b5e
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue