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
1 change: 0 additions & 1 deletion stubs/pyinstaller/@tests/stubtest_allowlist_win32.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
PyInstaller\.utils\.win32\.versioninfo\.\w+?
PyInstaller\.utils\.win32\.winmanifest\.\w+?
3 changes: 2 additions & 1 deletion stubs/pyinstaller/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version = "5.13.*"
version = "6.0.*"
upstream_repository = "https://github.com/pyinstaller/pyinstaller"
requires = ["types-setuptools"]
requires_python = ">=3.8"
17 changes: 9 additions & 8 deletions stubs/pyinstaller/PyInstaller/building/api.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ from PyInstaller.building.build_main import Analysis
from PyInstaller.building.datastruct import Target, _TOCTuple
from PyInstaller.building.splash import Splash
from PyInstaller.utils.win32.versioninfo import VSVersionInfo
from PyInstaller.utils.win32.winmanifest import Manifest

if sys.platform == "darwin":
_TargetArch: TypeAlias = Literal["x86_64", "arm64", "universal2"]
Expand All @@ -22,9 +21,9 @@ if sys.platform == "darwin":
_CodesignIdentityParam: TypeAlias = str | None
else:
_TargetArch: TypeAlias = None
_SuportedTargetArchParam: TypeAlias = object
_SuportedTargetArchParam: TypeAlias = Unused
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Supported?

_CodesignIdentity: TypeAlias = None
_CodesignIdentityParam: TypeAlias = object
_CodesignIdentityParam: TypeAlias = Unused

if sys.platform == "win32":
_Icon: TypeAlias = list[StrPath] | str
Expand All @@ -34,18 +33,18 @@ elif sys.platform == "darwin":
_IconParam: TypeAlias = StrPath | list[StrPath] | None
else:
_Icon: TypeAlias = None
_IconParam: TypeAlias = object
_IconParam: TypeAlias = Unused

if sys.platform == "win32":
_VersionSrc: TypeAlias = VSVersionInfo | None
_VersionParam: TypeAlias = VSVersionInfo | StrOrBytesPath | None
_Manifest: TypeAlias = Manifest
_ManifestParam: TypeAlias = Manifest | None
_Manifest: TypeAlias = bytes
_ManifestParam: TypeAlias = str | None
else:
_VersionSrc: TypeAlias = None
_VersionParam: TypeAlias = object
_VersionParam: TypeAlias = Unused
_Manifest: TypeAlias = None
_ManifestParam: TypeAlias = object
_ManifestParam: TypeAlias = Unused

class PYZ(Target):
name: str
Expand All @@ -60,6 +59,7 @@ class PKG(Target):
xformdict: ClassVar[dict[str, str]]
toc: list[_TOCTuple]
cdict: Mapping[str, bool]
python_lib_name: str
name: str
exclude_binaries: bool
strip_binaries: bool
Expand All @@ -71,6 +71,7 @@ class PKG(Target):
def __init__(
self,
toc: Iterable[_TOCTuple],
python_lib_name: str,
name: str | None = None,
cdict: Mapping[str, bool] | None = None,
exclude_binaries: bool = False,
Expand Down
3 changes: 2 additions & 1 deletion stubs/pyinstaller/PyInstaller/building/datastruct.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ from collections.abc import Iterable, Sequence
from typing import ClassVar
from typing_extensions import Literal, LiteralString, Self, SupportsIndex, TypeAlias

_TypeCode: TypeAlias = Literal["DATA", "BINARY", "EXTENSION", "OPTION"]
_TypeCode: TypeAlias = Literal["DEPENDENCY", "SYMLINK", "DATA", "BINARY", "EXECUTABLE", "EXTENSION", "OPTION"]
_TOCTuple: TypeAlias = tuple[str, str | None, _TypeCode | None]

class TOC(list[_TOCTuple]):
Expand Down Expand Up @@ -44,3 +44,4 @@ class Tree(Target, list[_TOCTuple]):

def normalize_toc(toc: Iterable[_TOCTuple]) -> list[_TOCTuple]: ...
def normalize_pyz_toc(toc: Iterable[_TOCTuple]) -> list[_TOCTuple]: ...
def toc_process_symbolic_links(toc: Iterable[_TOCTuple]) -> list[_TOCTuple]: ...
4 changes: 2 additions & 2 deletions stubs/pyinstaller/PyInstaller/compat.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ strict_collect_mode: bool
is_64bits: Final[bool]
is_py35: Final = True
is_py36: Final = True
is_py37: Final[bool]
is_py38: Final[bool]
is_py37: Final = True
is_py38: Final = True
is_py39: Final[bool]
is_py310: Final[bool]
is_py311: Final[bool]
Expand Down
13 changes: 4 additions & 9 deletions stubs/pyinstaller/PyInstaller/utils/hooks/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ from collections.abc import Callable, Iterable
from typing import Any
from typing_extensions import Final, Literal

import pkg_resources
from PyInstaller import HOMEPATH as HOMEPATH
from PyInstaller.depend.imphookapi import PostGraphAPI
from PyInstaller.utils.hooks import conda
from PyInstaller.utils.hooks.win32 import get_pywin32_module_file_attribute as get_pywin32_module_file_attribute

conda_support = conda

Expand All @@ -27,11 +25,9 @@ def remove_file_extension(filename: str) -> str: ...
def can_import_module(module_name: str) -> bool: ...
def get_module_attribute(module_name: str, attr_name: str) -> Any: ...
def get_module_file_attribute(package: str) -> str | None: ...
def is_module_satisfies(
requirements: Iterable[str] | pkg_resources.Requirement,
version: str | pkg_resources.Distribution | None = None,
version_attr: str = "__version__",
) -> bool: ...
def get_pywin32_module_file_attribute(module_name: str) -> str | None: ...
def check_requirement(requirement: str) -> bool: ...
def is_module_satisfies(requirements: str, version: None = None, version_attr: None = None) -> bool: ...
def is_package(module_name: str) -> bool: ...
def get_all_package_paths(package: str) -> list[str]: ...
def package_base_path(package_path: str, package: str) -> str: ...
Expand All @@ -58,11 +54,10 @@ def collect_system_data_files(
) -> list[tuple[str, str]]: ...
def copy_metadata(package_name: str, recursive: bool = False) -> list[tuple[str, str]]: ...
def get_installer(module: str) -> str | None: ...
def requirements_for_package(package_name: str) -> list[str]: ...
def collect_all(
package_name: str,
include_py_files: bool = True,
filter_submodules: Callable[[str], bool] | None = None,
filter_submodules: Callable[[str], bool] = ...,
exclude_datas: Iterable[str] | None = None,
include_datas: Iterable[str] | None = None,
on_error: Literal["ignore", "warn once", "warn", "raise"] = "warn once",
Expand Down
1 change: 0 additions & 1 deletion stubs/pyinstaller/PyInstaller/utils/hooks/win32.pyi

This file was deleted.

127 changes: 0 additions & 127 deletions stubs/pyinstaller/PyInstaller/utils/win32/winmanifest.pyi

This file was deleted.