]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/compat/_deprecated.py
[ie/podbayfm] Fix extraction (#10195)
[yt-dlp.git] / yt_dlp / compat / _deprecated.py
index 342f1f80d694b9fc94a31ccfa01e4488667a8319..607bae99999d98ddbc6826219c190585de1707d6 100644 (file)
@@ -1,4 +1,12 @@
 """Deprecated - New code should avoid these"""
+import warnings
+
+from .compat_utils import passthrough_module
+
+# XXX: Implement this the same way as other DeprecationWarnings without circular import
+passthrough_module(__name__, '.._legacy', callback=lambda attr: warnings.warn(
+    DeprecationWarning(f'{__name__}.{attr} is deprecated'), stacklevel=6))
+del passthrough_module
 
 import base64
 import urllib.error
@@ -8,7 +16,6 @@
 
 compat_b64decode = base64.b64decode
 
-compat_HTTPError = urllib.error.HTTPError
 compat_urlparse = urllib.parse
 compat_parse_qs = urllib.parse.parse_qs
 compat_urllib_parse_unquote = urllib.parse.unquote