diff --git a/stdlib/codecs.pyi b/stdlib/codecs.pyi index 7172d0074..ab83caf18 100644 --- a/stdlib/codecs.pyi +++ b/stdlib/codecs.pyi @@ -1,3 +1,4 @@ +import sys import types from abc import abstractmethod from typing import ( @@ -122,6 +123,9 @@ def EncodedFile(file: IO[bytes], data_encoding: str, file_encoding: Optional[str def iterencode(iterator: Iterable[str], encoding: str, errors: str = ...) -> Generator[bytes, None, None]: ... def iterdecode(iterator: Iterable[bytes], encoding: str, errors: str = ...) -> Generator[str, None, None]: ... +if sys.version_info >= (3, 10): + def unregister(__search_function: Callable[[str], Optional[CodecInfo]]) -> None: ... + BOM: bytes BOM_BE: bytes BOM_LE: bytes