From 2565f349468d5dcc6c84803be8784e5a32740b54 Mon Sep 17 00:00:00 2001 From: Semyon Moroz Date: Sun, 24 Aug 2025 13:35:27 +0000 Subject: [PATCH] [Authlib] Update to 1.6.2 (#14635) --- stubs/Authlib/METADATA.toml | 2 +- stubs/Authlib/authlib/jose/rfc7517/key_set.pyi | 2 +- stubs/Authlib/authlib/oauth2/rfc6749/requests.pyi | 10 +++++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/stubs/Authlib/METADATA.toml b/stubs/Authlib/METADATA.toml index 42ef05ebf..23fef9b25 100644 --- a/stubs/Authlib/METADATA.toml +++ b/stubs/Authlib/METADATA.toml @@ -1,4 +1,4 @@ -version = "~= 1.6.0" +version = "~= 1.6.2" upstream_repository = "https://github.com/lepture/authlib" requires = ["cryptography"] partial_stub = true diff --git a/stubs/Authlib/authlib/jose/rfc7517/key_set.pyi b/stubs/Authlib/authlib/jose/rfc7517/key_set.pyi index 11092ee28..ebc8443de 100644 --- a/stubs/Authlib/authlib/jose/rfc7517/key_set.pyi +++ b/stubs/Authlib/authlib/jose/rfc7517/key_set.pyi @@ -7,4 +7,4 @@ class KeySet: def __init__(self, keys) -> None: ... def as_dict(self, is_private: bool = False, **params): ... def as_json(self, is_private: bool = False, **params): ... - def find_by_kid(self, kid): ... + def find_by_kid(self, kid, **params): ... diff --git a/stubs/Authlib/authlib/oauth2/rfc6749/requests.pyi b/stubs/Authlib/authlib/oauth2/rfc6749/requests.pyi index a1e18c2db..40aa69ce3 100644 --- a/stubs/Authlib/authlib/oauth2/rfc6749/requests.pyi +++ b/stubs/Authlib/authlib/oauth2/rfc6749/requests.pyi @@ -1,5 +1,6 @@ from _typeshed import Incomplete from collections.abc import Mapping +from typing import overload from typing_extensions import deprecated from authlib.oauth2.rfc6749 import ClientMixin @@ -40,7 +41,11 @@ class OAuth2Request(OAuth2Payload): authorization_code: Incomplete | None refresh_token: Incomplete | None credential: Incomplete | None - def __init__(self, method: str, uri: str, headers: Mapping[str, str] | None = None) -> None: ... + @overload + def __init__(self, method: str, uri: str, body: None = None, headers: Mapping[str, str] | None = None) -> None: ... + @overload + @deprecated("The `body` parameter in OAuth2Request is deprecated. Use the payload system instead.") + def __init__(self, method: str, uri: str, body, headers: Mapping[str, str] | None = None) -> None: ... @property def args(self) -> dict[str, str | None]: ... @property @@ -69,6 +74,9 @@ class OAuth2Request(OAuth2Payload): @property @deprecated("'request.state' is deprecated in favor of 'request.payload.state'") def state(self) -> str | None: ... + @property + @deprecated("'request.body' is deprecated. Use the payload system instead.") + def body(self): ... class JsonPayload: @property