diff --git a/stubs/setuptools/@tests/stubtest_allowlist.txt b/stubs/setuptools/@tests/stubtest_allowlist.txt index f47062da7093..227678afa028 100644 --- a/stubs/setuptools/@tests/stubtest_allowlist.txt +++ b/stubs/setuptools/@tests/stubtest_allowlist.txt @@ -75,6 +75,7 @@ setuptools._distutils.sysconfig.parse_config_h setuptools._distutils.sysconfig.parse_makefile setuptools._distutils.sysconfig.project_base setuptools._distutils.sysconfig.python_build +setuptools._distutils.util.is_freethreaded setuptools._distutils.util.MACOSX_VERSION_VAR # Missing submodules from setuptools._distutils @@ -89,7 +90,6 @@ setuptools._distutils.command.config setuptools._distutils.command.install_data setuptools._distutils.command.install_egg_info setuptools._distutils.command.install_headers -setuptools._distutils.compat.py38 setuptools._distutils.compat.py39 setuptools._distutils.core setuptools._distutils.cygwinccompiler diff --git a/stubs/setuptools/METADATA.toml b/stubs/setuptools/METADATA.toml index 8b7ea28be095..2c4861bf93f4 100644 --- a/stubs/setuptools/METADATA.toml +++ b/stubs/setuptools/METADATA.toml @@ -1,4 +1,4 @@ -version = "75.6.*" +version = "75.8.*" upstream_repository = "https://github.com/pypa/setuptools" extra_description = """\ If using `setuptools >= 71.1` *only* for `pkg_resources`, diff --git a/stubs/setuptools/setuptools/_distutils/cmd.pyi b/stubs/setuptools/setuptools/_distutils/cmd.pyi index 5fb3f42316bf..2c22e460989c 100644 --- a/stubs/setuptools/setuptools/_distutils/cmd.pyi +++ b/stubs/setuptools/setuptools/_distutils/cmd.pyi @@ -16,6 +16,11 @@ class Command: distribution: Distribution # Any to work around variance issues sub_commands: ClassVar[list[tuple[str, Callable[[Any], bool] | None]]] + user_options: ClassVar[ + # Specifying both because list is invariant. Avoids mypy override assignment issues + list[tuple[str, str, str]] + | list[tuple[str, str | None, str]] + ] def __init__(self, dist: Distribution) -> None: ... def ensure_finalized(self) -> None: ... @abstractmethod diff --git a/stubs/setuptools/setuptools/_distutils/command/bdist.pyi b/stubs/setuptools/setuptools/_distutils/command/bdist.pyi index 0d699298314b..95944c0c9750 100644 --- a/stubs/setuptools/setuptools/_distutils/command/bdist.pyi +++ b/stubs/setuptools/setuptools/_distutils/command/bdist.pyi @@ -13,7 +13,7 @@ class ListCompat(dict[str, tuple[str, str]]): class bdist(Command): description: ClassVar[str] - user_options: ClassVar[list[tuple[str, str | None, str | None]]] + user_options: ClassVar[list[tuple[str, str | None, str]]] boolean_options: ClassVar[list[str]] help_options: ClassVar[list[tuple[str, str | None, str, Callable[[], Unused]]]] no_format_option: ClassVar[tuple[str, ...]] diff --git a/stubs/setuptools/setuptools/_distutils/command/install_data.pyi b/stubs/setuptools/setuptools/_distutils/command/install_data.pyi index b18b100068b4..dd9abc9af594 100644 --- a/stubs/setuptools/setuptools/_distutils/command/install_data.pyi +++ b/stubs/setuptools/setuptools/_distutils/command/install_data.pyi @@ -1,10 +1,11 @@ from _typeshed import Incomplete +from typing import ClassVar from ..cmd import Command class install_data(Command): description: str - user_options: Incomplete + user_options: ClassVar[list[tuple[str, str | None, str]]] boolean_options: Incomplete install_dir: Incomplete outfiles: Incomplete diff --git a/stubs/setuptools/setuptools/_distutils/dist.pyi b/stubs/setuptools/setuptools/_distutils/dist.pyi index 969573e48b32..ab09b24d7f02 100644 --- a/stubs/setuptools/setuptools/_distutils/dist.pyi +++ b/stubs/setuptools/setuptools/_distutils/dist.pyi @@ -152,24 +152,24 @@ class Distribution: def get_obsoletes(self) -> list[str]: ... # Default attributes generated in __init__ from self.display_option_names - help_commands: bool | Literal[0] - name: str | Literal[0] - version: str | Literal[0] - fullname: str | Literal[0] - author: str | Literal[0] - author_email: str | Literal[0] - maintainer: str | Literal[0] - maintainer_email: str | Literal[0] - contact: str | Literal[0] - contact_email: str | Literal[0] - url: str | Literal[0] - license: str | Literal[0] - licence: str | Literal[0] - description: str | Literal[0] - long_description: str | Literal[0] - platforms: str | list[str] | Literal[0] - classifiers: str | list[str] | Literal[0] - keywords: str | list[str] | Literal[0] - provides: list[str] | Literal[0] - requires: list[str] | Literal[0] - obsoletes: list[str] | Literal[0] + help_commands: bool + name: str | Literal[False] + version: str | Literal[False] + fullname: str | Literal[False] + author: str | Literal[False] + author_email: str | Literal[False] + maintainer: str | Literal[False] + maintainer_email: str | Literal[False] + contact: str | Literal[False] + contact_email: str | Literal[False] + url: str | Literal[False] + license: str | Literal[False] + licence: str | Literal[False] + description: str | Literal[False] + long_description: str | Literal[False] + platforms: str | list[str] | Literal[False] + classifiers: str | list[str] | Literal[False] + keywords: str | list[str] | Literal[False] + provides: list[str] | Literal[False] + requires: list[str] | Literal[False] + obsoletes: list[str] | Literal[False] diff --git a/stubs/setuptools/setuptools/_distutils/extension.pyi b/stubs/setuptools/setuptools/_distutils/extension.pyi index 970c70a64437..1aee26696a94 100644 --- a/stubs/setuptools/setuptools/_distutils/extension.pyi +++ b/stubs/setuptools/setuptools/_distutils/extension.pyi @@ -1,10 +1,9 @@ from _typeshed import StrPath -from os import PathLike -from pathlib import Path +from collections.abc import Iterable class Extension: name: str - sources: list[str] | list[StrPath] + sources: list[str] include_dirs: list[str] define_macros: list[tuple[str, str | None]] undef_macros: list[str] @@ -22,7 +21,7 @@ class Extension: def __init__( self, name: str, - sources: list[str] | list[PathLike[str]] | list[Path] | list[StrPath], + sources: Iterable[StrPath], include_dirs: list[str] | None = None, define_macros: list[tuple[str, str | None]] | None = None, undef_macros: list[str] | None = None, diff --git a/stubs/setuptools/setuptools/extension.pyi b/stubs/setuptools/setuptools/extension.pyi index 300a51b6a7b0..0f9c99214ad2 100644 --- a/stubs/setuptools/setuptools/extension.pyi +++ b/stubs/setuptools/setuptools/extension.pyi @@ -1,6 +1,5 @@ from _typeshed import StrPath -from os import PathLike -from pathlib import Path +from collections.abc import Iterable from ._distutils.extension import Extension as _Extension @@ -11,7 +10,7 @@ class Extension(_Extension): def __init__( self, name: str, - sources: list[str] | list[PathLike[str]] | list[Path] | list[StrPath], + sources: Iterable[StrPath], include_dirs: list[str] | None = None, define_macros: list[tuple[str, str | None]] | None = None, undef_macros: list[str] | None = None,