importlib: improve bytes handling (#9070)

This commit is contained in:
Jelle Zijlstra
2022-11-03 04:00:24 -07:00
committed by GitHub
parent 82bf494534
commit 43631078f0
4 changed files with 38 additions and 33 deletions

View File

@@ -1,7 +1,6 @@
# https://pyinstaller.org/en/stable/hooks.html#module-PyInstaller.compat
from _typeshed import FileDescriptor, GenericPath, StrOrBytesPath
from collections.abc import Iterable
from importlib.abc import _Path
from types import ModuleType
from typing import AnyStr, overload
from typing_extensions import Literal, TypeAlias
@@ -69,7 +68,7 @@ def exec_python(*args: str, **kwargs: str | None) -> str: ...
def exec_python_rc(*args: str, **kwargs: str | None) -> int: ...
def expand_path(path: GenericPath[AnyStr]) -> AnyStr: ...
def getsitepackages(prefixes: Iterable[str] | None = ...) -> list[str]: ...
def importlib_load_source(name: str, pathname: _Path) -> ModuleType: ...
def importlib_load_source(name: str, pathname: str) -> ModuleType: ...
PY3_BASE_MODULES: set[str]
PURE_PYTHON_MODULE_TYPES: set[str]