Update gzip for 3.14 (#14237)

* Update gzip for 3.14

* [pre-commit.ci] auto fixes from pre-commit.com hooks

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
Max Muoto
2025-06-07 22:39:51 -04:00
committed by GitHub
parent bacccd0972
commit b7bc6f32cf
2 changed files with 11 additions and 10 deletions
+11 -2
View File
@@ -1,6 +1,6 @@
import sys
import zlib
from _typeshed import ReadableBuffer, SizedBuffer, StrOrBytesPath
from _typeshed import ReadableBuffer, SizedBuffer, StrOrBytesPath, WriteableBuffer
from io import FileIO, TextIOWrapper
from typing import Final, Literal, Protocol, overload
from typing_extensions import TypeAlias
@@ -157,8 +157,17 @@ class GzipFile(BaseStream):
def seek(self, offset: int, whence: int = 0) -> int: ...
def readline(self, size: int | None = -1) -> bytes: ...
if sys.version_info >= (3, 14):
def readinto(self, b: WriteableBuffer) -> int: ...
def readinto1(self, b: WriteableBuffer) -> int: ...
class _GzipReader(DecompressReader):
def __init__(self, fp: _ReadableFileobj) -> None: ...
def compress(data: SizedBuffer, compresslevel: int = 9, *, mtime: float | None = None) -> bytes: ...
if sys.version_info >= (3, 14):
def compress(data: SizedBuffer, compresslevel: int = 9, *, mtime: float = 0) -> bytes: ...
else:
def compress(data: SizedBuffer, compresslevel: int = 9, *, mtime: float | None = None) -> bytes: ...
def decompress(data: ReadableBuffer) -> bytes: ...