diff --git a/pyproject.toml b/pyproject.toml index dcfeae6323..8f2824a4ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -307,6 +307,7 @@ banned-from = [ "yt_dlp.compat.compat_os_name".msg = "Use `os.name` instead." "yt_dlp.compat.compat_realpath".msg = "Use `os.path.realpath` instead." "yt_dlp.compat.compat_shlex_quote".msg = "Use `yt_dlp.utils.shell_quote` instead." +"yt_dlp.compat.functools".msg = "Use `functools` instead." "yt_dlp.utils.bytes_to_intlist".msg = "Use `list` instead." "yt_dlp.utils.compiled_regex_type".msg = "Use `re.Pattern` instead." "yt_dlp.utils.intlist_to_bytes".msg = "Use `bytes` instead." diff --git a/yt_dlp/compat/_deprecated.py b/yt_dlp/compat/_deprecated.py index 1b764aaa79..445acc1a06 100644 --- a/yt_dlp/compat/_deprecated.py +++ b/yt_dlp/compat/_deprecated.py @@ -8,6 +8,7 @@ passthrough_module(__name__, '.._legacy', callback=lambda attr: warnings.warn( DeprecationWarning(f'{__name__}.{attr} is deprecated'), stacklevel=6)) del passthrough_module +import functools # noqa: F401 import os diff --git a/yt_dlp/compat/functools.py b/yt_dlp/compat/functools.py deleted file mode 100644 index c2e9e90279..0000000000 --- a/yt_dlp/compat/functools.py +++ /dev/null @@ -1,7 +0,0 @@ -# flake8: noqa: F405 -from functools import * # noqa: F403 - -from .compat_utils import passthrough_module - -passthrough_module(__name__, 'functools') -del passthrough_module