Skip to content

Commit fa3ab94

Browse files
authored
Bump setuptools to 73.0.* (#12564)
1 parent 406d5bc commit fa3ab94

18 files changed

+56
-25
lines changed

stubs/setuptools/METADATA.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "72.2.*"
1+
version = "73.0.*"
22
upstream_repository = "https://github.com/pypa/setuptools"
33
extra_description = """\
44
If using `setuptools >= 71.1` *only* for `pkg_resources`,

stubs/setuptools/pkg_resources/__init__.pyi

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ from ._vendored_packaging import requirements as _packaging_requirements, versio
2020
_T = TypeVar("_T")
2121
_DistributionT = TypeVar("_DistributionT", bound=Distribution)
2222
_NestedStr: TypeAlias = str | Iterable[_NestedStr]
23-
_InstallerTypeT: TypeAlias = Callable[[Requirement], _DistributionT] # noqa: Y043
23+
_StrictInstallerType: TypeAlias = Callable[[Requirement], _DistributionT]
2424
_InstallerType: TypeAlias = Callable[[Requirement], Distribution | None]
2525
_PkgReqType: TypeAlias = str | Requirement
2626
_EPDistType: TypeAlias = Distribution | _PkgReqType
@@ -128,7 +128,7 @@ class WorkingSet:
128128
self,
129129
requirements: Iterable[Requirement],
130130
env: Environment | None,
131-
installer: _InstallerTypeT[_DistributionT],
131+
installer: _StrictInstallerType[_DistributionT],
132132
replace_conflicting: bool = False,
133133
extras: tuple[str, ...] | None = None,
134134
) -> list[_DistributionT]: ...
@@ -138,7 +138,7 @@ class WorkingSet:
138138
requirements: Iterable[Requirement],
139139
env: Environment | None = None,
140140
*,
141-
installer: _InstallerTypeT[_DistributionT],
141+
installer: _StrictInstallerType[_DistributionT],
142142
replace_conflicting: bool = False,
143143
extras: tuple[str, ...] | None = None,
144144
) -> list[_DistributionT]: ...
@@ -156,7 +156,7 @@ class WorkingSet:
156156
self,
157157
plugin_env: Environment,
158158
full_env: Environment | None,
159-
installer: _InstallerTypeT[_DistributionT],
159+
installer: _StrictInstallerType[_DistributionT],
160160
fallback: bool = True,
161161
) -> tuple[list[_DistributionT], dict[Distribution, Exception]]: ...
162162
@overload
@@ -165,7 +165,7 @@ class WorkingSet:
165165
plugin_env: Environment,
166166
full_env: Environment | None = None,
167167
*,
168-
installer: _InstallerTypeT[_DistributionT],
168+
installer: _StrictInstallerType[_DistributionT],
169169
fallback: bool = True,
170170
) -> tuple[list[_DistributionT], dict[Distribution, Exception]]: ...
171171
@overload
@@ -193,7 +193,7 @@ class Environment:
193193
self,
194194
req: Requirement,
195195
working_set: WorkingSet,
196-
installer: _InstallerTypeT[_DistributionT],
196+
installer: _StrictInstallerType[_DistributionT],
197197
replace_conflicting: bool = False,
198198
) -> _DistributionT: ...
199199
@overload
@@ -205,7 +205,7 @@ class Environment:
205205
replace_conflicting: bool = False,
206206
) -> Distribution | None: ...
207207
@overload
208-
def obtain(self, requirement: Requirement, installer: _InstallerTypeT[_DistributionT]) -> _DistributionT: ...
208+
def obtain(self, requirement: Requirement, installer: _StrictInstallerType[_DistributionT]) -> _DistributionT: ...
209209
@overload
210210
def obtain(self, requirement: Requirement, installer: Callable[[Requirement], None] | None = None) -> None: ...
211211
@overload
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
from setuptools.dist import Distribution
2+
13
from .._distutils.command import bdist_rpm as orig
24

35
class bdist_rpm(orig.bdist_rpm):
6+
distribution: Distribution # override distutils.dist.Distribution with setuptools.dist.Distribution
47
def run(self) -> None: ...

stubs/setuptools/setuptools/command/bdist_wheel.pyi

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
from _typeshed import Incomplete, Unused
1+
from _typeshed import ExcInfo, Incomplete, Unused
22
from collections.abc import Callable, Iterable
3-
from types import TracebackType
43
from typing import ClassVar, Final, Literal
54

65
from setuptools import Command
@@ -18,10 +17,8 @@ def get_flag(var: str, fallback: bool, expected: bool = True, warn: bool = True)
1817
def get_abi_tag() -> str | None: ...
1918
def safer_name(name: str) -> str: ...
2019
def safer_version(version: str) -> str: ...
21-
def remove_readonly(
22-
func: Callable[[str], Unused], path: str, excinfo: tuple[type[Exception], Exception, TracebackType]
23-
) -> None: ...
24-
def remove_readonly_exc(func: Callable[[str], Unused], path: str, exc: Exception) -> None: ...
20+
def remove_readonly(func: Callable[[str], Unused], path: str, excinfo: ExcInfo) -> None: ...
21+
def remove_readonly_exc(func: Callable[[str], Unused], path: str, exc: BaseException) -> None: ...
2522

2623
class bdist_wheel(Command):
2724
description: ClassVar[str]
@@ -30,20 +27,20 @@ class bdist_wheel(Command):
3027
boolean_options: ClassVar[list[str]]
3128

3229
bdist_dir: str | None
33-
data_dir: Incomplete | None
30+
data_dir: str | None
3431
plat_name: str | None
35-
plat_tag: Incomplete | None
32+
plat_tag: str | None
3633
format: str
3734
keep_temp: bool
3835
dist_dir: str | None
39-
egginfo_dir: Incomplete | None
36+
egginfo_dir: str | None
4037
root_is_pure: bool | None
41-
skip_build: Incomplete | None
38+
skip_build: bool
4239
relative: bool
4340
owner: Incomplete | None
4441
group: Incomplete | None
4542
universal: bool
46-
compression: str | int
43+
compression: int | str
4744
python_tag: str
4845
build_number: str | None
4946
py_limited_api: str | Literal[False]

stubs/setuptools/setuptools/command/build.pyi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
from typing import Protocol
22

3+
from setuptools.dist import Distribution
4+
35
from .._distutils.command.build import build as _build
46

5-
class build(_build): ...
7+
class build(_build):
8+
distribution: Distribution # override distutils.dist.Distribution with setuptools.dist.Distribution
69

710
class SubCommand(Protocol):
811
editable_mode: bool
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1+
from setuptools.dist import Distribution
2+
13
from .._distutils.command import build_clib as orig
24

35
class build_clib(orig.build_clib):
6+
distribution: Distribution # override distutils.dist.Distribution with setuptools.dist.Distribution
7+
48
def build_libraries(self, libraries) -> None: ...

stubs/setuptools/setuptools/command/build_ext.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
from _typeshed import Incomplete
22
from typing import ClassVar
33

4+
from setuptools.dist import Distribution
5+
46
from .._distutils.command.build_ext import build_ext as _build_ext
57

68
have_rtld: bool
@@ -11,6 +13,7 @@ def if_dl(s): ...
1113
def get_abi3_suffix(): ...
1214

1315
class build_ext(_build_ext):
16+
distribution: Distribution # override distutils.dist.Distribution with setuptools.dist.Distribution
1417
editable_mode: ClassVar[bool]
1518
inplace: bool
1619
def run(self) -> None: ...

stubs/setuptools/setuptools/command/build_py.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
from _typeshed import Incomplete, StrPath
22
from typing import ClassVar
33

4+
from setuptools.dist import Distribution
5+
46
from .._distutils.cmd import _StrPathT
57
from .._distutils.command import build_py as orig
68

79
def make_writable(target) -> None: ...
810

911
class build_py(orig.build_py):
12+
distribution: Distribution # override distutils.dist.Distribution with setuptools.dist.Distribution
1013
editable_mode: ClassVar[bool]
1114
package_data: dict[str, list[str]]
1215
exclude_package_data: dict[Incomplete, Incomplete]

stubs/setuptools/setuptools/command/easy_install.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ class CommandSpec(list[str]):
123123
@classmethod
124124
def best(cls) -> type[CommandSpec]: ...
125125
@classmethod
126-
def from_param(cls, param: str | Self | Iterable[str] | None) -> Self: ...
126+
def from_param(cls, param: Self | str | Iterable[str] | None) -> Self: ...
127127
@classmethod
128128
def from_environment(cls) -> CommandSpec: ...
129129
@classmethod

stubs/setuptools/setuptools/command/install.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ from _typeshed import Incomplete
22
from collections.abc import Callable
33
from typing import Any, ClassVar
44

5+
from setuptools.dist import Distribution
6+
57
from .._distutils.command import install as orig
68

79
class install(orig.install):
10+
distribution: Distribution # override distutils.dist.Distribution with setuptools.dist.Distribution
811
user_options: ClassVar[list[tuple[str, str | None, str]]]
912
boolean_options: ClassVar[list[str]]
1013
# Any to work around variance issues

0 commit comments

Comments
 (0)