diff options
Diffstat (limited to 'youtube_dl/compat.py')
-rw-r--r-- | youtube_dl/compat.py | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/youtube_dl/compat.py b/youtube_dl/compat.py index 0ee9bc760..c75ab131b 100644 --- a/youtube_dl/compat.py +++ b/youtube_dl/compat.py @@ -57,17 +57,6 @@ try: except ImportError: # Python 2 import cookielib as compat_cookiejar -if sys.version_info[0] == 2: - class compat_cookiejar_Cookie(compat_cookiejar.Cookie): - def __init__(self, version, name, value, *args, **kwargs): - if isinstance(name, compat_str): - name = name.encode() - if isinstance(value, compat_str): - value = value.encode() - compat_cookiejar.Cookie.__init__(self, version, name, value, *args, **kwargs) -else: - compat_cookiejar_Cookie = compat_cookiejar.Cookie - try: import http.cookies as compat_cookies except ImportError: # Python 2 @@ -2765,17 +2754,6 @@ else: compat_expanduser = os.path.expanduser -if compat_os_name == 'nt' and sys.version_info < (3, 8): - # os.path.realpath on Windows does not follow symbolic links - # prior to Python 3.8 (see https://bugs.python.org/issue9949) - def compat_realpath(path): - while os.path.islink(path): - path = os.path.abspath(os.readlink(path)) - return path -else: - compat_realpath = os.path.realpath - - if sys.version_info < (3, 0): def compat_print(s): from .utils import preferredencoding @@ -2998,7 +2976,6 @@ __all__ = [ 'compat_basestring', 'compat_chr', 'compat_cookiejar', - 'compat_cookiejar_Cookie', 'compat_cookies', 'compat_ctypes_WINFUNCTYPE', 'compat_etree_Element', @@ -3021,7 +2998,6 @@ __all__ = [ 'compat_os_name', 'compat_parse_qs', 'compat_print', - 'compat_realpath', 'compat_setenv', 'compat_shlex_quote', 'compat_shlex_split', |