[2.7] Fix collections.deque import in compat module (#45837)
(cherry picked from commit a978d7f283
)
Co-authored-by: Sviatoslav Sydorenko <wk@sydorenko.org.ua>
This commit is contained in:
parent
e881ea8957
commit
2008e9d28c
2 changed files with 3 additions and 3 deletions
|
@ -82,6 +82,7 @@ import pwd
|
|||
import platform
|
||||
import errno
|
||||
import datetime
|
||||
from collections import deque
|
||||
from itertools import chain, repeat
|
||||
|
||||
try:
|
||||
|
@ -148,7 +149,6 @@ except Exception:
|
|||
pass
|
||||
|
||||
from ansible.module_utils.common._collections_compat import (
|
||||
deque,
|
||||
KeysView,
|
||||
Mapping, MutableMapping,
|
||||
Sequence, MutableSequence,
|
||||
|
|
|
@ -14,7 +14,7 @@ __metaclass__ = type
|
|||
try:
|
||||
"""Python 3.3+ branch."""
|
||||
from collections.abc import (
|
||||
deque, KeysView,
|
||||
KeysView,
|
||||
Mapping, MutableMapping,
|
||||
Sequence, MutableSequence,
|
||||
Set, MutableSet,
|
||||
|
@ -22,7 +22,7 @@ try:
|
|||
except ImportError:
|
||||
"""Use old lib location under 2.6-3.2."""
|
||||
from collections import (
|
||||
deque, KeysView,
|
||||
KeysView,
|
||||
Mapping, MutableMapping,
|
||||
Sequence, MutableSequence,
|
||||
Set, MutableSet,
|
||||
|
|
Loading…
Reference in a new issue