Skip to content

Commit bbb5708

Browse files
authored
Merge branch 'main' into fix/deque-rmul
2 parents c3f2611 + 5ab38d6 commit bbb5708

94 files changed

Lines changed: 992 additions & 646 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

stdlib/_winapi.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,3 +312,6 @@ if sys.platform == "win32":
312312
if sys.version_info >= (3, 12):
313313
def CopyFile2(existing_file_name: str, new_file_name: str, flags: int, progress_routine: int | None = None) -> int: ...
314314
def NeedCurrentDirectoryForExePath(exe_name: str, /) -> bool: ...
315+
316+
if sys.version_info >= (3, 15):
317+
def GetTickCount64() -> int: ...

stdlib/concurrent/futures/process.pyi

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,12 @@ class _ExecutorManagerThread(Thread):
146146
def wait_result_broken_or_wakeup(self) -> tuple[Any, bool, str]: ...
147147
def process_result_item(self, result_item: int | _ResultItem) -> None: ...
148148
def is_shutting_down(self) -> bool: ...
149-
def terminate_broken(self, cause: str) -> None: ...
149+
150+
if sys.version_info >= (3, 15):
151+
def terminate_broken(self, cause: str, bpe_message: str | None = None) -> None: ...
152+
else:
153+
def terminate_broken(self, cause: str) -> None: ...
154+
150155
def flag_executor_shutting_down(self) -> None: ...
151156
def shutdown_workers(self) -> None: ...
152157
def join_executor_internals(self) -> None: ...

stdlib/imaplib.pyi

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,20 @@ class IMAP4:
8484
if sys.version_info >= (3, 14):
8585
def idle(self, duration: float | None = None) -> Idler: ...
8686

87-
def list(self, directory: str = '""', pattern: str = "*") -> tuple[str, _AnyResponseData]: ...
87+
if sys.version_info >= (3, 15):
88+
def list(self, directory: str = "", pattern: str = "*") -> tuple[str, _AnyResponseData]: ...
89+
else:
90+
def list(self, directory: str = '""', pattern: str = "*") -> tuple[str, _AnyResponseData]: ...
91+
8892
def login(self, user: str, password: str) -> tuple[Literal["OK"], _list[bytes]]: ...
8993
def login_cram_md5(self, user: str, password: str) -> _CommandResults: ...
9094
def logout(self) -> tuple[str, _AnyResponseData]: ...
91-
def lsub(self, directory: str = '""', pattern: str = "*") -> _CommandResults: ...
95+
96+
if sys.version_info >= (3, 15):
97+
def lsub(self, directory: str = "", pattern: str = "*") -> _CommandResults: ...
98+
else:
99+
def lsub(self, directory: str = '""', pattern: str = "*") -> _CommandResults: ...
100+
92101
def myrights(self, mailbox: str) -> _CommandResults: ...
93102
def namespace(self) -> _CommandResults: ...
94103
def noop(self) -> tuple[str, _list[bytes]]: ...
@@ -98,7 +107,12 @@ class IMAP4:
98107
def search(self, charset: str | None, *criteria: str) -> _CommandResults: ...
99108
def select(self, mailbox: str = "INBOX", readonly: bool = False) -> tuple[str, _list[bytes | None]]: ...
100109
def setacl(self, mailbox: str, who: str, what: str) -> _CommandResults: ...
101-
def setannotation(self, *args: str) -> _CommandResults: ...
110+
111+
if sys.version_info >= (3, 15):
112+
def setannotation(self, mailbox: str | bytes, *args: str) -> _CommandResults: ...
113+
else:
114+
def setannotation(self, *args: str) -> _CommandResults: ...
115+
102116
def setquota(self, root: str, limits: str) -> _CommandResults: ...
103117
def sort(self, sort_criteria: str, charset: str, *search_criteria: str) -> _CommandResults: ...
104118
def starttls(self, ssl_context: Any | None = None) -> tuple[Literal["OK"], _list[None]]: ...

stubs/Authlib/METADATA.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
version = "1.6.11"
1+
version = "1.7.1"
22
upstream-repository = "https://github.com/authlib/authlib"
33
dependencies = ["cryptography"]
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
class AuthlibDeprecationWarning(DeprecationWarning): ...
22

3-
def deprecate(
4-
message: str, version: str | None = None, link_uid: str | None = None, link_file: str | None = None, stacklevel: int = 3
5-
) -> None: ...
3+
def deprecate(message: str, version: str | None = None, stacklevel: int = 3) -> None: ...

stubs/Authlib/authlib/integrations/base_client/async_openid.pyi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from authlib.integrations.base_client.sync_openid import _LogoutData
12
from authlib.oidc.core.claims import UserInfo
23

34
__all__ = ["AsyncOpenIDMixin"]
@@ -6,3 +7,6 @@ class AsyncOpenIDMixin:
67
async def fetch_jwk_set(self, force: bool = False): ...
78
async def userinfo(self, **kwargs) -> UserInfo: ...
89
async def parse_id_token(self, token, nonce, claims_options=None, claims_cls=None, leeway: int = 120) -> UserInfo: ...
10+
async def create_logout_url(
11+
self, post_logout_redirect_uri=None, id_token_hint=None, state=None, *, client_id=None, logout_hint=None, ui_locales=None
12+
) -> _LogoutData: ...
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
1+
from _typeshed import Incomplete
2+
from typing import TypedDict, type_check_only
3+
14
from authlib.oidc.core.claims import UserInfo
25

6+
@type_check_only
7+
class _LogoutData(TypedDict):
8+
url: str
9+
state: Incomplete
10+
311
class OpenIDMixin:
412
def fetch_jwk_set(self, force: bool = False): ...
513
def userinfo(self, **kwargs) -> UserInfo: ...
614
def parse_id_token(self, token, nonce, claims_options=None, claims_cls=None, leeway: int = 120) -> UserInfo | None: ...
7-
def create_load_key(self): ...
15+
def create_logout_url(
16+
self, post_logout_redirect_uri=None, id_token_hint=None, state=None, *, client_id=None, logout_hint=None, ui_locales=None
17+
) -> _LogoutData: ...

stubs/Authlib/authlib/integrations/django_client/apps.pyi

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1+
from _typeshed import Incomplete
2+
from typing import TypeAlias
3+
14
from ..base_client import BaseApp, OAuth1Mixin, OAuth2Mixin, OpenIDMixin
25
from ..requests_client import OAuth1Session, OAuth2Session
36

7+
_HttpResponseRedirect: TypeAlias = Incomplete # actual type is django.http.response.HttpResponseRedirect
8+
49
class DjangoAppMixin:
510
def save_authorize_data(self, request, **kwargs) -> None: ...
611
def authorize_redirect(self, request, redirect_uri=None, **kwargs): ...
@@ -11,4 +16,16 @@ class DjangoOAuth1App(DjangoAppMixin, OAuth1Mixin, BaseApp):
1116

1217
class DjangoOAuth2App(DjangoAppMixin, OAuth2Mixin, OpenIDMixin, BaseApp):
1318
client_cls = OAuth2Session
19+
def logout_redirect(
20+
self,
21+
request,
22+
post_logout_redirect_uri=None,
23+
id_token_hint=None,
24+
*,
25+
state=None,
26+
client_id=None,
27+
logout_hint=None,
28+
ui_locales=None,
29+
) -> _HttpResponseRedirect: ...
30+
def validate_logout_response(self, request): ...
1431
def authorize_access_token(self, request, **kwargs): ...

stubs/Authlib/authlib/integrations/flask_client/apps.pyi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1+
from _typeshed import Incomplete
2+
from typing import TypeAlias
3+
14
from ..base_client import BaseApp, OAuth1Mixin, OAuth2Mixin, OpenIDMixin
25
from ..requests_client import OAuth1Session, OAuth2Session
36

7+
_Response: TypeAlias = Incomplete # actual type is werkzeug.wrappers.Response
8+
49
class FlaskAppMixin:
510
@property
611
def token(self): ...
@@ -16,4 +21,8 @@ class FlaskOAuth1App(FlaskAppMixin, OAuth1Mixin, BaseApp):
1621

1722
class FlaskOAuth2App(FlaskAppMixin, OAuth2Mixin, OpenIDMixin, BaseApp):
1823
client_cls = OAuth2Session
24+
def logout_redirect(
25+
self, post_logout_redirect_uri=None, id_token_hint=None, *, state=None, client_id=None, logout_hint=None, ui_locales=None
26+
) -> _Response: ...
27+
def validate_logout_response(self): ...
1928
def authorize_access_token(self, **kwargs): ...
Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,33 @@
1+
from _typeshed import Incomplete
2+
from typing import TypeAlias
3+
14
from ..base_client import BaseApp
25
from ..base_client.async_app import AsyncOAuth1Mixin, AsyncOAuth2Mixin
36
from ..base_client.async_openid import AsyncOpenIDMixin
47
from ..httpx_client import AsyncOAuth1Client, AsyncOAuth2Client
58

9+
_RedirectResponse: TypeAlias = Incomplete # actual type is starlette.responses.RedirectResponse
10+
611
class StarletteAppMixin:
712
async def save_authorize_data(self, request, **kwargs) -> None: ...
8-
async def authorize_redirect(self, request, redirect_uri=None, **kwargs): ...
13+
async def authorize_redirect(self, request, redirect_uri=None, **kwargs) -> _RedirectResponse: ...
914

1015
class StarletteOAuth1App(StarletteAppMixin, AsyncOAuth1Mixin, BaseApp):
1116
client_cls = AsyncOAuth1Client
1217
async def authorize_access_token(self, request, **kwargs): ...
1318

1419
class StarletteOAuth2App(StarletteAppMixin, AsyncOAuth2Mixin, AsyncOpenIDMixin, BaseApp):
1520
client_cls = AsyncOAuth2Client
21+
async def logout_redirect(
22+
self,
23+
request,
24+
post_logout_redirect_uri=None,
25+
id_token_hint=None,
26+
*,
27+
state=None,
28+
client_id=None,
29+
logout_hint=None,
30+
ui_locales=None,
31+
) -> _RedirectResponse: ...
32+
async def validate_logout_response(self, request): ...
1633
async def authorize_access_token(self, request, **kwargs): ...

0 commit comments

Comments
 (0)