diff --git a/stubs/setuptools/METADATA.toml b/stubs/setuptools/METADATA.toml index 3000300b6..cda6196e2 100644 --- a/stubs/setuptools/METADATA.toml +++ b/stubs/setuptools/METADATA.toml @@ -1,10 +1,9 @@ -version = "80.4.*" +version = "80.7.*" upstream_repository = "https://github.com/pypa/setuptools" extra_description = """\ Given that `pkg_resources` is typed since `setuptools >= 71.1`, \ it is no longer included with `types-setuptools`. """ -requires = ["setuptools"] # For pkg_resources [tool.stubtest] # darwin is equivalent to linux for OS-specific methods diff --git a/stubs/setuptools/setuptools/__init__.pyi b/stubs/setuptools/setuptools/__init__.pyi index 815e1336c..d8d0b22c3 100644 --- a/stubs/setuptools/setuptools/__init__.pyi +++ b/stubs/setuptools/setuptools/__init__.pyi @@ -109,7 +109,6 @@ class Command(_Command): distribution: Distribution # Any: Dynamic command subclass attributes def __init__(self, dist: Distribution, **kw: Any) -> None: ... - def ensure_string_list(self, option: str) -> None: ... # Note: Commands that setuptools doesn't re-expose are considered deprecated (they must be imported from distutils directly) # So we're not listing them here. This list comes directly from the setuptools/command folder. Minus the test command. @overload # type: ignore[override] diff --git a/stubs/setuptools/setuptools/command/bdist_egg.pyi b/stubs/setuptools/setuptools/command/bdist_egg.pyi index 762976ad5..264052cda 100644 --- a/stubs/setuptools/setuptools/command/bdist_egg.pyi +++ b/stubs/setuptools/setuptools/command/bdist_egg.pyi @@ -17,7 +17,7 @@ class bdist_egg(Command): user_options: ClassVar[list[tuple[str, str | None, str]]] boolean_options: ClassVar[list[str]] bdist_dir: Incomplete - plat_name: Incomplete + plat_name: str keep_temp: bool dist_dir: Incomplete skip_build: bool diff --git a/stubs/setuptools/setuptools/command/build_ext.pyi b/stubs/setuptools/setuptools/command/build_ext.pyi index 6f4e74424..85c477b03 100644 --- a/stubs/setuptools/setuptools/command/build_ext.pyi +++ b/stubs/setuptools/setuptools/command/build_ext.pyi @@ -9,7 +9,6 @@ have_rtld: bool use_stubs: bool libtype: str -def if_dl(s): ... def get_abi3_suffix(): ... class build_ext(_build_ext): diff --git a/stubs/setuptools/setuptools/dist.pyi b/stubs/setuptools/setuptools/dist.pyi index 4cdbdec2a..fb04a7b41 100644 --- a/stubs/setuptools/setuptools/dist.pyi +++ b/stubs/setuptools/setuptools/dist.pyi @@ -1,5 +1,6 @@ from _typeshed import Incomplete, StrPath from collections.abc import Iterable, Iterator, MutableMapping +from importlib import metadata from typing import Literal, TypeVar, overload from . import Command, SetuptoolsDeprecationWarning @@ -39,7 +40,7 @@ class Distribution(_Distribution): setup_requires: list[str] def __init__(self, attrs: MutableMapping[str, Incomplete] | None = None) -> None: ... def parse_config_files(self, filenames: Iterable[StrPath] | None = None, ignore_option_errors: bool = False) -> None: ... - def fetch_build_eggs(self, requires: str | Iterable[str]): ... + def fetch_build_eggs(self, requires: str | Iterable[str]) -> list[metadata.Distribution]: ... def get_egg_cache_dir(self) -> str: ... def fetch_build_egg(self, req): ... # NOTE: Commands that setuptools doesn't re-expose are considered deprecated (they must be imported from distutils directly) diff --git a/stubs/setuptools/setuptools/installer.pyi b/stubs/setuptools/setuptools/installer.pyi index 0d3eaf68c..b53a7f6fc 100644 --- a/stubs/setuptools/setuptools/installer.pyi +++ b/stubs/setuptools/setuptools/installer.pyi @@ -1,2 +1,16 @@ -def fetch_build_egg(dist, req): ... -def strip_marker(req): ... +from importlib import metadata +from typing import Any +from typing_extensions import deprecated + +@deprecated( + """ + `setuptools.installer` and `fetch_build_eggs` are deprecated. + Requirements should be satisfied by a PEP 517 installer. + If you are using pip, you can try `pip install --use-pep517`. + """ +) +def fetch_build_egg(dist, req) -> metadata.Distribution | metadata.PathDistribution: ... + +# Returns packaging.requirements.Requirement +# But since this module is deprecated, we avoid declaring a dependency on packaging +def strip_marker(req) -> Any: ...