[encoding] Add win32_code_page_search_function (#14510)

Docs: https://docs.python.org/dev/library/codecs.html#encodings.win32_code_page_search_function
This commit is contained in:
Semyon Moroz
2025-08-02 18:47:10 +00:00
committed by GitHub
parent a2c6ac07e3
commit 01b9048c9f
2 changed files with 4 additions and 1 deletions
@@ -4,7 +4,6 @@
_winapi.COPY_FILE_DIRECTORY
compression.zlib.ZLIBNG_VERSION
encodings.win32_code_page_search_function
nt.readinto
pathlib.Path.group
pathlib.Path.owner
+4
View File
@@ -1,3 +1,4 @@
import sys
from codecs import CodecInfo
class CodecRegistryError(LookupError, SystemError): ...
@@ -5,5 +6,8 @@ class CodecRegistryError(LookupError, SystemError): ...
def normalize_encoding(encoding: str | bytes) -> str: ...
def search_function(encoding: str) -> CodecInfo | None: ...
if sys.version_info >= (3, 14) and sys.platform == "win32":
def win32_code_page_search_function(encoding: str) -> CodecInfo | None: ...
# Needed for submodules
def __getattr__(name: str): ... # incomplete module