aboutsummaryrefslogtreecommitdiffstats
path: root/hypervideo_dl/compat/_deprecated.py
diff options
context:
space:
mode:
Diffstat (limited to 'hypervideo_dl/compat/_deprecated.py')
-rw-r--r--hypervideo_dl/compat/_deprecated.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/hypervideo_dl/compat/_deprecated.py b/hypervideo_dl/compat/_deprecated.py
index 342f1f8..607bae9 100644
--- a/hypervideo_dl/compat/_deprecated.py
+++ b/hypervideo_dl/compat/_deprecated.py
@@ -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_str = str
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