Skip to content

Commit

Permalink
OrderedDict cannot be imported from collections.abc, it is not abstract
Browse files Browse the repository at this point in the history
  • Loading branch information
hroncok committed Feb 4, 2020
1 parent 9016c7a commit 1b9804b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions theano/compat/__init__.py
Expand Up @@ -6,15 +6,14 @@
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']

Expand Down

0 comments on commit 1b9804b

Please sign in to comment.