Skip to content

Commit b1b3b5a

Browse files
committed
Import MutableMapping from collections.abc, except on legacy Python
1 parent 6f2a45d commit b1b3b5a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Lib/ldap/cidict.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
66
See https://www.python-ldap.org/ for details.
77
"""
8-
from collections import MutableMapping
98
import warnings
109

10+
from ldap.compat import MutableMapping
1111
from ldap import __version__
1212

1313

Lib/ldap/compat.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from urllib import unquote as urllib_unquote
1111
from urllib import urlopen
1212
from urlparse import urlparse
13+
from collections import MutableMapping
1314

1415
def unquote(uri):
1516
"""Specialized unquote that uses UTF-8 for parsing."""
@@ -33,6 +34,7 @@ def unquote(uri):
3334
IterableUserDict = UserDict
3435
from urllib.parse import quote, quote_plus, unquote, urlparse
3536
from urllib.request import urlopen
37+
from collections.abc import MutableMapping
3638

3739
def reraise(exc_type, exc_value, exc_traceback):
3840
"""Re-raise an exception given information from sys.exc_info()

Lib/ldapurl.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616
'LDAPUrlExtension','LDAPUrlExtensions','LDAPUrl'
1717
]
1818

19-
from collections import MutableMapping
20-
21-
from ldap.compat import quote, unquote
19+
from ldap.compat import quote, unquote, MutableMapping
2220

2321
LDAP_SCOPE_BASE = 0
2422
LDAP_SCOPE_ONELEVEL = 1

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy