diff --git a/stubs/setuptools/@tests/stubtest_allowlist.txt b/stubs/setuptools/@tests/stubtest_allowlist.txt index 1ab28e6f7..63e78b22b 100644 --- a/stubs/setuptools/@tests/stubtest_allowlist.txt +++ b/stubs/setuptools/@tests/stubtest_allowlist.txt @@ -63,7 +63,6 @@ setuptools._distutils.command.install.SCHEME_KEYS setuptools._distutils.command.install.WINDOWS_SCHEME setuptools._distutils.command.install_lib.PYTHON_SOURCE_EXTENSION setuptools._distutils.command.sdist -setuptools._distutils.command.sdist.show_formats setuptools._distutils.command.register setuptools._distutils.command.upload setuptools._distutils.config.DEFAULT_PYPIRC @@ -91,7 +90,6 @@ setuptools._distutils.util.MACOSX_VERSION_VAR # (Many of these may be implementation details, # but they can be added if people ask for them) setuptools._distutils.bcppcompiler -setuptools._distutils.command.bdist setuptools._distutils.command.bdist_dumb setuptools._distutils.command.build_scripts setuptools._distutils.command.check @@ -100,7 +98,7 @@ setuptools._distutils.command.config setuptools._distutils.command.install_data setuptools._distutils.command.install_egg_info setuptools._distutils.command.install_headers -setuptools._distutils.command.py37compat +setuptools._distutils.compat.py38 setuptools._distutils.core setuptools._distutils.cygwinccompiler setuptools._distutils.debug @@ -117,6 +115,7 @@ setuptools._distutils.text_file setuptools._distutils.unixccompiler setuptools._distutils.version setuptools._distutils.versionpredicate +setuptools._distutils.zosccompiler # Reexported from setuptools._distutils; problems should be fixed there distutils\..+ diff --git a/stubs/setuptools/METADATA.toml b/stubs/setuptools/METADATA.toml index af26853bd..e43d1d0f0 100644 --- a/stubs/setuptools/METADATA.toml +++ b/stubs/setuptools/METADATA.toml @@ -1,4 +1,4 @@ -version = "69.2.*" +version = "69.5.*" upstream_repository = "https://github.com/pypa/setuptools" [tool.stubtest] diff --git a/stubs/setuptools/distutils/command/bdist.pyi b/stubs/setuptools/distutils/command/bdist.pyi new file mode 100644 index 000000000..3445de9fb --- /dev/null +++ b/stubs/setuptools/distutils/command/bdist.pyi @@ -0,0 +1 @@ +from setuptools._distutils.command.bdist import * diff --git a/stubs/setuptools/distutils/compat/__init__.pyi b/stubs/setuptools/distutils/compat/__init__.pyi new file mode 100644 index 000000000..bbcbf9cc1 --- /dev/null +++ b/stubs/setuptools/distutils/compat/__init__.pyi @@ -0,0 +1 @@ +from setuptools._distutils.compat import * diff --git a/stubs/setuptools/setuptools/_distutils/ccompiler.pyi b/stubs/setuptools/setuptools/_distutils/ccompiler.pyi index 7214853a2..5d439131b 100644 --- a/stubs/setuptools/setuptools/_distutils/ccompiler.pyi +++ b/stubs/setuptools/setuptools/_distutils/ccompiler.pyi @@ -149,7 +149,7 @@ class CCompiler: extra_postargs: list[str] | None = ..., ) -> None: ... def executable_filename(self, basename: str, strip_dir: int = ..., output_dir: str = ...) -> str: ... - def library_filename(self, libname: str, lib_type: str = ..., strip_dir: int = ..., output_dir: str = ...) -> str: ... + def library_filename(self, libname: str, lib_type: str = "static", strip_dir: int = 0, output_dir: str = "") -> str: ... def object_filenames(self, source_filenames: list[str], strip_dir: int = ..., output_dir: str = ...) -> list[str]: ... def shared_object_filename(self, basename: str, strip_dir: int = ..., output_dir: str = ...) -> str: ... def execute(self, func: Callable[..., object], args: tuple[Any, ...], msg: str | None = ..., level: int = ...) -> None: ... diff --git a/stubs/setuptools/setuptools/_distutils/command/bdist.pyi b/stubs/setuptools/setuptools/_distutils/command/bdist.pyi new file mode 100644 index 000000000..d12773033 --- /dev/null +++ b/stubs/setuptools/setuptools/_distutils/command/bdist.pyi @@ -0,0 +1,25 @@ +from _typeshed import Unused +from typing import ClassVar +from typing_extensions import deprecated + +from ..cmd import Command + +def show_formats() -> None: ... + +class ListCompat(dict[str, tuple[str, str]]): + @deprecated("format_commands is now a dict. append is deprecated") + def append(self, item: Unused) -> None: ... + +class bdist(Command): + description: ClassVar[str] + user_options: ClassVar[list[tuple[str | None, str | None, str | None]]] + boolean_options: ClassVar[list[str]] + help_options: ClassVar[list[tuple[str | None, ...]]] + no_format_option: ClassVar[tuple[str, ...]] + default_format: ClassVar[dict[str, str]] + format_commands: ClassVar[ListCompat] + format_command = format_commands + + def initialize_options(self) -> None: ... + def finalize_options(self) -> None: ... + def run(self) -> None: ... diff --git a/stubs/setuptools/setuptools/_distutils/command/register.pyi b/stubs/setuptools/setuptools/_distutils/command/register.pyi index 891d6a2a5..aed590b45 100644 --- a/stubs/setuptools/setuptools/_distutils/command/register.pyi +++ b/stubs/setuptools/setuptools/_distutils/command/register.pyi @@ -1,7 +1,11 @@ from _typeshed import Incomplete +from collections.abc import Iterable, Iterator +from typing import AnyStr, TypeVar, overload from ..config import PyPIRCCommand +_T = TypeVar("_T") + class register(PyPIRCCommand): description: str list_classifiers: int @@ -15,3 +19,12 @@ class register(PyPIRCCommand): def send_metadata(self) -> None: ... def build_post_data(self, action): ... def post_to_server(self, data, auth: Incomplete | None = ...): ... + +@overload +def make_iterable(values: None) -> list[None]: ... +@overload +def make_iterable(values: AnyStr) -> Iterator[AnyStr]: ... +@overload +def make_iterable(values: Iterable[_T]) -> Iterator[_T]: ... +@overload +def make_iterable(values: _T) -> Iterator[_T]: ... diff --git a/stubs/setuptools/setuptools/_distutils/command/sdist.pyi b/stubs/setuptools/setuptools/_distutils/command/sdist.pyi index b724561ef..bb30ab141 100644 --- a/stubs/setuptools/setuptools/_distutils/command/sdist.pyi +++ b/stubs/setuptools/setuptools/_distutils/command/sdist.pyi @@ -1,10 +1,16 @@ from _typeshed import Incomplete +from typing import ClassVar +from typing_extensions import deprecated from ..cmd import Command +def show_formats() -> None: ... + class sdist(Command): - description: str + description: ClassVar[str] + def checking_metadata(self): ... + user_options: Incomplete boolean_options: Incomplete help_options: Incomplete @@ -27,6 +33,7 @@ class sdist(Command): def finalize_options(self) -> None: ... filelist: Incomplete def run(self) -> None: ... + @deprecated("distutils.command.sdist.check_metadata is deprecated, use the check command instead") def check_metadata(self) -> None: ... def get_file_list(self) -> None: ... def add_defaults(self) -> None: ... @@ -37,3 +44,5 @@ class sdist(Command): def make_release_tree(self, base_dir, files) -> None: ... def make_distribution(self) -> None: ... def get_archive_files(self): ... + +def is_comment(line: str) -> bool: ... diff --git a/stubs/setuptools/setuptools/_distutils/command/upload.pyi b/stubs/setuptools/setuptools/_distutils/command/upload.pyi index afcfbaf48..2147b5717 100644 --- a/stubs/setuptools/setuptools/_distutils/command/upload.pyi +++ b/stubs/setuptools/setuptools/_distutils/command/upload.pyi @@ -1,8 +1,11 @@ from _typeshed import Incomplete -from typing import ClassVar +from collections.abc import Iterable, Iterator +from typing import AnyStr, ClassVar, TypeVar, overload from ..config import PyPIRCCommand +_T = TypeVar("_T") + class upload(PyPIRCCommand): description: ClassVar[str] username: str @@ -16,3 +19,12 @@ class upload(PyPIRCCommand): def finalize_options(self) -> None: ... def run(self) -> None: ... def upload_file(self, command: str, pyversion: str, filename: str) -> None: ... + +@overload +def make_iterable(values: None) -> list[None]: ... +@overload +def make_iterable(values: AnyStr) -> Iterator[AnyStr]: ... +@overload +def make_iterable(values: Iterable[_T]) -> Iterator[_T]: ... +@overload +def make_iterable(values: _T) -> Iterator[_T]: ... diff --git a/stubs/setuptools/setuptools/_distutils/compat/__init__.pyi b/stubs/setuptools/setuptools/_distutils/compat/__init__.pyi new file mode 100644 index 000000000..39acc295d --- /dev/null +++ b/stubs/setuptools/setuptools/_distutils/compat/__init__.pyi @@ -0,0 +1 @@ +def consolidate_linker_args(args: list[str]) -> str | list[str]: ...