8000 gzip: improve bytes handling by sobolevn · Pull Request #9037 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

gzip: improve bytes handling #9037

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 30, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update gzip.pyi
  • Loading branch information
sobolevn authored Oct 30, 2022
commit a47c9c9ea40bdca3417f78109a73f36c405f0edb
6 changes: 3 additions & 3 deletions stdlib/gzip.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import _compression
import sys
import zlib
from _typeshed import ReadableBuffer, StrOrBytesPath
from _typeshed import _BufferWithLen, ReadableBuffer, StrOrBytesPath
from io import FileIO
from typing import Any, Protocol, TextIO, overload
from typing_extensions import Literal, TypeAlias
Expand Down Expand Up @@ -159,9 +159,9 @@ class _GzipReader(_compression.DecompressReader):
def __init__(self, fp: _ReadableFileobj) -> None: ...

if sys.version_info >= (3, 8):
def compress(data: ReadableBuffer, compresslevel: int = ..., *, mtime: float | None = ...) -> bytes: ...
def compress(data: _BufferWithLen, compresslevel: int = ..., *, mtime: float | None = ...) -> bytes: ...

else:
def compress(data: ReadableBuffer, compresslevel: int = ...) -> bytes: ...
def compress(data: _BufferWithLen, compresslevel: int = ...) -> bytes: ...

def decompress(data: ReadableBuffer) -> bytes: ...
0