Skip to content

Commit 35172c7

Browse files
Stdlib: add some very large integer defaults (#9651)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
1 parent 8000fbd commit 35172c7

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

stdlib/asyncio/windows_events.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ if sys.platform == "win32":
4242
) -> list[PipeServer]: ...
4343

4444
class IocpProactor:
45-
def __init__(self, concurrency: int = ...) -> None: ...
45+
def __init__(self, concurrency: int = 0xFFFFFFFF) -> None: ...
4646
def __del__(self) -> None: ...
4747
def set_loop(self, loop: events.AbstractEventLoop) -> None: ...
4848
def select(self, timeout: int | None = None) -> list[futures.Future[Any]]: ...

stdlib/lib2to3/pytree.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class NodePattern(BasePattern):
8383
class WildcardPattern(BasePattern):
8484
min: int
8585
max: int
86-
def __init__(self, content: str | None = None, min: int = 0, max: int = ..., name: str | None = None) -> None: ...
86+
def __init__(self, content: str | None = None, min: int = 0, max: int = 0x7FFFFFFF, name: str | None = None) -> None: ...
8787

8888
class NegatedPattern(BasePattern):
8989
def __init__(self, content: str | None = None) -> None: ...

stdlib/smtpd.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class SMTPChannel(asynchat.async_chat):
4141
server: SMTPServer,
4242
conn: socket.socket,
4343
addr: Any,
44-
data_size_limit: int = ...,
44+
data_size_limit: int = 33554432,
4545
map: asyncore._MapType | None = None,
4646
enable_SMTPUTF8: bool = False,
4747
decode_data: bool = False,
@@ -71,7 +71,7 @@ class SMTPServer(asyncore.dispatcher):
7171
self,
7272
localaddr: _Address,
7373
remoteaddr: _Address,
74-
data_size_limit: int = ...,
74+
data_size_limit: int = 33554432,
7575
map: asyncore._MapType | None = None,
7676
enable_SMTPUTF8: bool = False,
7777
decode_data: bool = False,

stdlib/xmlrpc/client.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def loads(
204204
data: str, use_datetime: bool = False, use_builtin_types: bool = False
205205
) -> tuple[tuple[_Marshallable, ...], str | None]: ...
206206
def gzip_encode(data: ReadableBuffer) -> bytes: ... # undocumented
207-
def gzip_decode(data: ReadableBuffer, max_decode: int = ...) -> bytes: ... # undocumented
207+
def gzip_decode(data: ReadableBuffer, max_decode: int = 20971520) -> bytes: ... # undocumented
208208

209209
class GzipDecodedResponse(gzip.GzipFile): # undocumented
210210
io: BytesIO

0 commit comments

Comments
 (0)