Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions stdlib/binascii.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import sys
from _typeshed import ReadableBuffer
from typing import TypeAlias
from typing import SupportsIndex, TypeAlias
from typing_extensions import deprecated

# Many functions in binascii accept buffer objects
Expand Down Expand Up @@ -85,8 +85,8 @@ if sys.version_info < (3, 11):
@deprecated("Deprecated since Python 3.9; removed in Python 3.11.")
def b2a_hqx(data: ReadableBuffer, /) -> bytes: ...

def crc_hqx(data: ReadableBuffer, crc: int, /) -> int: ...
def crc32(data: ReadableBuffer, crc: int = 0, /) -> int: ...
def crc_hqx(data: ReadableBuffer, crc: SupportsIndex, /) -> int: ...
def crc32(data: ReadableBuffer, crc: SupportsIndex = 0, /) -> int: ...
def b2a_hex(data: ReadableBuffer, sep: str | bytes = ..., bytes_per_sep: int = 1) -> bytes: ...
def hexlify(data: ReadableBuffer, sep: str | bytes = ..., bytes_per_sep: int = 1) -> bytes: ...

Expand Down
6 changes: 3 additions & 3 deletions stdlib/zlib.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import sys
from _typeshed import ReadableBuffer
from typing import Any, Final, final, type_check_only
from typing import Any, Final, SupportsIndex, final, type_check_only
from typing_extensions import Self

DEFLATED: Final = 8
Expand Down Expand Up @@ -58,7 +58,7 @@ class _Decompress:
def flush(self, length: int = 16384, /) -> bytes: ...
def copy(self) -> _Decompress: ...

def adler32(data: ReadableBuffer, value: int = 1, /) -> int: ...
def adler32(data: ReadableBuffer, value: SupportsIndex = 1, /) -> int: ...

if sys.version_info >= (3, 15):
def adler32_combine(adler1: int, adler2: int, len2: int, /) -> int: ...
Expand All @@ -72,7 +72,7 @@ else:
def compressobj(
level: int = -1, method: int = 8, wbits: int = 15, memLevel: int = 8, strategy: int = 0, zdict: ReadableBuffer | None = None
) -> _Compress: ...
def crc32(data: ReadableBuffer, value: int = 0, /) -> int: ...
def crc32(data: ReadableBuffer, value: SupportsIndex = 0, /) -> int: ...

if sys.version_info >= (3, 15):
def crc32_combine(crc1: int, crc2: int, len2: int, /) -> int: ...
Expand Down
Loading