Release 2024.07.09
[yt-dlp.git] / yt_dlp / compat / _deprecated.py
blob607bae99999d98ddbc6826219c190585de1707d6
1 """Deprecated - New code should avoid these"""
2 import warnings
4 from .compat_utils import passthrough_module
6 # XXX: Implement this the same way as other DeprecationWarnings without circular import
7 passthrough_module(__name__, '.._legacy', callback=lambda attr: warnings.warn(
8 DeprecationWarning(f'{__name__}.{attr} is deprecated'), stacklevel=6))
9 del passthrough_module
11 import base64
12 import urllib.error
13 import urllib.parse
15 compat_str = str
17 compat_b64decode = base64.b64decode
19 compat_urlparse = urllib.parse
20 compat_parse_qs = urllib.parse.parse_qs
21 compat_urllib_parse_unquote = urllib.parse.unquote
22 compat_urllib_parse_urlencode = urllib.parse.urlencode
23 compat_urllib_parse_urlparse = urllib.parse.urlparse