From 141086f4f0cbad66ca9f610066a02c3615c82e6a Mon Sep 17 00:00:00 2001 From: stubsabot <> Date: Tue, 13 Feb 2024 00:10:52 +0000 Subject: [PATCH 1/5] [stubsabot] Bump setuptools to 69.1.* Release: https://pypi.org/pypi/setuptools/69.1.0 Homepage: https://github.com/pypa/setuptools Repository: https://github.com/pypa/setuptools Changelog: https://setuptools.pypa.io/en/stable/history.html Diff: https://github.com/pypa/setuptools/compare/v69.0.3...v69.1.0 Stubsabot analysis of the diff between the two releases: - 2 public Python files have been added: `setuptools/compat/__init__.py`, `setuptools/compat/py310.py`. - 0 files included in typeshed's stubs have been deleted. - 31 files included in typeshed's stubs have been modified or renamed. - Total lines of Python code added: 935. - Total lines of Python code deleted: 1102. If stubtest fails for this PR: - Leave this PR open (as a reminder, and to prevent stubsabot from opening another PR) - Fix stubtest failures in another PR, then close this PR Note that you will need to close and re-open the PR in order to trigger CI --- stubs/setuptools/METADATA.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubs/setuptools/METADATA.toml b/stubs/setuptools/METADATA.toml index a47fec19f6f9..3455af6abc1f 100644 --- a/stubs/setuptools/METADATA.toml +++ b/stubs/setuptools/METADATA.toml @@ -1,4 +1,4 @@ -version = "69.0.*" +version = "69.1.*" upstream_repository = "https://github.com/pypa/setuptools" [tool.stubtest] From a0b0538428b9cb51776ea735974c12fbe47f06ae Mon Sep 17 00:00:00 2001 From: Avasam Date: Wed, 14 Feb 2024 13:03:34 -0500 Subject: [PATCH 2/5] Remove unused stubtest entries --- stubs/setuptools/@tests/stubtest_allowlist.txt | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/stubs/setuptools/@tests/stubtest_allowlist.txt b/stubs/setuptools/@tests/stubtest_allowlist.txt index 0acd265e8cb5..9edb8ef70a0b 100644 --- a/stubs/setuptools/@tests/stubtest_allowlist.txt +++ b/stubs/setuptools/@tests/stubtest_allowlist.txt @@ -1,17 +1,3 @@ -# These are used like protocols, but forgot to specify "self" as the first method param -pkg_resources.IResourceProvider.get_resource_filename -pkg_resources.IResourceProvider.get_resource_stream -pkg_resources.IResourceProvider.get_resource_string -pkg_resources.IResourceProvider.has_resource -pkg_resources.IResourceProvider.resource_isdir -pkg_resources.IResourceProvider.resource_listdir -pkg_resources.IMetadataProvider.get_metadata -pkg_resources.IMetadataProvider.get_metadata_lines -pkg_resources.IMetadataProvider.has_metadata -pkg_resources.IMetadataProvider.metadata_isdir -pkg_resources.IMetadataProvider.metadata_listdir -pkg_resources.IMetadataProvider.run_script - # Is always set in __init__ pkg_resources.PathMetadata.egg_info pkg_resources.EggMetadata.loader From a67549633392f24a50f8edcacde7f0af5e7e4349 Mon Sep 17 00:00:00 2001 From: Avasam Date: Wed, 14 Feb 2024 13:12:20 -0500 Subject: [PATCH 3/5] Update modules --- stubs/setuptools/setuptools/compat/__init__.pyi | 0 stubs/setuptools/setuptools/compat/py310.pyi | 8 ++++++++ .../setuptools/{py312compat.pyi => compat/py311.pyi} | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 stubs/setuptools/setuptools/compat/__init__.pyi create mode 100644 stubs/setuptools/setuptools/compat/py310.pyi rename stubs/setuptools/setuptools/{py312compat.pyi => compat/py311.pyi} (69%) diff --git a/stubs/setuptools/setuptools/compat/__init__.pyi b/stubs/setuptools/setuptools/compat/__init__.pyi new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/stubs/setuptools/setuptools/compat/py310.pyi b/stubs/setuptools/setuptools/compat/py310.pyi new file mode 100644 index 000000000000..cca12122067d --- /dev/null +++ b/stubs/setuptools/setuptools/compat/py310.pyi @@ -0,0 +1,8 @@ +import sys + +__all__ = ["tomllib"] + +if sys.version_info >= (3, 11): + import tomllib +else: + import tomli as tomllib diff --git a/stubs/setuptools/setuptools/py312compat.pyi b/stubs/setuptools/setuptools/compat/py311.pyi similarity index 69% rename from stubs/setuptools/setuptools/py312compat.pyi rename to stubs/setuptools/setuptools/compat/py311.pyi index 898cfa8f5e50..961f2dbdb8b5 100644 --- a/stubs/setuptools/setuptools/py312compat.pyi +++ b/stubs/setuptools/setuptools/compat/py311.pyi @@ -1,3 +1,3 @@ from _typeshed import Incomplete, StrOrBytesPath -def shutil_rmtree(path: StrOrBytesPath, ignore_errors: bool = False, onexc: Incomplete | None = None) -> None: ... +def shutil_rmtree(path: StrOrBytesPath, ignore_errors: bool = False, onexc: Incomplete | None = None): ... From 26cf7146a81c247812c5515baa92b656e8d53a9c Mon Sep 17 00:00:00 2001 From: Avasam Date: Wed, 14 Feb 2024 13:28:46 -0500 Subject: [PATCH 4/5] Vendored tomli --- stubs/setuptools/METADATA.toml | 1 + stubs/setuptools/setuptools/compat/py310.pyi | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/stubs/setuptools/METADATA.toml b/stubs/setuptools/METADATA.toml index 3455af6abc1f..a203eb119198 100644 --- a/stubs/setuptools/METADATA.toml +++ b/stubs/setuptools/METADATA.toml @@ -4,3 +4,4 @@ upstream_repository = "https://github.com/pypa/setuptools" [tool.stubtest] # darwin is equivalent to linux for OS-specific methods platforms = ["linux", "win32"] +stubtest_requirements = ["tomli"] diff --git a/stubs/setuptools/setuptools/compat/py310.pyi b/stubs/setuptools/setuptools/compat/py310.pyi index cca12122067d..9e27329c7d96 100644 --- a/stubs/setuptools/setuptools/compat/py310.pyi +++ b/stubs/setuptools/setuptools/compat/py310.pyi @@ -5,4 +5,5 @@ __all__ = ["tomllib"] if sys.version_info >= (3, 11): import tomllib else: - import tomli as tomllib + # This is actually vendored + import tomli as tomllib # type: ignore[import-not-found] # pyright: ignore[reportMissingImports] From 36727c258490293bcd188796b011b9bdfa6f5e8f Mon Sep 17 00:00:00 2001 From: Avasam Date: Wed, 14 Feb 2024 13:48:37 -0500 Subject: [PATCH 5/5] Fix stubtest --- stubs/setuptools/setuptools/command/test.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubs/setuptools/setuptools/command/test.pyi b/stubs/setuptools/setuptools/command/test.pyi index 1764926f94bf..c475e1d097bc 100644 --- a/stubs/setuptools/setuptools/command/test.pyi +++ b/stubs/setuptools/setuptools/command/test.pyi @@ -33,7 +33,7 @@ class test(Command): @NonDataProperty def test_args(self) -> list[str]: ... def with_project_on_sys_path(self, func) -> None: ... - def project_on_sys_path(self, include_dists=[]): ... + def project_on_sys_path(self, include_dists=()): ... @staticmethod def paths_on_pythonpath(paths) -> None: ... @staticmethod