Skip to content

Commit f6e99d2

Browse files
authored
Bump setuptools to 76.0.0 (#13614)
1 parent 28106bc commit f6e99d2

File tree

12 files changed

+271
-213
lines changed

12 files changed

+271
-213
lines changed

stubs/setuptools/@tests/stubtest_allowlist.txt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
setuptools.modified.newer_pairwise_group
33
setuptools._distutils._modified.newer_pairwise_group
44

5+
# Runtime initializes to None, but this really should never be None when used
6+
setuptools._distutils.compilers.C.base.Compiler.compiler_type
7+
58
# Dynamically created in __init__
69
setuptools._distutils.dist.Distribution.get_name
710
setuptools._distutils.dist.Distribution.get_version
@@ -28,13 +31,6 @@ setuptools._distutils.dist.Distribution.get_obsoletes
2831
# Missing objects from setuptools._distutils
2932
setuptools._distutils.archive_util.ARCHIVE_FORMATS
3033
setuptools._distutils.archive_util.check_archive_formats
31-
setuptools._distutils.ccompiler.CCompiler.EXECUTABLE
32-
setuptools._distutils.ccompiler.CCompiler.SHARED_LIBRARY
33-
setuptools._distutils.ccompiler.CCompiler.SHARED_OBJECT
34-
setuptools._distutils.ccompiler.CCompiler.compiler_type
35-
setuptools._distutils.ccompiler.CCompiler.out_extensions
36-
setuptools._distutils.ccompiler.CCompiler.set_executable
37-
setuptools._distutils.ccompiler.compiler_class
3834
setuptools._distutils.cmd.Command.dump_options
3935
setuptools._distutils.command.build_clib.show_compilers
4036
setuptools._distutils.command.build_ext.extension_name_re

stubs/setuptools/METADATA.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "~=75.8.2"
1+
version = "~=76.0.0"
22
upstream_repository = "https://github.com/pypa/setuptools"
33
extra_description = """\
44
Given that `pkg_resources` is typed since `setuptools >= 71.1`, \
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
11
from setuptools._distutils.ccompiler import *
2+
from setuptools._distutils.ccompiler import CCompiler as CCompiler
3+
4+
__all__ = [
5+
"CompileError",
6+
"LinkError",
7+
"gen_lib_options",
8+
"gen_preprocess_options",
9+
"get_default_compiler",
10+
"new_compiler",
11+
"show_compilers",
12+
]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from setuptools._distutils.compilers.C.base import *
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from setuptools._distutils.compilers.C.errors import *
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from setuptools._distutils.compilers.C.msvc import *
Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,3 @@
1-
from binascii import Incomplete
2-
from typing import ClassVar, Final
1+
from .compilers.C import msvc
32

4-
from .ccompiler import CCompiler
5-
6-
PLAT_SPEC_TO_RUNTIME: Final[dict[str, str]]
7-
8-
class MSVCCompiler(CCompiler):
9-
compiler_type: ClassVar[str]
10-
executables: ClassVar[dict[Incomplete, Incomplete]]
11-
src_extensions: ClassVar[list[str]]
12-
res_extension: ClassVar[str]
13-
obj_extension: ClassVar[str]
14-
static_lib_extension: ClassVar[str]
15-
shared_lib_extension: ClassVar[str]
16-
shared_lib_format: ClassVar[str]
17-
static_lib_format = shared_lib_format
18-
exe_extension: ClassVar[str]
19-
initialized: bool
20-
def initialize(self, plat_name: str | None = None) -> None: ...
21-
@property
22-
def out_extensions(self) -> dict[str, str]: ...
3+
MSVCCompiler = msvc.Compiler
Lines changed: 13 additions & 178 deletions
Original file line numberDiff line numberDiff line change
@@ -1,180 +1,15 @@
1-
from _typeshed import BytesPath, StrPath, Unused
2-
from collections.abc import Callable, Iterable, MutableSequence, Sequence
3-
from typing import ClassVar, Literal, TypeVar, overload
4-
from typing_extensions import TypeAlias, TypeVarTuple, Unpack
1+
from .compilers.C import base
2+
from .compilers.C.base import gen_lib_options, gen_preprocess_options, get_default_compiler, new_compiler, show_compilers
3+
from .compilers.C.errors import CompileError, LinkError
54

6-
_Macro: TypeAlias = tuple[str] | tuple[str, str | None]
7-
_StrPathT = TypeVar("_StrPathT", bound=StrPath)
8-
_BytesPathT = TypeVar("_BytesPathT", bound=BytesPath)
9-
_Ts = TypeVarTuple("_Ts")
5+
__all__ = [
6+
"CompileError",
7+
"LinkError",
8+
"gen_lib_options",
9+
"gen_preprocess_options",
10+
"get_default_compiler",
11+
"new_compiler",
12+
"show_compilers",
13+
]
1014

11-
def gen_lib_options(
12-
compiler: CCompiler, library_dirs: Iterable[str], runtime_library_dirs: Iterable[str], libraries: Iterable[str]
13-
) -> list[str]: ...
14-
def gen_preprocess_options(macros: Iterable[_Macro], include_dirs: Iterable[str]) -> list[str]: ...
15-
def get_default_compiler(osname: str | None = None, platform: str | None = None) -> str: ...
16-
def new_compiler(
17-
plat: str | None = None, compiler: str | None = None, verbose: bool = False, dry_run: bool = False, force: bool = False
18-
) -> CCompiler: ...
19-
def show_compilers() -> None: ...
20-
21-
class CCompiler:
22-
src_extensions: ClassVar[list[str] | None]
23-
obj_extension: ClassVar[str | None]
24-
static_lib_extension: ClassVar[str | None]
25-
shared_lib_extension: ClassVar[str | None]
26-
static_lib_format: ClassVar[str | None]
27-
shared_lib_format: ClassVar[str | None]
28-
exe_extension: ClassVar[str | None]
29-
language_map: ClassVar[dict[str, str]]
30-
language_order: ClassVar[list[str]]
31-
dry_run: bool
32-
force: bool
33-
verbose: bool
34-
output_dir: str | None
35-
macros: list[_Macro]
36-
include_dirs: list[str]
37-
libraries: list[str]
38-
library_dirs: list[str]
39-
runtime_library_dirs: list[str]
40-
objects: list[str]
41-
def __init__(self, verbose: bool = False, dry_run: bool = False, force: bool = False) -> None: ...
42-
def add_include_dir(self, dir: str) -> None: ...
43-
def set_include_dirs(self, dirs: list[str]) -> None: ...
44-
def add_library(self, libname: str) -> None: ...
45-
def set_libraries(self, libnames: list[str]) -> None: ...
46-
def add_library_dir(self, dir: str) -> None: ...
47-
def set_library_dirs(self, dirs: list[str]) -> None: ...
48-
def add_runtime_library_dir(self, dir: str) -> None: ...
49-
def set_runtime_library_dirs(self, dirs: list[str]) -> None: ...
50-
def define_macro(self, name: str, value: str | None = None) -> None: ...
51-
def undefine_macro(self, name: str) -> None: ...
52-
def add_link_object(self, object: str) -> None: ...
53-
def set_link_objects(self, objects: list[str]) -> None: ...
54-
def detect_language(self, sources: str | list[str]) -> str | None: ...
55-
def find_library_file(self, dirs: Iterable[str], lib: str, debug: bool = False) -> str | None: ...
56-
def has_function(
57-
self,
58-
funcname: str,
59-
includes: Iterable[str] | None = None,
60-
include_dirs: list[str] | tuple[str, ...] | None = None,
61-
libraries: list[str] | None = None,
62-
library_dirs: list[str] | tuple[str, ...] | None = None,
63-
) -> bool: ...
64-
def library_dir_option(self, dir: str) -> str: ...
65-
def library_option(self, lib: str) -> str: ...
66-
def runtime_library_dir_option(self, dir: str) -> str: ...
67-
def set_executables(self, **kwargs: str) -> None: ...
68-
def compile(
69-
self,
70-
sources: Sequence[StrPath],
71-
output_dir: str | None = None,
72-
macros: list[_Macro] | None = None,
73-
include_dirs: list[str] | tuple[str, ...] | None = None,
74-
debug: bool = False,
75-
extra_preargs: list[str] | None = None,
76-
extra_postargs: list[str] | None = None,
77-
depends: list[str] | tuple[str, ...] | None = None,
78-
) -> list[str]: ...
79-
def create_static_lib(
80-
self,
81-
objects: list[str] | tuple[str, ...],
82-
output_libname: str,
83-
output_dir: str | None = None,
84-
debug: bool = False,
85-
target_lang: str | None = None,
86-
) -> None: ...
87-
def link(
88-
self,
89-
target_desc: str,
90-
objects: list[str] | tuple[str, ...],
91-
output_filename: str,
92-
output_dir: str | None = None,
93-
libraries: list[str] | tuple[str, ...] | None = None,
94-
library_dirs: list[str] | tuple[str, ...] | None = None,
95-
runtime_library_dirs: list[str] | tuple[str, ...] | None = None,
96-
export_symbols: Iterable[str] | None = None,
97-
debug: bool = False,
98-
extra_preargs: list[str] | None = None,
99-
extra_postargs: list[str] | None = None,
100-
build_temp: StrPath | None = None,
101-
target_lang: str | None = None,
102-
) -> None: ...
103-
def link_executable(
104-
self,
105-
objects: list[str] | tuple[str, ...],
106-
output_progname: str,
107-
output_dir: str | None = None,
108-
libraries: list[str] | tuple[str, ...] | None = None,
109-
library_dirs: list[str] | tuple[str, ...] | None = None,
110-
runtime_library_dirs: list[str] | tuple[str, ...] | None = None,
111-
debug: bool = False,
112-
extra_preargs: list[str] | None = None,
113-
extra_postargs: list[str] | None = None,
114-
target_lang: str | None = None,
115-
) -> None: ...
116-
def link_shared_lib(
117-
self,
118-
objects: list[str] | tuple[str, ...],
119-
output_libname: str,
120-
output_dir: str | None = None,
121-
libraries: list[str] | tuple[str, ...] | None = None,
122-
library_dirs: list[str] | tuple[str, ...] | None = None,
123-
runtime_library_dirs: list[str] | tuple[str, ...] | None = None,
124-
export_symbols: Iterable[str] | None = None,
125-
debug: bool = False,
126-
extra_preargs: list[str] | None = None,
127-
extra_postargs: list[str] | None = None,
128-
build_temp: StrPath | None = None,
129-
target_lang: str | None = None,
130-
) -> None: ...
131-
def link_shared_object(
132-
self,
133-
objects: list[str] | tuple[str, ...],
134-
output_filename: str,
135-
output_dir: str | None = None,
136-
libraries: list[str] | tuple[str, ...] | None = None,
137-
library_dirs: list[str] | tuple[str, ...] | None = None,
138-
runtime_library_dirs: list[str] | tuple[str, ...] | None = None,
139-
export_symbols: Iterable[str] | None = None,
140-
debug: bool = False,
141-
extra_preargs: list[str] | None = None,
142-
extra_postargs: list[str] | None = None,
143-
build_temp: StrPath | None = None,
144-
target_lang: str | None = None,
145-
) -> None: ...
146-
def preprocess(
147-
self,
148-
source: StrPath,
149-
output_file: StrPath | None = None,
150-
macros: list[_Macro] | None = None,
151-
include_dirs: list[str] | tuple[str, ...] | None = None,
152-
extra_preargs: list[str] | None = None,
153-
extra_postargs: Iterable[str] | None = None,
154-
) -> None: ...
155-
@overload
156-
def executable_filename(self, basename: str, strip_dir: Literal[False] = False, output_dir: StrPath = "") -> str: ...
157-
@overload
158-
def executable_filename(self, basename: StrPath, strip_dir: Literal[True], output_dir: StrPath = "") -> str: ...
159-
def library_filename(
160-
self, libname: str, lib_type: str = "static", strip_dir: bool = False, output_dir: StrPath = ""
161-
) -> str: ...
162-
def object_filenames(
163-
self, source_filenames: Iterable[StrPath], strip_dir: bool = False, output_dir: StrPath | None = ""
164-
) -> list[str]: ...
165-
@overload
166-
def shared_object_filename(self, basename: str, strip_dir: Literal[False] = False, output_dir: StrPath = "") -> str: ...
167-
@overload
168-
def shared_object_filename(self, basename: StrPath, strip_dir: Literal[True], output_dir: StrPath = "") -> str: ...
169-
def execute(
170-
self, func: Callable[[Unpack[_Ts]], Unused], args: tuple[Unpack[_Ts]], msg: str | None = None, level: int = 1
171-
) -> None: ...
172-
def spawn(self, cmd: MutableSequence[bytes | StrPath]) -> None: ...
173-
def mkpath(self, name: str, mode: int = 0o777) -> None: ...
174-
@overload
175-
def move_file(self, src: StrPath, dst: _StrPathT) -> _StrPathT | str: ...
176-
@overload
177-
def move_file(self, src: BytesPath, dst: _BytesPathT) -> _BytesPathT | bytes: ...
178-
def announce(self, msg: str, level: int = 1) -> None: ...
179-
def warn(self, msg: str) -> None: ...
180-
def debug_print(self, msg: str) -> None: ...
15+
CCompiler = base.Compiler

0 commit comments

Comments
 (0)