mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Bump setuptools to 69.2.* (#11603)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
version = "69.1.*"
|
||||
version = "69.2.*"
|
||||
upstream_repository = "https://github.com/pypa/setuptools"
|
||||
|
||||
[tool.stubtest]
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
from _typeshed import StrPath
|
||||
from abc import abstractmethod
|
||||
from collections.abc import Iterable, Mapping, Sequence
|
||||
from typing import Any
|
||||
|
||||
from ._distutils.cmd import Command as _Command
|
||||
from .depends import Require as Require
|
||||
from .discovery import _Path
|
||||
from .dist import Distribution as Distribution
|
||||
from .extension import Extension as Extension
|
||||
from .warnings import SetuptoolsDeprecationWarning as SetuptoolsDeprecationWarning
|
||||
@@ -25,8 +25,8 @@ __version__: str
|
||||
# Pytype fails with the following:
|
||||
# find_packages = PackageFinder.find
|
||||
# find_namespace_packages = PEP420PackageFinder.find
|
||||
def find_packages(where: _Path = ".", exclude: Iterable[str] = (), include: Iterable[str] = ("*",)) -> list[str]: ...
|
||||
def find_namespace_packages(where: _Path = ".", exclude: Iterable[str] = (), include: Iterable[str] = ("*",)) -> list[str]: ...
|
||||
def find_packages(where: StrPath = ".", exclude: Iterable[str] = (), include: Iterable[str] = ("*",)) -> list[str]: ...
|
||||
def find_namespace_packages(where: StrPath = ".", exclude: Iterable[str] = (), include: Iterable[str] = ("*",)) -> list[str]: ...
|
||||
def setup(
|
||||
*,
|
||||
name: str = ...,
|
||||
@@ -73,6 +73,7 @@ def setup(
|
||||
|
||||
class Command(_Command):
|
||||
command_consumes_arguments: bool
|
||||
distribution: Distribution
|
||||
def __init__(self, dist: Distribution, **kw: Any) -> None: ...
|
||||
def ensure_string_list(self, option: str | list[str]) -> None: ...
|
||||
def reinitialize_command(self, command: _Command | str, reinit_subcommands: int = 0, **kw: Any) -> _Command: ...
|
||||
|
||||
@@ -116,7 +116,7 @@ class _SplitArgs(TypedDict, total=False):
|
||||
posix: bool
|
||||
|
||||
class CommandSpec(list[str]):
|
||||
options: list[Incomplete]
|
||||
options: list[str]
|
||||
split_args: ClassVar[_SplitArgs]
|
||||
@classmethod
|
||||
def best(cls) -> type[CommandSpec]: ...
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from _typeshed import Incomplete, StrPath
|
||||
from enum import Enum
|
||||
from pathlib import Path
|
||||
from types import TracebackType
|
||||
@@ -11,7 +11,6 @@ from ..warnings import SetuptoolsWarning
|
||||
|
||||
# Actually from wheel.wheelfile import WheelFile
|
||||
_WheelFile: TypeAlias = Incomplete
|
||||
_Path: TypeAlias = str | Path
|
||||
|
||||
class _EditableMode(Enum):
|
||||
STRICT: str
|
||||
@@ -53,7 +52,7 @@ class _StaticPth:
|
||||
class _LinkTree(_StaticPth):
|
||||
auxiliary_dir: Incomplete
|
||||
build_lib: Incomplete
|
||||
def __init__(self, dist: Distribution, name: str, auxiliary_dir: _Path, build_lib: _Path) -> None: ...
|
||||
def __init__(self, dist: Distribution, name: str, auxiliary_dir: StrPath, build_lib: StrPath) -> None: ...
|
||||
def __call__(self, wheel: _WheelFile, files: list[str], mapping: dict[str, str]): ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
|
||||
@@ -5,7 +5,7 @@ from .. import Command
|
||||
class rotate(Command):
|
||||
description: str
|
||||
user_options: Any
|
||||
boolean_options: Any
|
||||
boolean_options: list[str]
|
||||
match: Any
|
||||
dist_dir: Any
|
||||
keep: Any
|
||||
|
||||
7
stubs/setuptools/setuptools/compat/py39.pyi
Normal file
7
stubs/setuptools/setuptools/compat/py39.pyi
Normal file
@@ -0,0 +1,7 @@
|
||||
import sys
|
||||
from typing import Final
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
LOCALE_ENCODING: Final = "locale"
|
||||
else:
|
||||
LOCALE_ENCODING: Final = None
|
||||
@@ -1,15 +1,13 @@
|
||||
import os
|
||||
from _typeshed import Incomplete
|
||||
from _typeshed import Incomplete, StrPath
|
||||
from collections.abc import Callable, Iterable, Iterator, Mapping
|
||||
from importlib.machinery import ModuleSpec
|
||||
from types import TracebackType
|
||||
from typing import TypeVar
|
||||
from typing_extensions import Self, TypeAlias
|
||||
from typing_extensions import Self
|
||||
|
||||
from ..dist import Distribution
|
||||
|
||||
chain_iter: Incomplete
|
||||
_Path: TypeAlias = str | os.PathLike[Incomplete]
|
||||
_K = TypeVar("_K")
|
||||
_VCo = TypeVar("_VCo", covariant=True)
|
||||
|
||||
@@ -17,22 +15,22 @@ class StaticModule:
|
||||
def __init__(self, name: str, spec: ModuleSpec) -> None: ...
|
||||
def __getattr__(self, attr): ...
|
||||
|
||||
def glob_relative(patterns: Iterable[str], root_dir: _Path | None = None) -> list[str]: ...
|
||||
def read_files(filepaths: str | bytes | Iterable[_Path], root_dir: Incomplete | None = None) -> str: ...
|
||||
def read_attr(attr_desc: str, package_dir: Mapping[str, str] | None = None, root_dir: _Path | None = None): ...
|
||||
def glob_relative(patterns: Iterable[str], root_dir: StrPath | None = None) -> list[str]: ...
|
||||
def read_files(filepaths: str | bytes | Iterable[StrPath], root_dir: Incomplete | None = None) -> str: ...
|
||||
def read_attr(attr_desc: str, package_dir: Mapping[str, str] | None = None, root_dir: StrPath | None = None): ...
|
||||
def resolve_class(
|
||||
qualified_class_name: str, package_dir: Mapping[str, str] | None = None, root_dir: _Path | None = None
|
||||
qualified_class_name: str, package_dir: Mapping[str, str] | None = None, root_dir: StrPath | None = None
|
||||
) -> Callable[..., Incomplete]: ...
|
||||
def cmdclass(
|
||||
values: dict[str, str], package_dir: Mapping[str, str] | None = None, root_dir: _Path | None = None
|
||||
values: dict[str, str], package_dir: Mapping[str, str] | None = None, root_dir: StrPath | None = None
|
||||
) -> dict[str, Callable[..., Incomplete]]: ...
|
||||
def find_packages(
|
||||
*, namespaces: bool = True, fill_package_dir: dict[str, str] | None = None, root_dir: _Path | None = None, **kwargs
|
||||
*, namespaces: bool = True, fill_package_dir: dict[str, str] | None = None, root_dir: StrPath | None = None, **kwargs
|
||||
) -> list[str]: ...
|
||||
def version(value: Callable[..., Incomplete] | Iterable[str | int] | str) -> str: ...
|
||||
def canonic_package_data(package_data: dict[Incomplete, Incomplete]) -> dict[Incomplete, Incomplete]: ...
|
||||
def canonic_data_files(
|
||||
data_files: list[Incomplete] | dict[Incomplete, Incomplete], root_dir: _Path | None = None
|
||||
data_files: list[Incomplete] | dict[Incomplete, Incomplete], root_dir: StrPath | None = None
|
||||
) -> list[tuple[str, list[str]]]: ...
|
||||
def entry_points(text: str, text_source: str = "entry-points") -> dict[str, dict[Incomplete, Incomplete]]: ...
|
||||
|
||||
|
||||
@@ -1,23 +1,20 @@
|
||||
import os
|
||||
from _typeshed import Incomplete
|
||||
from _typeshed import Incomplete, StrPath
|
||||
from types import TracebackType
|
||||
from typing_extensions import Self, TypeAlias
|
||||
from typing_extensions import Self
|
||||
|
||||
from ..dist import Distribution
|
||||
from ..warnings import SetuptoolsWarning
|
||||
from . import expand
|
||||
|
||||
_Path: TypeAlias = str | os.PathLike[Incomplete]
|
||||
|
||||
def load_file(filepath: _Path) -> dict[Incomplete, Incomplete]: ...
|
||||
def validate(config: dict[Incomplete, Incomplete], filepath: _Path) -> bool: ...
|
||||
def apply_configuration(dist: Distribution, filepath: _Path, ignore_option_errors: bool = False) -> Distribution: ...
|
||||
def load_file(filepath: StrPath) -> dict[Incomplete, Incomplete]: ...
|
||||
def validate(config: dict[Incomplete, Incomplete], filepath: StrPath) -> bool: ...
|
||||
def apply_configuration(dist: Distribution, filepath: StrPath, ignore_option_errors: bool = False) -> Distribution: ...
|
||||
def read_configuration(
|
||||
filepath: _Path, expand: bool = True, ignore_option_errors: bool = False, dist: Distribution | None = None
|
||||
filepath: StrPath, expand: bool = True, ignore_option_errors: bool = False, dist: Distribution | None = None
|
||||
): ...
|
||||
def expand_configuration(
|
||||
config: dict[Incomplete, Incomplete],
|
||||
root_dir: _Path | None = None,
|
||||
root_dir: StrPath | None = None,
|
||||
ignore_option_errors: bool = False,
|
||||
dist: Distribution | None = None,
|
||||
) -> dict[Incomplete, Incomplete]: ...
|
||||
@@ -33,7 +30,7 @@ class _ConfigExpander:
|
||||
def __init__(
|
||||
self,
|
||||
config: dict[Incomplete, Incomplete],
|
||||
root_dir: _Path | None = None,
|
||||
root_dir: StrPath | None = None,
|
||||
ignore_option_errors: bool = False,
|
||||
dist: Distribution | None = None,
|
||||
) -> None: ...
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
import os
|
||||
from _typeshed import Incomplete
|
||||
from _typeshed import Incomplete, StrPath
|
||||
from typing import Generic, TypeVar
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from .._distutils.dist import DistributionMetadata
|
||||
from ..dist import Distribution
|
||||
from . import expand
|
||||
|
||||
_Path: TypeAlias = str | os.PathLike[Incomplete]
|
||||
SingleCommandOptions: Incomplete
|
||||
AllCommandOptions: Incomplete
|
||||
Target = TypeVar("Target", bound=Distribution | DistributionMetadata) # noqa: Y001 # Exists at runtime
|
||||
|
||||
def read_configuration(
|
||||
filepath: _Path, find_others: bool = False, ignore_option_errors: bool = False
|
||||
filepath: StrPath, find_others: bool = False, ignore_option_errors: bool = False
|
||||
) -> dict[Incomplete, Incomplete]: ...
|
||||
def apply_configuration(dist: Distribution, filepath: _Path) -> Distribution: ...
|
||||
def apply_configuration(dist: Distribution, filepath: StrPath) -> Distribution: ...
|
||||
def configuration_to_dict(
|
||||
handlers: tuple[ConfigHandler[Distribution | DistributionMetadata], ...]
|
||||
) -> dict[Incomplete, Incomplete]: ...
|
||||
@@ -57,7 +54,7 @@ class ConfigMetadataHandler(ConfigHandler[DistributionMetadata]):
|
||||
ignore_option_errors: bool,
|
||||
ensure_discovered: expand.EnsurePackagesDiscovered,
|
||||
package_dir: dict[Incomplete, Incomplete] | None = None,
|
||||
root_dir: _Path = ".",
|
||||
root_dir: StrPath = ".",
|
||||
) -> None: ...
|
||||
@property
|
||||
def parsers(self): ...
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
import os
|
||||
from _typeshed import Incomplete
|
||||
from _typeshed import Incomplete, StrPath
|
||||
from collections.abc import Iterable, Iterator, Mapping
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from . import Distribution
|
||||
|
||||
_Path: TypeAlias = str | os.PathLike[Incomplete]
|
||||
StrIter: TypeAlias = Iterator[str]
|
||||
chain_iter: Incomplete
|
||||
|
||||
@@ -18,7 +16,7 @@ class _Finder:
|
||||
ALWAYS_EXCLUDE: tuple[str, ...]
|
||||
DEFAULT_EXCLUDE: tuple[str, ...]
|
||||
@classmethod
|
||||
def find(cls, where: _Path = ".", exclude: Iterable[str] = (), include: Iterable[str] = ("*",)) -> list[str]: ...
|
||||
def find(cls, where: StrPath = ".", exclude: Iterable[str] = (), include: Iterable[str] = ("*",)) -> list[str]: ...
|
||||
|
||||
class PackageFinder(_Finder):
|
||||
ALWAYS_EXCLUDE: Incomplete
|
||||
@@ -40,6 +38,6 @@ class ConfigDiscovery:
|
||||
|
||||
def remove_nested_packages(packages: list[str]) -> list[str]: ...
|
||||
def remove_stubs(packages: list[str]) -> list[str]: ...
|
||||
def find_parent_package(packages: list[str], package_dir: Mapping[str, str], root_dir: _Path) -> str | None: ...
|
||||
def find_package_path(name: str, package_dir: Mapping[str, str], root_dir: _Path) -> str: ...
|
||||
def construct_package_dir(packages: list[str], package_path: _Path) -> dict[str, str]: ...
|
||||
def find_parent_package(packages: list[str], package_dir: Mapping[str, str], root_dir: StrPath) -> str | None: ...
|
||||
def find_package_path(name: str, package_dir: Mapping[str, str], root_dir: StrPath) -> str: ...
|
||||
def construct_package_dir(packages: list[str], package_path: StrPath) -> dict[str, str]: ...
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
def get_unpatched(item): ...
|
||||
from typing import TypeVar
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
__all__: list[str] = []
|
||||
|
||||
def get_unpatched(item: _T) -> _T: ...
|
||||
def get_unpatched_class(cls): ...
|
||||
def patch_all() -> None: ...
|
||||
def patch_func(replacement, target_mod, func_name) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user