Skip to content

Commit 06efe45

Browse files
authored
Bump setuptools to 70.0 (#11994)
1 parent 425c69a commit 06efe45

File tree

6 files changed

+33
-30
lines changed

6 files changed

+33
-30
lines changed

stubs/setuptools/@tests/stubtest_allowlist.txt

+5-9
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ pkg_resources.PathMetadata.egg_info
33
pkg_resources.EggMetadata.loader
44
pkg_resources.ZipProvider.loader
55

6+
# Is a functools.partial, so stubtest says "is not a function"
7+
setuptools.modified.newer_pairwise_group
8+
setuptools._distutils._modified.newer_pairwise_group
9+
610
# Dynamically created in __init__
711
setuptools._distutils.dist.Distribution.get_name
812
setuptools._distutils.dist.Distribution.get_version
@@ -117,18 +121,10 @@ setuptools._distutils.zosccompiler
117121
# Reexported from setuptools._distutils; problems should be fixed there
118122
distutils\..+
119123

120-
# Is a functools.partial, so stubtest says "is not a function"
121-
setuptools.dep_util.newer_pairwise_group
122-
setuptools.modified.newer_pairwise_group
123-
setuptools._distutils._modified.newer_pairwise_group
124-
125-
# Private modules
124+
# Private APIs
126125
setuptools.config._validate_pyproject.*
127126
setuptools.command.build_py.build_py.existing_egg_info_dir
128127

129-
# Loop variable leak
130-
setuptools.sandbox.AbstractSandbox.name
131-
132128
# Other vendored code
133129
setuptools._vendor.*
134130
pkg_resources._vendor.*

stubs/setuptools/METADATA.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "69.5.*"
1+
version = "70.0.*"
22
upstream_repository = "https://github.com/pypa/setuptools"
33

44
[tool.stubtest]

stubs/setuptools/pkg_resources/__init__.pyi

+23-17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import sys
12
import types
23
import zipimport
34
from _typeshed import BytesPath, Incomplete, StrOrBytesPath, StrPath, Unused
@@ -174,13 +175,6 @@ class WorkingSet:
174175
def require(self, *requirements: _NestedStr) -> Sequence[Distribution]: ...
175176
def subscribe(self, callback: Callable[[Distribution], object], existing: bool = True) -> None: ...
176177

177-
working_set: WorkingSet
178-
require = working_set.require
179-
iter_entry_points = working_set.iter_entry_points
180-
add_activation_listener = working_set.subscribe
181-
run_script = working_set.run_script
182-
run_main = run_script
183-
184178
class Environment:
185179
def __init__(
186180
self, search_path: Iterable[str] | None = None, platform: str | None = ..., python: str | None = ...
@@ -289,16 +283,6 @@ class ResourceManager:
289283
def set_extraction_path(self, path: str) -> None: ...
290284
def cleanup_resources(self, force: bool = False) -> list[str]: ...
291285

292-
__resource_manager: ResourceManager # Doesn't exist at runtime
293-
resource_exists = __resource_manager.resource_exists
294-
resource_isdir = __resource_manager.resource_isdir
295-
resource_filename = __resource_manager.resource_filename
296-
resource_stream = __resource_manager.resource_stream
297-
resource_string = __resource_manager.resource_string
298-
resource_listdir = __resource_manager.resource_listdir
299-
set_extraction_path = __resource_manager.set_extraction_path
300-
cleanup_resources = __resource_manager.cleanup_resources
301-
302286
@overload
303287
def get_provider(moduleOrReq: str) -> IResourceProvider: ...
304288
@overload
@@ -498,3 +482,25 @@ def normalize_path(filename: StrPath) -> str: ...
498482
def normalize_path(filename: BytesPath) -> bytes: ...
499483

500484
class PkgResourcesDeprecationWarning(Warning): ...
485+
486+
__resource_manager: ResourceManager # Doesn't exist at runtime
487+
resource_exists = __resource_manager.resource_exists
488+
resource_isdir = __resource_manager.resource_isdir
489+
resource_filename = __resource_manager.resource_filename
490+
resource_stream = __resource_manager.resource_stream
491+
resource_string = __resource_manager.resource_string
492+
resource_listdir = __resource_manager.resource_listdir
493+
set_extraction_path = __resource_manager.set_extraction_path
494+
cleanup_resources = __resource_manager.cleanup_resources
495+
496+
working_set: WorkingSet
497+
require = working_set.require
498+
iter_entry_points = working_set.iter_entry_points
499+
add_activation_listener = working_set.subscribe
500+
run_script = working_set.run_script
501+
run_main = run_script
502+
503+
if sys.version_info >= (3, 10):
504+
LOCALE_ENCODING: Final = "locale"
505+
else:
506+
LOCALE_ENCODING: Final = None

stubs/setuptools/setuptools/command/build.pyi

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ from typing import Protocol
22

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

5-
class build(_build):
6-
def get_sub_commands(self): ...
5+
class build(_build): ...
76

87
class SubCommand(Protocol):
98
editable_mode: bool

stubs/setuptools/setuptools/command/editable_wheel.pyi

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from _typeshed import Incomplete, StrPath
2+
from collections.abc import Iterator
23
from enum import Enum
34
from pathlib import Path
45
from types import TracebackType
@@ -63,6 +64,8 @@ class _TopLevelFinder:
6364
dist: Incomplete
6465
name: Incomplete
6566
def __init__(self, dist: Distribution, name: str) -> None: ...
67+
def template_vars(self) -> tuple[str, str, dict[str, str], dict[str, list[str]]]: ...
68+
def get_implementation(self) -> Iterator[tuple[str, bytes]]: ...
6669
def __call__(self, wheel: _WheelFile, files: list[str], mapping: dict[str, str]): ...
6770
def __enter__(self) -> Self: ...
6871
def __exit__(

stubs/setuptools/setuptools/dep_util.pyi

-1
This file was deleted.

0 commit comments

Comments
 (0)