diff --git a/stubs/yt-dlp/METADATA.toml b/stubs/yt-dlp/METADATA.toml index 5c8c5610a..15f950ac7 100644 --- a/stubs/yt-dlp/METADATA.toml +++ b/stubs/yt-dlp/METADATA.toml @@ -1,3 +1,3 @@ -version = "2025.8.11" +version = "2025.8.20" upstream_repository = "https://github.com/yt-dlp/yt-dlp" requires = ["websockets"] diff --git a/stubs/yt-dlp/yt_dlp/extractor/common.pyi b/stubs/yt-dlp/yt_dlp/extractor/common.pyi index bcb4dd51f..9e6e819f9 100644 --- a/stubs/yt-dlp/yt_dlp/extractor/common.pyi +++ b/stubs/yt-dlp/yt_dlp/extractor/common.pyi @@ -19,6 +19,7 @@ from ..YoutubeDL import YoutubeDL class _InfoDict(TypedDict, total=False): age_limit: int availability: Literal["private", "premium_only", "subscriber_only", "needs_auth", "unlisted", "public"] | None + available_at: int creator: str | None comment_count: int | None duration: int | None diff --git a/stubs/yt-dlp/yt_dlp/utils/__init__.pyi b/stubs/yt-dlp/yt_dlp/utils/__init__.pyi index ddeaddbd3..f4fea0224 100644 --- a/stubs/yt-dlp/yt_dlp/utils/__init__.pyi +++ b/stubs/yt-dlp/yt_dlp/utils/__init__.pyi @@ -1,3 +1,9 @@ +from ._deprecated import ( + bytes_to_intlist as bytes_to_intlist, + compiled_regex_type as compiled_regex_type, + intlist_to_bytes as intlist_to_bytes, + jwt_encode_hs256 as jwt_encode_hs256, +) from ._utils import ( ACCENT_CHARS as ACCENT_CHARS, BOMS as BOMS, @@ -149,7 +155,7 @@ from ._utils import ( join_nonempty as join_nonempty, js_to_json as js_to_json, jwt_decode_hs256 as jwt_decode_hs256, - jwt_encode_hs256 as jwt_encode_hs256, + jwt_encode as jwt_encode, limit_length as limit_length, locked_file as locked_file, long_to_bytes as long_to_bytes, diff --git a/stubs/yt-dlp/yt_dlp/utils/_deprecated.pyi b/stubs/yt-dlp/yt_dlp/utils/_deprecated.pyi new file mode 100644 index 000000000..97ab0a3f1 --- /dev/null +++ b/stubs/yt-dlp/yt_dlp/utils/_deprecated.pyi @@ -0,0 +1,13 @@ +import re +from collections.abc import Mapping +from typing import Any +from typing_extensions import deprecated + +@deprecated("Use `list` instead.") +def bytes_to_intlist(bs: bytes) -> list[int]: ... +@deprecated("Use `bytes` instead.") +def intlist_to_bytes(xs: list[int]) -> bytes: ... +@deprecated("Use `yt_dlp.utils.jwt_encode` instead.") +def jwt_encode_hs256(payload_data: Any, key: str, headers: Mapping[str, Any] = ...) -> bytes: ... # Passed to json.dumps(). + +compiled_regex_type: type[re.Pattern[Any]] diff --git a/stubs/yt-dlp/yt_dlp/utils/_utils.pyi b/stubs/yt-dlp/yt_dlp/utils/_utils.pyi index eca800939..58ad22887 100644 --- a/stubs/yt-dlp/yt_dlp/utils/_utils.pyi +++ b/stubs/yt-dlp/yt_dlp/utils/_utils.pyi @@ -23,7 +23,7 @@ from functools import cache from optparse import Values from os import PathLike from re import Pattern -from typing import IO, Any, AnyStr, BinaryIO, Generic, NamedTuple, TextIO, TypeVar, overload +from typing import IO, Any, AnyStr, BinaryIO, Generic, Literal, NamedTuple, TextIO, TypeVar, overload from typing_extensions import Self, TypeAlias from urllib.parse import _QueryType, _QuoteVia from xml.etree import ElementTree as ET @@ -573,7 +573,9 @@ def get_executable_path() -> str: ... def get_user_config_dirs(package_name: str) -> Iterator[str]: ... def get_system_config_dirs(package_name: str) -> Iterator[str]: ... def time_seconds(**kwargs: float) -> int: ... -def jwt_encode_hs256(payload_data: Any, key: str, headers: Mapping[str, Any] = ...) -> bytes: ... # Passed to json.dumps(). +def jwt_encode( + payload_data: Any, key: str, *, alg: Literal["HS256"] = "HS256", headers: Mapping[str, Any] | None = None +) -> str: ... # payload_data and headers are passed to json.dumps(). 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: ...