Skip to content

Commit

Permalink
Bump setuptools to 73.0.* (#12564)
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam authored Aug 21, 2024
1 parent 406d5bc commit fa3ab94
Show file tree
Hide file tree
Showing 18 changed files with 56 additions and 25 deletions.
2 changes: 1 addition & 1 deletion stubs/setuptools/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "72.2.*"
version = "73.0.*"
upstream_repository = "https://github.com/pypa/setuptools"
extra_description = """\
If using `setuptools >= 71.1` *only* for `pkg_resources`,
Expand Down
14 changes: 7 additions & 7 deletions stubs/setuptools/pkg_resources/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ from ._vendored_packaging import requirements as _packaging_requirements, versio
_T = TypeVar("_T")
_DistributionT = TypeVar("_DistributionT", bound=Distribution)
_NestedStr: TypeAlias = str | Iterable[_NestedStr]
_InstallerTypeT: TypeAlias = Callable[[Requirement], _DistributionT] # noqa: Y043
_StrictInstallerType: TypeAlias = Callable[[Requirement], _DistributionT]
_InstallerType: TypeAlias = Callable[[Requirement], Distribution | None]
_PkgReqType: TypeAlias = str | Requirement
_EPDistType: TypeAlias = Distribution | _PkgReqType
Expand Down Expand Up @@ -128,7 +128,7 @@ class WorkingSet:
self,
requirements: Iterable[Requirement],
env: Environment | None,
installer: _InstallerTypeT[_DistributionT],
installer: _StrictInstallerType[_DistributionT],
replace_conflicting: bool = False,
extras: tuple[str, ...] | None = None,
) -> list[_DistributionT]: ...
Expand All @@ -138,7 +138,7 @@ class WorkingSet:
requirements: Iterable[Requirement],
env: Environment | None = None,
*,
installer: _InstallerTypeT[_DistributionT],
installer: _StrictInstallerType[_DistributionT],
replace_conflicting: bool = False,
extras: tuple[str, ...] | None = None,
) -> list[_DistributionT]: ...
Expand All @@ -156,7 +156,7 @@ class WorkingSet:
self,
plugin_env: Environment,
full_env: Environment | None,
installer: _InstallerTypeT[_DistributionT],
installer: _StrictInstallerType[_DistributionT],
fallback: bool = True,
) -> tuple[list[_DistributionT], dict[Distribution, Exception]]: ...
@overload
Expand All @@ -165,7 +165,7 @@ class WorkingSet:
plugin_env: Environment,
full_env: Environment | None = None,
*,
installer: _InstallerTypeT[_DistributionT],
installer: _StrictInstallerType[_DistributionT],
fallback: bool = True,
) -> tuple[list[_DistributionT], dict[Distribution, Exception]]: ...
@overload
Expand Down Expand Up @@ -193,7 +193,7 @@ class Environment:
self,
req: Requirement,
working_set: WorkingSet,
installer: _InstallerTypeT[_DistributionT],
installer: _StrictInstallerType[_DistributionT],
replace_conflicting: bool = False,
) -> _DistributionT: ...
@overload
Expand All @@ -205,7 +205,7 @@ class Environment:
replace_conflicting: bool = False,
) -> Distribution | None: ...
@overload
def obtain(self, requirement: Requirement, installer: _InstallerTypeT[_DistributionT]) -> _DistributionT: ...
def obtain(self, requirement: Requirement, installer: _StrictInstallerType[_DistributionT]) -> _DistributionT: ...
@overload
def obtain(self, requirement: Requirement, installer: Callable[[Requirement], None] | None = None) -> None: ...
@overload
Expand Down
3 changes: 3 additions & 0 deletions stubs/setuptools/setuptools/command/bdist_rpm.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from setuptools.dist import Distribution

from .._distutils.command import bdist_rpm as orig

class bdist_rpm(orig.bdist_rpm):
distribution: Distribution # override distutils.dist.Distribution with setuptools.dist.Distribution
def run(self) -> None: ...
19 changes: 8 additions & 11 deletions stubs/setuptools/setuptools/command/bdist_wheel.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from _typeshed import Incomplete, Unused
from _typeshed import ExcInfo, Incomplete, Unused
from collections.abc import Callable, Iterable
from types import TracebackType
from typing import ClassVar, Final, Literal

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

class bdist_wheel(Command):
description: ClassVar[str]
Expand All @@ -30,20 +27,20 @@ class bdist_wheel(Command):
boolean_options: ClassVar[list[str]]

bdist_dir: str | None
data_dir: Incomplete | None
data_dir: str | None
plat_name: str | None
plat_tag: Incomplete | None
plat_tag: str | None
format: str
keep_temp: bool
dist_dir: str | None
egginfo_dir: Incomplete | None
egginfo_dir: str | None
root_is_pure: bool | None
skip_build: Incomplete | None
skip_build: bool
relative: bool
owner: Incomplete | None
group: Incomplete | None
universal: bool
compression: str | int
compression: int | str
python_tag: str
build_number: str | None
py_limited_api: str | Literal[False]
Expand Down
5 changes: 4 additions & 1 deletion stubs/setuptools/setuptools/command/build.pyi
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
from typing import Protocol

from setuptools.dist import Distribution

from .._distutils.command.build import build as _build

class build(_build): ...
class build(_build):
distribution: Distribution # override distutils.dist.Distribution with setuptools.dist.Distribution

class SubCommand(Protocol):
editable_mode: bool
Expand Down
4 changes: 4 additions & 0 deletions stubs/setuptools/setuptools/command/build_clib.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
from setuptools.dist import Distribution

from .._distutils.command import build_clib as orig

class build_clib(orig.build_clib):
distribution: Distribution # override distutils.dist.Distribution with setuptools.dist.Distribution

def build_libraries(self, libraries) -> None: ...
3 changes: 3 additions & 0 deletions stubs/setuptools/setuptools/command/build_ext.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from _typeshed import Incomplete
from typing import ClassVar

from setuptools.dist import Distribution

from .._distutils.command.build_ext import build_ext as _build_ext

have_rtld: bool
Expand All @@ -11,6 +13,7 @@ def if_dl(s): ...
def get_abi3_suffix(): ...

class build_ext(_build_ext):
distribution: Distribution # override distutils.dist.Distribution with setuptools.dist.Distribution
editable_mode: ClassVar[bool]
inplace: bool
def run(self) -> None: ...
Expand Down
3 changes: 3 additions & 0 deletions stubs/setuptools/setuptools/command/build_py.pyi
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
from _typeshed import Incomplete, StrPath
from typing import ClassVar

from setuptools.dist import Distribution

from .._distutils.cmd import _StrPathT
from .._distutils.command import build_py as orig

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

class build_py(orig.build_py):
distribution: Distribution # override distutils.dist.Distribution with setuptools.dist.Distribution
editable_mode: ClassVar[bool]
package_data: dict[str, list[str]]
exclude_package_data: dict[Incomplete, Incomplete]
Expand Down
2 changes: 1 addition & 1 deletion stubs/setuptools/setuptools/command/easy_install.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class CommandSpec(list[str]):
@classmethod
def best(cls) -> type[CommandSpec]: ...
@classmethod
def from_param(cls, param: str | Self | Iterable[str] | None) -> Self: ...
def from_param(cls, param: Self | str | Iterable[str] | None) -> Self: ...
@classmethod
def from_environment(cls) -> CommandSpec: ...
@classmethod
Expand Down
3 changes: 3 additions & 0 deletions stubs/setuptools/setuptools/command/install.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ from _typeshed import Incomplete
from collections.abc import Callable
from typing import Any, ClassVar

from setuptools.dist import Distribution

from .._distutils.command import install as orig

class install(orig.install):
distribution: Distribution # override distutils.dist.Distribution with setuptools.dist.Distribution
user_options: ClassVar[list[tuple[str, str | None, str]]]
boolean_options: ClassVar[list[str]]
# Any to work around variance issues
Expand Down
3 changes: 3 additions & 0 deletions stubs/setuptools/setuptools/command/install_lib.pyi
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
from _typeshed import StrPath, Unused

from setuptools.dist import Distribution

from .._distutils.command import install_lib as orig

class install_lib(orig.install_lib):
distribution: Distribution # override distutils.dist.Distribution with setuptools.dist.Distribution
def run(self) -> None: ...
def get_exclusions(self): ...
def copy_tree(
Expand Down
3 changes: 3 additions & 0 deletions stubs/setuptools/setuptools/command/install_scripts.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from setuptools.dist import Distribution

from .._distutils.command import install_scripts as orig

class install_scripts(orig.install_scripts):
distribution: Distribution # override distutils.dist.Distribution with setuptools.dist.Distribution
no_ep: bool
def initialize_options(self) -> None: ...
outfiles: list[str]
Expand Down
3 changes: 3 additions & 0 deletions stubs/setuptools/setuptools/command/register.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from setuptools.dist import Distribution

from .._distutils.command import register as orig

class register(orig.register):
distribution: Distribution # override distutils.dist.Distribution with setuptools.dist.Distribution
def run(self) -> None: ...
3 changes: 3 additions & 0 deletions stubs/setuptools/setuptools/command/sdist.pyi
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
from _typeshed import Incomplete
from typing import ClassVar

from setuptools.dist import Distribution

from .._distutils.command import sdist as orig

def walk_revctrl(dirname: str = "") -> None: ...

class sdist(orig.sdist):
distribution: Distribution # override distutils.dist.Distribution with setuptools.dist.Distribution
user_options: ClassVar[list[tuple[str, str | None, str]]]
negative_opt: ClassVar[dict[str, str]]
README_EXTENSIONS: ClassVar[list[str]]
Expand Down
4 changes: 1 addition & 3 deletions stubs/setuptools/setuptools/command/test.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ The test command is disabled and references to it are deprecated. \
Please remove any references to `setuptools.command.test` in all supported versions of the affected package.\
"""
)
class _test(Command):
class test(Command):
description: ClassVar[str]
user_options: ClassVar[list[tuple[str, str, str]]]
def initialize_options(self) -> None: ...
def finalize_options(self) -> None: ...
def run(self) -> None: ...

test = _test
3 changes: 3 additions & 0 deletions stubs/setuptools/setuptools/command/upload.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from setuptools.dist import Distribution

from .._distutils.command import upload as orig

class upload(orig.upload):
distribution: Distribution # override distutils.dist.Distribution with setuptools.dist.Distribution
def run(self) -> None: ...
2 changes: 2 additions & 0 deletions stubs/setuptools/setuptools/dist.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ _CommandT = TypeVar("_CommandT", bound=Command)
__all__ = ["Distribution"]

class Distribution(_Distribution):
include_package_data: bool | None
exclude_package_data: dict[str, list[str]] | None
src_root: str | None
dependency_links: list[str]
setup_requires: list[str]
Expand Down
2 changes: 1 addition & 1 deletion stubs/setuptools/setuptools/windows_support.pyi
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
def windows_only(func): ...
def hide_file(path) -> None: ...
def hide_file(path: str) -> None: ...

0 comments on commit fa3ab94

Please sign in to comment.