mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-09-23 23:30:11 +00:00
[cleanup] Misc fixes and cleanup
Closes #3780, Closes #3853, Closes #3850
This commit is contained in:
@@ -9,8 +9,13 @@ 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=2))
|
||||
try:
|
||||
passthrough_module(__name__, '._legacy', callback=lambda attr: warnings.warn(
|
||||
DeprecationWarning(f'{__name__}.{attr} is deprecated'), stacklevel=2))
|
||||
HAS_LEGACY = True
|
||||
except ModuleNotFoundError:
|
||||
# Keep working even without _legacy module
|
||||
HAS_LEGACY = False
|
||||
del passthrough_module
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user