Skip to content

Commit

Permalink
Bump setuptools to 71.0.* (python#12381)
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam authored and max-muoto committed Sep 8, 2024
1 parent 28aa53a commit 64c7c6b
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 60 deletions.
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.

0 comments on commit 64c7c6b

Please sign in to comment.