]> jfr.im git - yt-dlp.git/blame - yt_dlp/compat/_deprecated.py
[compat] Ensure submodules are imported correctly
[yt-dlp.git] / yt_dlp / compat / _deprecated.py
CommitLineData
77f90330 1"""Deprecated - New code should avoid these"""
a250b247 2import warnings
3
4from .compat_utils import passthrough_module
5
6# XXX: Implement this the same way as other DeprecationWarnings without circular import
7passthrough_module(__name__, '.._legacy', callback=lambda attr: warnings.warn(
8 DeprecationWarning(f'{__name__}.{attr} is deprecated'), stacklevel=6))
9del passthrough_module
77f90330 10
11import base64
ac668111 12import urllib.error
13import urllib.parse
14
15compat_str = str
77f90330 16
17compat_b64decode = base64.b64decode
ac668111 18
ac668111 19compat_urlparse = urllib.parse
77f90330 20compat_parse_qs = urllib.parse.parse_qs
77f90330 21compat_urllib_parse_unquote = urllib.parse.unquote
77f90330 22compat_urllib_parse_urlencode = urllib.parse.urlencode
23compat_urllib_parse_urlparse = urllib.parse.urlparse