Fix collections.deque import in compat module

pull/46015/head
Sviatoslav Sydorenko 6 years ago committed by Sviatoslav Sydorenko
parent 846ee7e85f
commit a978d7f283

@ -82,6 +82,7 @@ import pwd
import platform import platform
import errno import errno
import datetime import datetime
from collections import deque
from itertools import chain, repeat from itertools import chain, repeat
try: try:
@ -148,7 +149,6 @@ except Exception:
pass pass
from ansible.module_utils.common._collections_compat import ( from ansible.module_utils.common._collections_compat import (
deque,
KeysView, KeysView,
Mapping, MutableMapping, Mapping, MutableMapping,
Sequence, MutableSequence, Sequence, MutableSequence,

@ -14,7 +14,7 @@ __metaclass__ = type
try: try:
"""Python 3.3+ branch.""" """Python 3.3+ branch."""
from collections.abc import ( from collections.abc import (
deque, KeysView, KeysView,
Mapping, MutableMapping, Mapping, MutableMapping,
Sequence, MutableSequence, Sequence, MutableSequence,
Set, MutableSet, Set, MutableSet,
@ -22,7 +22,7 @@ try:
except ImportError: except ImportError:
"""Use old lib location under 2.6-3.2.""" """Use old lib location under 2.6-3.2."""
from collections import ( from collections import (
deque, KeysView, KeysView,
Mapping, MutableMapping, Mapping, MutableMapping,
Sequence, MutableSequence, Sequence, MutableSequence,
Set, MutableSet, Set, MutableSet,

Loading…
Cancel
Save