Deprecate compat.functools

This commit is contained in:
sepro 2024-11-06 21:53:58 +01:00
parent 6b293bbeb3
commit b525b65888
3 changed files with 2 additions and 7 deletions

View File

@ -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."

View File

@ -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

View File

@ -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