Skip to content

Commit 00183cf

Browse files
authored
Merge branch 'main' into multiprocessing-updates-3.14
2 parents 6b2247b + b7bc6f3 commit 00183cf

File tree

3 files changed

+30
-19
lines changed

3 files changed

+30
-19
lines changed

stdlib/@tests/stubtest_allowlists/py314.txt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,6 @@
22
# TODO: New errors in Python 3.14 that need to be fixed or moved below
33
# ====================================================================
44

5-
asyncio.eager_task_factory
6-
asyncio.tasks.eager_task_factory
7-
compression.gzip.GzipFile.readinto
8-
compression.gzip.GzipFile.readinto
9-
compression.gzip.GzipFile.readinto1
10-
compression.gzip.GzipFile.readinto1
11-
compression.gzip.compress
12-
gzip.GzipFile.readinto
13-
gzip.GzipFile.readinto1
14-
gzip.compress
155
tarfile.TarFile.zstopen
166
tkinter.Event.__class_getitem__
177

stdlib/asyncio/tasks.pyi

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,25 @@ if sys.version_info >= (3, 12):
423423
else:
424424
def current_task(loop: AbstractEventLoop | None = None) -> Task[Any] | None: ...
425425

426+
if sys.version_info >= (3, 14):
427+
def eager_task_factory(
428+
loop: AbstractEventLoop | None,
429+
coro: _TaskCompatibleCoro[_T_co],
430+
*,
431+
name: str | None = None,
432+
context: Context | None = None,
433+
eager_start: bool = True,
434+
) -> Task[_T_co]: ...
435+
436+
elif sys.version_info >= (3, 12):
437+
def eager_task_factory(
438+
loop: AbstractEventLoop | None,
439+
coro: _TaskCompatibleCoro[_T_co],
440+
*,
441+
name: str | None = None,
442+
context: Context | None = None,
443+
) -> Task[_T_co]: ...
444+
426445
if sys.version_info >= (3, 12):
427446
_TaskT_co = TypeVar("_TaskT_co", bound=Task[Any], covariant=True)
428447

@@ -451,10 +470,3 @@ if sys.version_info >= (3, 12):
451470
def create_eager_task_factory(
452471
custom_task_constructor: _CustomTaskConstructor[_TaskT_co],
453472
) -> _EagerTaskFactoryType[_TaskT_co]: ...
454-
def eager_task_factory(
455-
loop: AbstractEventLoop | None,
456-
coro: _TaskCompatibleCoro[_T_co],
457-
*,
458-
name: str | None = None,
459-
context: Context | None = None,
460-
) -> Task[_T_co]: ...

stdlib/gzip.pyi

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import sys
22
import zlib
3-
from _typeshed import ReadableBuffer, SizedBuffer, StrOrBytesPath
3+
from _typeshed import ReadableBuffer, SizedBuffer, StrOrBytesPath, WriteableBuffer
44
from io import FileIO, TextIOWrapper
55
from typing import Final, Literal, Protocol, overload
66
from typing_extensions import TypeAlias
@@ -157,8 +157,17 @@ class GzipFile(BaseStream):
157157
def seek(self, offset: int, whence: int = 0) -> int: ...
158158
def readline(self, size: int | None = -1) -> bytes: ...
159159

160+
if sys.version_info >= (3, 14):
161+
def readinto(self, b: WriteableBuffer) -> int: ...
162+
def readinto1(self, b: WriteableBuffer) -> int: ...
163+
160164
class _GzipReader(DecompressReader):
161165
def __init__(self, fp: _ReadableFileobj) -> None: ...
162166

163-
def compress(data: SizedBuffer, compresslevel: int = 9, *, mtime: float | None = None) -> bytes: ...
167+
if sys.version_info >= (3, 14):
168+
def compress(data: SizedBuffer, compresslevel: int = 9, *, mtime: float = 0) -> bytes: ...
169+
170+
else:
171+
def compress(data: SizedBuffer, compresslevel: int = 9, *, mtime: float | None = None) -> bytes: ...
172+
164173
def decompress(data: ReadableBuffer) -> bytes: ...

0 commit comments

Comments
 (0)