/usr/lib/python2.7/dist-packages/ldap/compat.py is in python-pyldap 2.4.25.1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | """Compatibility wrappers for Py2/Py3."""
import sys
if sys.version_info[0] < 3:
from UserDict import UserDict
from urllib import quote
from urllib import unquote as urllib_unquote
from urlparse import urlparse
def unquote(uri):
"""Specialized unquote that uses UTF-8 for parsing."""
uri = uri.encode('ascii')
unquoted = urllib_unquote(uri)
return unquoted.decode('utf-8')
else:
from collections import UserDict
from urllib.parse import quote, unquote, urlparse
|