|
1 | 1 | import sys
|
2 | 2 | import zlib
|
3 |
| -from _typeshed import ReadableBuffer, SizedBuffer, StrOrBytesPath |
| 3 | +from _typeshed import ReadableBuffer, SizedBuffer, StrOrBytesPath, WriteableBuffer |
4 | 4 | from io import FileIO, TextIOWrapper
|
5 | 5 | from typing import Final, Literal, Protocol, overload
|
6 | 6 | from typing_extensions import TypeAlias
|
@@ -157,8 +157,17 @@ class GzipFile(BaseStream):
|
157 | 157 | def seek(self, offset: int, whence: int = 0) -> int: ...
|
158 | 158 | def readline(self, size: int | None = -1) -> bytes: ...
|
159 | 159 |
|
| 160 | + if sys.version_info >= (3, 14): |
| 161 | + def readinto(self, b: WriteableBuffer) -> int: ... |
| 162 | + def readinto1(self, b: WriteableBuffer) -> int: ... |
| 163 | + |
160 | 164 | class _GzipReader(DecompressReader):
|
161 | 165 | def __init__(self, fp: _ReadableFileobj) -> None: ...
|
162 | 166 |
|
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 | + |
164 | 173 | def decompress(data: ReadableBuffer) -> bytes: ...
|
0 commit comments