Skip to content

Commit ed2cc33

Browse files
authored
[setuptools] Update to 84.0.* (#16188)
1 parent ad066eb commit ed2cc33

29 files changed

Lines changed: 152 additions & 123 deletions

stubs/setuptools/@tests/stubtest_allowlist.txt

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# Is a functools.partial, so stubtest says "is not a function"
22
setuptools._distutils._modified.newer_pairwise_group
33

4-
# Runtime initializes to None, but this really should never be None when used
5-
setuptools._distutils.compilers.C.base.Compiler.compiler_type
6-
74
# Dynamically created in __init__
85
setuptools._distutils.dist.Distribution.get_name
96
setuptools._distutils.dist.Distribution.get_version
@@ -37,7 +34,6 @@ setuptools._distutils.command.install.INSTALL_SCHEMES
3734
setuptools._distutils.command.install.SCHEME_KEYS
3835
setuptools._distutils.command.install.WINDOWS_SCHEME
3936
setuptools._distutils.command.install_lib.PYTHON_SOURCE_EXTENSION
40-
setuptools._distutils.dir_util.SkipRepeatAbsolutePaths.instance
4137
setuptools._distutils.dist.fix_help_options
4238
setuptools._distutils.extension.read_setup_file
4339
setuptools._distutils.filelist.findall
@@ -53,10 +49,10 @@ setuptools._distutils.sysconfig.parse_config_h
5349
setuptools._distutils.sysconfig.parse_makefile
5450
setuptools._distutils.sysconfig.project_base
5551
setuptools._distutils.sysconfig.python_build
56-
setuptools._distutils.util.MACOSX_VERSION_VAR
5752

5853
# Missing submodules from setuptools._distutils
5954
# (Many of these may be implementation details,
55+
# in an already private vendored module,
6056
# but they can be added if people ask for them)
6157
setuptools._distutils.command.__all__
6258
setuptools._distutils.command.bdist_dumb
@@ -66,11 +62,12 @@ setuptools._distutils.command.clean
6662
setuptools._distutils.command.config
6763
setuptools._distutils.command.install_egg_info
6864
setuptools._distutils.command.install_headers
69-
setuptools._distutils.compat.numpy
70-
setuptools._distutils.compat.py39
65+
setuptools._distutils.compat.*
7166
setuptools._distutils.core
7267
setuptools._distutils.debug
68+
setuptools._distutils.dir_util
7369
setuptools._distutils.fancy_getopt
70+
setuptools._distutils.file_util
7471
setuptools._distutils.log
7572
setuptools._distutils.text_file
7673
setuptools._distutils.version.Version._cmp # abstract method
@@ -85,4 +82,3 @@ distutils\..+
8582
setuptools.config._validate_pyproject.*
8683
setuptools.compat.*
8784
setuptools.command.build_py.build_py.existing_egg_info_dir
88-
.+?\.tests.*

stubs/setuptools/METADATA.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "83.0.*"
1+
version = "84.0.*"
22
upstream-repository = "https://github.com/pypa/setuptools"
33
extra-description = """\
44
Given that `pkg_resources` is typed since `setuptools >= 71.1`, \
@@ -11,6 +11,9 @@ ci-platforms = ["linux", "win32"]
1111
stubtest-dependencies = ["more_itertools", "tomli"]
1212

1313
# Stubtest fails on trying to run mypy on the source files rather than our stubs
14-
[mypy-tests.distutils]
14+
[mypy-tests.distutils1]
1515
module-name = "setuptools._distutils.compilers.C.*"
1616
values = { ignore_errors = true }
17+
[mypy-tests.distutils2]
18+
module-name = "setuptools._distutils.compilers.platform.detect"
19+
values = { ignore_errors = true }

stubs/setuptools/distutils/compat/__init__.pyi

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from setuptools._distutils.compilers.errors import *
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from setuptools._distutils.compilers.platform.detect import *
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from setuptools._distutils.compilers.platform.macos import *

stubs/setuptools/setuptools/_distutils/ccompiler.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from .compilers.C import base
2-
from .compilers.C.base import gen_lib_options, gen_preprocess_options, get_default_compiler, new_compiler, show_compilers
2+
from .compilers.C.base import gen_lib_options, gen_preprocess_options, get_default_compiler, new_compiler
33
from .compilers.C.errors import CompileError, LinkError
44

55
__all__ = [
@@ -13,3 +13,5 @@ __all__ = [
1313
]
1414

1515
CCompiler = base.Compiler
16+
17+
def show_compilers() -> None: ...

stubs/setuptools/setuptools/_distutils/cmd.pyi

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from _typeshed import BytesPath, StrOrBytesPath, StrPath, Unused
22
from abc import abstractmethod
3-
from collections.abc import Callable, MutableSequence, Sequence
4-
from typing import Any, ClassVar, Literal, TypeVar, overload
3+
from collections.abc import Callable, Sequence
4+
from typing import Any, ClassVar, TypeVar, overload
55
from typing_extensions import TypeVarTuple, Unpack
66

77
from .dist import Distribution
@@ -20,6 +20,10 @@ class Command:
2020
list[tuple[str, str, str]]
2121
| list[tuple[str, str | None, str]]
2222
]
23+
verbose: bool
24+
force: bool | None
25+
help: bool
26+
finalized: bool
2327
def __init__(self, dist: Distribution) -> None: ...
2428
def ensure_finalized(self) -> None: ...
2529
@abstractmethod
@@ -89,10 +93,7 @@ class Command:
8993
@overload
9094
def move_file(self, src: BytesPath, dst: _BytesPathT, level: Unused = 1) -> _BytesPathT | bytes: ...
9195

92-
@overload
93-
def spawn(self, cmd: Sequence[StrOrBytesPath], search_path: Literal[False], level: Unused = 1) -> None: ...
94-
@overload
95-
def spawn(self, cmd: MutableSequence[bytes | StrPath], search_path: Literal[True] = True, level: Unused = 1) -> None: ...
96+
def spawn(self, cmd: Sequence[StrOrBytesPath], search_path: Unused = True, level: Unused = 1) -> None: ...
9697

9798
@overload
9899
def make_archive(

stubs/setuptools/setuptools/_distutils/command/build_ext.pyi

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ from _typeshed import Incomplete, Unused
22
from collections.abc import Callable
33
from typing import ClassVar
44

5+
from ..ccompiler import CCompiler
56
from ..cmd import Command
67
from ..extension import Extension
78

@@ -11,27 +12,27 @@ class build_ext(Command):
1112
user_options: ClassVar[list[tuple[str, str | None, str]]]
1213
boolean_options: ClassVar[list[str]]
1314
help_options: ClassVar[list[tuple[str, str | None, str, Callable[[], Unused]]]]
14-
extensions: Incomplete
15-
build_lib: Incomplete
16-
plat_name: Incomplete
17-
build_temp: Incomplete
15+
extensions: list[Extension] | None
16+
build_lib: str
17+
plat_name: str
18+
build_temp: str
1819
inplace: bool
19-
package: Incomplete
20-
include_dirs: Incomplete
20+
package: str | None
21+
include_dirs: list[str]
2122
define: Incomplete
2223
undef: Incomplete
23-
libraries: Incomplete
24-
library_dirs: Incomplete
25-
rpath: Incomplete
24+
libraries: list[str]
25+
library_dirs: list[str]
26+
rpath: list[str]
2627
link_objects: Incomplete
2728
debug: Incomplete
28-
force: Incomplete
29-
compiler: Incomplete
29+
force: bool | None
30+
compiler: str | CCompiler | None
3031
swig: Incomplete
3132
swig_cpp: Incomplete
32-
swig_opts: Incomplete
33+
swig_opts: list[str]
3334
user: Incomplete
34-
parallel: Incomplete
35+
parallel: int | None
3536
def initialize_options(self) -> None: ...
3637
def finalize_options(self) -> None: ...
3738
def run(self) -> None: ...

stubs/setuptools/setuptools/_distutils/command/install.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ class install(Command):
1313
exec_prefix: Incomplete
1414
home: str | None
1515
user: bool
16-
install_base: Incomplete
17-
install_platbase: Incomplete
16+
install_base: str | None
17+
install_platbase: str | None
1818
root: str | None
1919
install_purelib: str | None
2020
install_platlib: str | None

0 commit comments

Comments
 (0)