aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/utils/_deprecated.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2023-07-15 14:30:08 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2023-07-15 16:18:34 +0530
commitc365dba8430ee33abda85d31f95128605bf240eb (patch)
tree174d35c23267863ca89a1a030935b445edf56799 /yt_dlp/utils/_deprecated.py
parent1b392f905d20ef1f1b300b180f867d43c9ce49b8 (diff)
downloadhypervideo-pre-c365dba8430ee33abda85d31f95128605bf240eb.tar.lz
hypervideo-pre-c365dba8430ee33abda85d31f95128605bf240eb.tar.xz
hypervideo-pre-c365dba8430ee33abda85d31f95128605bf240eb.zip
[networking] Add module (#2861)
No actual changes - code is only moved around
Diffstat (limited to 'yt_dlp/utils/_deprecated.py')
-rw-r--r--yt_dlp/utils/_deprecated.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/yt_dlp/utils/_deprecated.py b/yt_dlp/utils/_deprecated.py
index 4454d84a7..ca0fb1614 100644
--- a/yt_dlp/utils/_deprecated.py
+++ b/yt_dlp/utils/_deprecated.py
@@ -1,7 +1,26 @@
"""Deprecated - New code should avoid these"""
+import warnings
+
+from ..compat.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
+
from ._utils import preferredencoding
+# isort: split
+from ..networking._urllib import PUTRequest # noqa: F401
+from ..networking._urllib import SUPPORTED_ENCODINGS, HEADRequest # noqa: F401
+from ..networking._urllib import HTTPHandler as YoutubeDLHandler # noqa: F401
+from ..networking._urllib import ProxyHandler as PerRequestProxyHandler # noqa: F401
+from ..networking._urllib import RedirectHandler as YoutubeDLRedirectHandler # noqa: F401
+from ..networking._urllib import make_socks_conn_class, update_Request # noqa: F401
+from ..networking.exceptions import network_exceptions # noqa: F401
+from .networking import random_user_agent, std_headers # noqa: F401
+
def encodeFilename(s, for_subprocess=False):
assert isinstance(s, str)