diff --git a/stubs/yt-dlp/METADATA.toml b/stubs/yt-dlp/METADATA.toml index d29f3acb0729..a2cd50aa82d2 100644 --- a/stubs/yt-dlp/METADATA.toml +++ b/stubs/yt-dlp/METADATA.toml @@ -1,2 +1,2 @@ -version = "2026.7.4" +version = "2026.8.19" upstream-repository = "https://github.com/yt-dlp/yt-dlp" diff --git a/stubs/yt-dlp/yt_dlp/extractor/common.pyi b/stubs/yt-dlp/yt_dlp/extractor/common.pyi index 6922f697c4ee..6fc58a1c1d93 100644 --- a/stubs/yt-dlp/yt_dlp/extractor/common.pyi +++ b/stubs/yt-dlp/yt_dlp/extractor/common.pyi @@ -909,6 +909,8 @@ class InfoExtractor: def _cookies_passed(self) -> bool: ... def _mark_watched(self, *args: Any, **kwargs: Any) -> Any: ... # Not implemented here. @staticmethod + def _generate_blockbuster_headers(*, min_headers: int = 2, max_headers: int = 8) -> dict[str, str]: ... + @staticmethod def _generic_id(url: str) -> str: ... def _generic_title(self, url: str = "", webpage: str = "", *, default: str | None = None) -> str | None: ... def _extract_chapters_helper( diff --git a/stubs/yt-dlp/yt_dlp/utils/__init__.pyi b/stubs/yt-dlp/yt_dlp/utils/__init__.pyi index a33675e077b3..1a76d24540fe 100644 --- a/stubs/yt-dlp/yt_dlp/utils/__init__.pyi +++ b/stubs/yt-dlp/yt_dlp/utils/__init__.pyi @@ -1,3 +1,4 @@ from ._deprecated import * +from ._legacy import * from ._utils import * from .traversal import * diff --git a/stubs/yt-dlp/yt_dlp/utils/_deprecated.pyi b/stubs/yt-dlp/yt_dlp/utils/_deprecated.pyi index 5f20b62a2fb0..4e642d1cf802 100644 --- a/stubs/yt-dlp/yt_dlp/utils/_deprecated.pyi +++ b/stubs/yt-dlp/yt_dlp/utils/_deprecated.pyi @@ -12,5 +12,9 @@ def intlist_to_bytes(xs: list[int]) -> bytes: ... def jwt_encode_hs256(payload_data: Any, key: str, headers: Mapping[str, Any] = {}) -> bytes: ... # Passed to json.dumps(). @deprecated("Use `yt_dlp.utils.make_parent_dirs` instead.") def make_dir(path: PathLike[AnyStr], to_screen: Callable[[str], Any] | None = None) -> bool: ... +@deprecated("Do not use.") +def number_of_digits(number: int) -> int: ... +@deprecated("Use `str(uuid.uuid4())` instead.") +def random_uuidv4() -> str: ... compiled_regex_type: type[re.Pattern[Any]] diff --git a/stubs/yt-dlp/yt_dlp/utils/_legacy.pyi b/stubs/yt-dlp/yt_dlp/utils/_legacy.pyi index 8f1891cc02e3..b37674b7f218 100644 --- a/stubs/yt-dlp/yt_dlp/utils/_legacy.pyi +++ b/stubs/yt-dlp/yt_dlp/utils/_legacy.pyi @@ -6,6 +6,7 @@ from http.client import HTTPResponse from http.cookiejar import CookieJar from subprocess import Popen from typing import Any, AnyStr, TypeVar +from typing_extensions import deprecated has_certifi: bool has_websockets: bool @@ -52,8 +53,13 @@ def make_HTTPS_handler( def process_communicate_or_kill( p: Popen[Any], *args: Any, **kwargs: Any # args/kwargs passed to Popen.__init__(). ) -> tuple[AnyStr, AnyStr]: ... +@deprecated("Do not use.") def encodeFilename(s: str, for_subprocess: Unused = False) -> bytes: ... +@deprecated("Do not use.") def decodeFilename(b: bytes, for_subprocess: Unused = False) -> str: ... +@deprecated("Do not use.") def decodeArgument(b: _T) -> _T: ... +@deprecated("Do not use.") def decodeOption(optval: AnyStr) -> str: ... +@deprecated("Use `str` instead.") def error_to_compat_str(err: Any) -> str: ... # Calls str(err). diff --git a/stubs/yt-dlp/yt_dlp/utils/_utils.pyi b/stubs/yt-dlp/yt_dlp/utils/_utils.pyi index ea5d96e131ea..2a9eec4ba73e 100644 --- a/stubs/yt-dlp/yt_dlp/utils/_utils.pyi +++ b/stubs/yt-dlp/yt_dlp/utils/_utils.pyi @@ -573,7 +573,6 @@ def format_field( func: Callable[[Any], Any] = ..., ) -> str: ... def clean_podcast_url(url: str) -> str: ... -def random_uuidv4() -> str: ... def make_parent_dirs(path: PathLike[AnyStr]) -> None: ... def get_executable_path() -> str: ... def get_user_config_dirs(package_name: str) -> Iterator[str]: ... @@ -586,7 +585,6 @@ def jwt_decode_hs256(jwt: str) -> Any: ... # Returns json.loads() output. def supports_terminal_sequences(stream: IO[Any]) -> bool: ... def windows_enable_vt_mode() -> None: ... def remove_terminal_sequences(string: str) -> str: ... -def number_of_digits(number: int) -> int: ... def join_nonempty(*values: str, delim: str = "-", from_dict: Mapping[str, Any] | None = None) -> str: ... def scale_thumbnails_to_max_format_width( formats: Iterable[Mapping[str, Any]], thumbnails: Iterable[Mapping[str, Any]], url_width_re: str | Pattern[str]