Skip to content

Commit 15cdc20

Browse files
authored
Fix stdlib stubtest for Python 3.11.8 and 3.12.2 (#11384)
Fix stubtest for Python 3.11.8 and 3.12.2
1 parent 4eeb0e6 commit 15cdc20

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

stdlib/asyncio/sslproto.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,10 @@ class SSLProtocol(_SSLProtocolBase):
156156
def _check_handshake_timeout(self) -> None: ...
157157
def _on_handshake_complete(self, handshake_exc: BaseException | None) -> None: ...
158158
def _fatal_error(self, exc: BaseException, message: str = "Fatal error on transport") -> None: ...
159-
def _abort(self) -> None: ...
160159
if sys.version_info >= (3, 11):
160+
def _abort(self, exc: BaseException | None) -> None: ...
161161
def get_buffer(self, n: int) -> memoryview: ...
162162
else:
163+
def _abort(self) -> None: ...
163164
def _finalize(self) -> None: ...
164165
def _process_write_backlog(self) -> None: ...

tests/stubtest_allowlists/py312.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,7 @@ typing.SupportsAbs.__type_params__
124124
typing.SupportsRound.__type_params__
125125
typing_extensions.SupportsAbs.__type_params__
126126
typing_extensions.SupportsRound.__type_params__
127+
128+
# Dunder that exists on all runtime-checkable protocols on py312+
129+
# TODO teach stubtest about this so we don't have to allowlist it
130+
.+\.__non_callable_proto_members__

0 commit comments

Comments
 (0)