提交 1b9804b6 authored 作者: Miro Hrončok's avatar Miro Hrončok

OrderedDict cannot be imported from collections.abc, it is not abstract

上级 9016c7ad
......@@ -6,15 +6,14 @@ from __future__ import absolute_import, print_function, division
from six import PY3, b, BytesIO, next
from six.moves import configparser
from six.moves import reload_module as reload
from collections import OrderedDict
try:
from collections.abc import (OrderedDict, MutableMapping as DictMixin,
Callable)
from collections.abc import MutableMapping as DictMixin, Callable
except ImportError:
# this raises an DeprecationWarning on py37 and will become
# and Exception in py38. Importing from collections.abc
# and Exception in py39. Importing from collections.abc
# won't work on py27
from collections import (OrderedDict, MutableMapping as DictMixin,
Callable)
from collections import MutableMapping as DictMixin, Callable
__all__ = ['PY3', 'b', 'BytesIO', 'next', 'configparser', 'reload']
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论