diff --git a/Lib/ldap/cidict.py b/Lib/ldap/cidict.py index cf13388..48aeacb 100644 --- a/Lib/ldap/cidict.py +++ b/Lib/ldap/cidict.py @@ -5,9 +5,9 @@ See https://www.python-ldap.org/ for details. """ -from collections import MutableMapping import warnings +from ldap.compat import MutableMapping from ldap import __version__ diff --git a/Lib/ldap/compat.py b/Lib/ldap/compat.py index cbfeef5..901457b 100644 --- a/Lib/ldap/compat.py +++ b/Lib/ldap/compat.py @@ -10,6 +10,7 @@ from urllib import unquote as urllib_unquote from urllib import urlopen from urlparse import urlparse + from collections import MutableMapping def unquote(uri): """Specialized unquote that uses UTF-8 for parsing.""" @@ -33,6 +34,7 @@ def unquote(uri): IterableUserDict = UserDict from urllib.parse import quote, quote_plus, unquote, urlparse from urllib.request import urlopen + from collections.abc import MutableMapping def reraise(exc_type, exc_value, exc_traceback): """Re-raise an exception given information from sys.exc_info() diff --git a/Lib/ldapurl.py b/Lib/ldapurl.py index ecfc539..a3dd7ff 100644 --- a/Lib/ldapurl.py +++ b/Lib/ldapurl.py @@ -16,9 +16,7 @@ 'LDAPUrlExtension','LDAPUrlExtensions','LDAPUrl' ] -from collections import MutableMapping - -from ldap.compat import quote, unquote +from ldap.compat import quote, unquote, MutableMapping LDAP_SCOPE_BASE = 0 LDAP_SCOPE_ONELEVEL = 1