From a978d7f283544e61debfe0e71460d1bbb0fb57e0 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 17 Sep 2018 12:28:41 +0200 Subject: [PATCH] Fix collections.deque import in compat module --- lib/ansible/module_utils/basic.py | 2 +- lib/ansible/module_utils/common/_collections_compat.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py index 9f5ec5bf20..98fd25f55d 100644 --- a/lib/ansible/module_utils/basic.py +++ b/lib/ansible/module_utils/basic.py @@ -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, diff --git a/lib/ansible/module_utils/common/_collections_compat.py b/lib/ansible/module_utils/common/_collections_compat.py index 3d1bbfc337..b44dbcf929 100644 --- a/lib/ansible/module_utils/common/_collections_compat.py +++ b/lib/ansible/module_utils/common/_collections_compat.py @@ -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,