Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump setuptools to 71.0.* #12381

Merged
merged 3 commits into from
Jul 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions stubs/setuptools/@tests/stubtest_allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,8 @@ setuptools._distutils.zosccompiler
# Reexported from setuptools._distutils; problems should be fixed there
distutils\..+

# Private APIs
setuptools\.config\._validate_pyproject.*
# Private APIs, tests and other vendored code
setuptools.config._validate_pyproject.*
setuptools.command.build_py.build_py.existing_egg_info_dir

# Other vendored code
pkg_resources\._vendor.*
setuptools\._distutils\._vendor.*
setuptools\._vendor.*
.+?\.tests.*
.+?\._vendor.*
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 = "70.3.*"
version = "71.0.*"
upstream_repository = "https://github.com/pypa/setuptools"

[tool.stubtest]
Expand Down
17 changes: 7 additions & 10 deletions stubs/setuptools/pkg_resources/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import types
import zipimport
from _typeshed import BytesPath, Incomplete, StrOrBytesPath, StrPath, Unused
from _typeshed.importlib import LoaderProtocol
from collections.abc import Callable, Generator, Iterable, Iterator, Sequence
from io import BytesIO
from itertools import chain
Expand All @@ -10,7 +11,7 @@ from typing import IO, Any, ClassVar, Final, Literal, NamedTuple, NoReturn, Prot
from typing_extensions import Self, TypeAlias
from zipfile import ZipInfo

from ._vendored_packaging import requirements as packaging_requirements, version as packaging_version
from ._vendored_packaging import requirements as _packaging_requirements, version as _packaging_version

# defined in setuptools
_T = TypeVar("_T")
Expand All @@ -29,10 +30,6 @@ _ProviderFactoryType: TypeAlias = Callable[[Any], IResourceProvider]
_DistFinderType: TypeAlias = Callable[[_T, str, bool], Iterable[Distribution]]
_NSHandlerType: TypeAlias = Callable[[_T, str, str, types.ModuleType], str | None]

# TODO: Use _typeshed.importlib.LoaderProtocol after mypy 1.11 is released
class _LoaderProtocol(Protocol):
def load_module(self, fullname: str, /) -> types.ModuleType: ...

__all__ = [
"require",
"run_script",
Expand Down Expand Up @@ -218,9 +215,9 @@ AvailableDistributions = Environment

def parse_requirements(strs: _NestedStr) -> Iterator[Requirement]: ...

class RequirementParseError(packaging_requirements.InvalidRequirement): ...
class RequirementParseError(_packaging_requirements.InvalidRequirement): ...

class Requirement(packaging_requirements.Requirement):
class Requirement(_packaging_requirements.Requirement):
unsafe_name: str
project_name: str
key: str
Expand Down Expand Up @@ -369,7 +366,7 @@ def evaluate_marker(text: str, extra: Incomplete | None = None) -> bool: ...
class NullProvider:
egg_name: str | None
egg_info: str | None
loader: _LoaderProtocol | None
loader: LoaderProtocol | None
module_path: str

def __init__(self, module: _ModuleLike) -> None: ...
Expand Down Expand Up @@ -420,7 +417,7 @@ class Distribution(NullProvider):
@property
def key(self) -> str: ...
@property
def parsed_version(self) -> packaging_version.Version: ...
def parsed_version(self) -> _packaging_version.Version: ...
@property
def version(self) -> str: ...
def requires(self, extras: Iterable[str] = ()) -> list[Requirement]: ...
Expand Down Expand Up @@ -495,7 +492,7 @@ class FileMetadata(EmptyProvider):

class PEP440Warning(RuntimeWarning): ...

parse_version = packaging_version.Version
parse_version = _packaging_version.Version

def yield_lines(iterable: _NestedStr) -> chain[str]: ...
def split_sections(s: _NestedStr) -> Generator[tuple[str | None, list[str]], None, None]: ...
Expand Down
20 changes: 0 additions & 20 deletions stubs/setuptools/pkg_resources/extern/__init__.pyi

This file was deleted.

3 changes: 1 addition & 2 deletions stubs/setuptools/setuptools/dist.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from collections.abc import Iterable, Iterator, Mapping, MutableMapping
from collections.abc import Iterable, Iterator, MutableMapping
from typing import Any

from . import Command, SetuptoolsDeprecationWarning
Expand All @@ -7,7 +7,6 @@ from ._distutils.dist import Distribution as _Distribution
__all__ = ["Distribution"]

class Distribution(_Distribution):
def patch_missing_pkg_info(self, attrs: Mapping[str, Any]) -> None: ...
src_root: str | None
dependency_links: list[str]
setup_requires: list[str]
Expand Down
20 changes: 0 additions & 20 deletions stubs/setuptools/setuptools/extern/__init__.pyi

This file was deleted.