Bump setuptools to 75.3.* (#12928)

This commit is contained in:
Avasam
2024-11-04 10:18:52 -05:00
committed by GitHub
parent 84dfa4a8fc
commit 5243d30744
14 changed files with 43 additions and 30 deletions

View File

@@ -1,4 +1,4 @@
version = "75.2.*"
version = "75.3.*"
upstream_repository = "https://github.com/pypa/setuptools"
extra_description = """\
If using `setuptools >= 71.1` *only* for `pkg_resources`,

View File

@@ -31,7 +31,7 @@ from .dist import Distribution as Distribution
from .extension import Extension as Extension
from .warnings import SetuptoolsDeprecationWarning as SetuptoolsDeprecationWarning
_CommandT = TypeVar("_CommandT", bound=Command)
_CommandT = TypeVar("_CommandT", bound=_Command)
__all__ = [
"setup",

View File

@@ -32,7 +32,7 @@ class _BuildMetaBackend:
def run_setup(self, setup_script: str = "setup.py") -> None: ...
def get_requires_for_build_wheel(self, config_settings: _ConfigSettings = None) -> list[str]: ...
def get_requires_for_build_sdist(self, config_settings: _ConfigSettings = None) -> list[str]: ...
def prepare_metadata_for_build_wheel(self, metadata_directory: str, config_settings: _ConfigSettings = None) -> str: ...
def prepare_metadata_for_build_wheel(self, metadata_directory: StrPath, config_settings: _ConfigSettings = None) -> str: ...
def build_wheel(
self, wheel_directory: StrPath, config_settings: _ConfigSettings = None, metadata_directory: StrPath | None = None
) -> str: ...
@@ -41,7 +41,9 @@ class _BuildMetaBackend:
self, wheel_directory: StrPath, config_settings: _ConfigSettings = None, metadata_directory: StrPath | None = None
) -> str: ...
def get_requires_for_build_editable(self, config_settings: _ConfigSettings = None) -> list[str]: ...
def prepare_metadata_for_build_editable(self, metadata_directory: str, config_settings: _ConfigSettings = None) -> str: ...
def prepare_metadata_for_build_editable(
self, metadata_directory: StrPath, config_settings: _ConfigSettings = None
) -> str: ...
class _BuildMetaLegacyBackend(_BuildMetaBackend):
def run_setup(self, setup_script: str = "setup.py") -> None: ...

View File

@@ -1,9 +1,12 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, StrPath
from collections.abc import Generator
from typing import ClassVar, Final
from typing import ClassVar, Final, TypeVar
from zipfile import _ZipFileMode
from .. import Command
_StrPathT = TypeVar("_StrPathT", bound=StrPath)
def strip_module(filename): ...
def sorted_walk(dir) -> Generator[Incomplete, None, None]: ...
def write_stub(resource, pyfile) -> None: ...
@@ -48,5 +51,10 @@ def can_scan(): ...
INSTALL_DIRECTORY_ATTRS: Final[list[str]]
def make_zipfile(
zip_filename, base_dir, verbose: bool = False, dry_run: bool = False, compress: bool = True, mode: str = "w"
): ...
zip_filename: _StrPathT,
base_dir,
verbose: bool = False,
dry_run: bool = False,
compress: bool = True,
mode: _ZipFileMode = "w",
) -> _StrPathT: ...

View File

@@ -40,7 +40,7 @@ class bdist_wheel(Command):
owner: Incomplete | None
group: Incomplete | None
universal: bool
compression: int | str
compression: str | int
python_tag: str
build_number: str | None
py_limited_api: str | Literal[False]

View File

@@ -1,4 +1,4 @@
from _typeshed import Incomplete, StrPath
from _typeshed import Incomplete, StrPath, Unused
from typing import ClassVar
from setuptools.dist import Distribution
@@ -21,7 +21,7 @@ class build_py(orig.build_py):
preserve_mode: bool = True,
preserve_times: bool = True,
link: str | None = None,
level: int = 1,
level: Unused = 1,
) -> tuple[_StrPathT | str, bool]: ...
def run(self) -> None: ...
data_files: list[tuple[Incomplete, Incomplete, Incomplete, list[Incomplete]]]

View File

@@ -33,11 +33,11 @@ class editable_wheel(Command):
def run(self) -> None: ...
class EditableStrategy(Protocol):
def __call__(self, wheel: _WheelFile, files: list[str], mapping: Mapping[str, str]) -> None: ...
def __call__(self, wheel: _WheelFile, files: list[str], mapping: Mapping[str, str]) -> Unused: ...
def __enter__(self) -> Self: ...
def __exit__(
self, _exc_type: type[BaseException] | None, _exc_value: BaseException | None, _traceback: TracebackType | None
) -> None: ...
) -> Unused: ...
class _StaticPth:
dist: Distribution

View File

@@ -11,7 +11,7 @@ class install(orig.install):
user_options: ClassVar[list[tuple[str, str | None, str]]]
boolean_options: ClassVar[list[str]]
# Any to work around variance issues
new_commands: list[tuple[str, Callable[[Any], bool]] | None]
new_commands: ClassVar[list[tuple[str, Callable[[Any], bool]] | None]]
old_and_unmanageable: Incomplete
single_version_externally_managed: bool | None
def initialize_options(self) -> None: ...

View File

@@ -8,7 +8,7 @@ from typing_extensions import Self
from ..dist import Distribution
_K = TypeVar("_K")
_VCo = TypeVar("_VCo", covariant=True)
_V_co = TypeVar("_V_co", covariant=True)
class StaticModule:
def __init__(self, name: str, spec: ModuleSpec) -> None: ...
@@ -31,7 +31,7 @@ def canonic_package_data(package_data: dict[Incomplete, Incomplete]) -> dict[Inc
def canonic_data_files(
data_files: list[Incomplete] | dict[Incomplete, Incomplete], root_dir: StrPath | None = None
) -> list[tuple[str, list[str]]]: ...
def entry_points(text: str, text_source: str = "entry-points") -> dict[str, dict[Incomplete, Incomplete]]: ...
def entry_points(text: str, text_source: str = "entry-points") -> dict[str, dict[str, str]]: ...
class EnsurePackagesDiscovered:
def __init__(self, distribution: Distribution) -> None: ...
@@ -43,8 +43,8 @@ class EnsurePackagesDiscovered:
@property
def package_dir(self) -> Mapping[str, str]: ...
class LazyMappingProxy(Mapping[_K, _VCo]):
def __init__(self, obtain_mapping_value: Callable[[], Mapping[_K, _VCo]]) -> None: ...
def __getitem__(self, key: _K) -> _VCo: ...
class LazyMappingProxy(Mapping[_K, _V_co]):
def __init__(self, obtain_mapping_value: Callable[[], Mapping[_K, _V_co]]) -> None: ...
def __getitem__(self, key: _K) -> _V_co: ...
def __len__(self) -> int: ...
def __iter__(self) -> Iterator[_K]: ...

View File

@@ -1,4 +1,5 @@
from _typeshed import Incomplete, StrPath
from collections.abc import Iterable
from typing import Any, ClassVar, Generic, TypeVar
from typing_extensions import TypeAlias
@@ -8,14 +9,14 @@ from . import expand
SingleCommandOptions: TypeAlias = dict[str, tuple[str, Any]]
AllCommandOptions: TypeAlias = dict[str, SingleCommandOptions]
Target = TypeVar("Target", bound=Distribution | DistributionMetadata) # noqa: Y001 # Exists at runtime
Target = TypeVar("Target", Distribution, DistributionMetadata) # noqa: Y001 # Exists at runtime
def read_configuration(
filepath: StrPath, find_others: bool = False, ignore_option_errors: bool = False
) -> dict[Incomplete, Incomplete]: ...
def apply_configuration(dist: Distribution, filepath: StrPath) -> Distribution: ...
def configuration_to_dict(
handlers: tuple[ConfigHandler[Distribution | DistributionMetadata], ...]
handlers: Iterable[ConfigHandler[Distribution] | ConfigHandler[DistributionMetadata]],
) -> dict[Incomplete, Incomplete]: ...
def parse_configuration(
distribution: Distribution, command_options: AllCommandOptions, ignore_option_errors: bool = False
@@ -47,7 +48,7 @@ class ConfigMetadataHandler(ConfigHandler[DistributionMetadata]):
aliases: ClassVar[dict[str, str]]
strict_mode: bool
package_dir: dict[Incomplete, Incomplete] | None
root_dir: StrPath
root_dir: StrPath | None
def __init__(
self,
target_obj: DistributionMetadata,
@@ -55,7 +56,7 @@ class ConfigMetadataHandler(ConfigHandler[DistributionMetadata]):
ignore_option_errors: bool,
ensure_discovered: expand.EnsurePackagesDiscovered,
package_dir: dict[Incomplete, Incomplete] | None = None,
root_dir: StrPath = ".",
root_dir: StrPath | None = ".",
) -> None: ...
@property
def parsers(self): ...

View File

@@ -1,12 +1,10 @@
import itertools
from _typeshed import Incomplete, StrPath
from collections.abc import Iterable, Iterator, Mapping
from collections.abc import Iterable, Mapping
from typing import ClassVar
from typing_extensions import TypeAlias
from . import Distribution
StrIter: TypeAlias = Iterator[str]
chain_iter = itertools.chain.from_iterable
class _Filter:

View File

@@ -3,6 +3,7 @@ from collections.abc import Iterable, Iterator, MutableMapping
from typing import Literal, TypeVar, overload
from . import Command, SetuptoolsDeprecationWarning
from ._distutils.cmd import Command as _Command
from ._distutils.dist import Distribution as _Distribution
from .command.alias import alias
from .command.bdist_egg import bdist_egg
@@ -26,7 +27,7 @@ from .command.saveopts import saveopts
from .command.sdist import sdist
from .command.setopt import setopt
_CommandT = TypeVar("_CommandT", bound=Command)
_CommandT = TypeVar("_CommandT", bound=_Command)
__all__ = ["Distribution"]

View File

@@ -1,3 +1,5 @@
from _typeshed import StrPath
from ._distutils.extension import Extension as _Extension
def have_pyrex() -> bool: ...
@@ -7,7 +9,7 @@ class Extension(_Extension):
def __init__(
self,
name: str,
sources: list[str],
sources: list[StrPath],
include_dirs: list[str] | None = None,
define_macros: list[tuple[str, str | None]] | None = None,
undef_macros: list[str] | None = None,

View File

@@ -1,5 +1,4 @@
import sys
from _typeshed import Unused
from types import TracebackType
from typing import ClassVar, Literal
from typing_extensions import Self
@@ -23,7 +22,9 @@ def run_setup(setup_script, args): ...
class AbstractSandbox:
def __enter__(self) -> None: ...
def __exit__(self, exc_type: Unused, exc_value: Unused, traceback: Unused) -> None: ...
def __exit__(
self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None
) -> None: ...
def run(self, func): ...
# Dynamically created
if sys.platform == "win32":