提交 b6a66822 authored 作者: Miro Hrončok's avatar Miro Hrončok 提交者: Brandon T. Willard

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

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