From 5e2be21e17c03316316cefe61a8a1daac44e3bc8 Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Mon, 17 Mar 2025 15:49:15 +0100 Subject: [PATCH 01/17] [CI] Run stubtest with Python 3.13 --- .github/workflows/daily.yml | 2 +- .github/workflows/stubtest_third_party.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index 90823ea70308..c3c42c81a729 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -66,7 +66,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" cache: pip cache-dependency-path: | requirements-tests.txt diff --git a/.github/workflows/stubtest_third_party.yml b/.github/workflows/stubtest_third_party.yml index 8e7105b9ddf0..69ec7c6ac625 100644 --- a/.github/workflows/stubtest_third_party.yml +++ b/.github/workflows/stubtest_third_party.yml @@ -41,7 +41,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" cache: pip cache-dependency-path: | requirements-tests.txt From 81606ef57f491910d9711142c93dabf74f98e573 Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Mon, 17 Mar 2025 17:01:58 +0100 Subject: [PATCH 02/17] Disable stubtest for corus --- stubs/corus/METADATA.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stubs/corus/METADATA.toml b/stubs/corus/METADATA.toml index f966ab456995..ceca43a98dae 100644 --- a/stubs/corus/METADATA.toml +++ b/stubs/corus/METADATA.toml @@ -1,2 +1,6 @@ version = "0.10.*" upstream_repository = "https://github.com/natasha/corus" + +[tool.stubtest] +# As of 2025-03-17, corus doesn't support Python 3.13. +skip = true From 317b9cf257a98635a1ca8bfbe993b842334a7cd6 Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Mon, 17 Mar 2025 19:06:53 +0100 Subject: [PATCH 03/17] Ignore missing TypedDict fields Cf. https://github.com/python/mypy/issues/18810 --- stubs/seaborn/@tests/stubtest_allowlist.txt | 4 ++++ stubs/setuptools/@tests/stubtest_allowlist.txt | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/stubs/seaborn/@tests/stubtest_allowlist.txt b/stubs/seaborn/@tests/stubtest_allowlist.txt index 72f2518d97d1..0cc9b1e6dc53 100644 --- a/stubs/seaborn/@tests/stubtest_allowlist.txt +++ b/stubs/seaborn/@tests/stubtest_allowlist.txt @@ -5,3 +5,7 @@ seaborn.external.docscrape.NumpyDocString.__str__ # weird signature seaborn.axisgrid.Grid.tight_layout # the method doesn't really take pos args but runtime has *args seaborn.external.appdirs.unicode + +# https://github.com/python/mypy/issues/18810 +.*\.__mutable_keys__ +.*\.__readonly_keys__ diff --git a/stubs/setuptools/@tests/stubtest_allowlist.txt b/stubs/setuptools/@tests/stubtest_allowlist.txt index ef8af309865d..f445724a6466 100644 --- a/stubs/setuptools/@tests/stubtest_allowlist.txt +++ b/stubs/setuptools/@tests/stubtest_allowlist.txt @@ -97,3 +97,7 @@ setuptools.config._validate_pyproject.* setuptools.compat.* setuptools.command.build_py.build_py.existing_egg_info_dir .+?\.tests.* + +# https://github.com/python/mypy/issues/18810 +.*\.__mutable_keys__ +.*\.__readonly_keys__ From 8e64080f067d73245c910e6c974274d6e7b5b1c6 Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Mon, 17 Mar 2025 19:21:30 +0100 Subject: [PATCH 04/17] Update issue links --- stubs/seaborn/@tests/stubtest_allowlist.txt | 2 +- stubs/setuptools/@tests/stubtest_allowlist.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stubs/seaborn/@tests/stubtest_allowlist.txt b/stubs/seaborn/@tests/stubtest_allowlist.txt index 0cc9b1e6dc53..2a901e7d32b3 100644 --- a/stubs/seaborn/@tests/stubtest_allowlist.txt +++ b/stubs/seaborn/@tests/stubtest_allowlist.txt @@ -6,6 +6,6 @@ seaborn.axisgrid.Grid.tight_layout # the method doesn't really take pos args bu seaborn.external.appdirs.unicode -# https://github.com/python/mypy/issues/18810 +# https://github.com/python/typeshed/pull/13646 .*\.__mutable_keys__ .*\.__readonly_keys__ diff --git a/stubs/setuptools/@tests/stubtest_allowlist.txt b/stubs/setuptools/@tests/stubtest_allowlist.txt index f445724a6466..efb301223e53 100644 --- a/stubs/setuptools/@tests/stubtest_allowlist.txt +++ b/stubs/setuptools/@tests/stubtest_allowlist.txt @@ -98,6 +98,6 @@ setuptools.compat.* setuptools.command.build_py.build_py.existing_egg_info_dir .+?\.tests.* -# https://github.com/python/mypy/issues/18810 +# https://github.com/python/typeshed/pull/13646 .*\.__mutable_keys__ .*\.__readonly_keys__ From 3bb76165aa2363a80862a5908ab085612b8180ad Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Mon, 17 Mar 2025 19:42:29 +0100 Subject: [PATCH 05/17] Remove now unnecessary stubtest allowlist entries --- stubs/seaborn/@tests/stubtest_allowlist.txt | 4 ---- stubs/setuptools/@tests/stubtest_allowlist.txt | 4 ---- 2 files changed, 8 deletions(-) diff --git a/stubs/seaborn/@tests/stubtest_allowlist.txt b/stubs/seaborn/@tests/stubtest_allowlist.txt index 2a901e7d32b3..72f2518d97d1 100644 --- a/stubs/seaborn/@tests/stubtest_allowlist.txt +++ b/stubs/seaborn/@tests/stubtest_allowlist.txt @@ -5,7 +5,3 @@ seaborn.external.docscrape.NumpyDocString.__str__ # weird signature seaborn.axisgrid.Grid.tight_layout # the method doesn't really take pos args but runtime has *args seaborn.external.appdirs.unicode - -# https://github.com/python/typeshed/pull/13646 -.*\.__mutable_keys__ -.*\.__readonly_keys__ diff --git a/stubs/setuptools/@tests/stubtest_allowlist.txt b/stubs/setuptools/@tests/stubtest_allowlist.txt index efb301223e53..ef8af309865d 100644 --- a/stubs/setuptools/@tests/stubtest_allowlist.txt +++ b/stubs/setuptools/@tests/stubtest_allowlist.txt @@ -97,7 +97,3 @@ setuptools.config._validate_pyproject.* setuptools.compat.* setuptools.command.build_py.build_py.existing_egg_info_dir .+?\.tests.* - -# https://github.com/python/typeshed/pull/13646 -.*\.__mutable_keys__ -.*\.__readonly_keys__ From 988875fbb74b195296911ce2bd636b71a644169a Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Mon, 17 Mar 2025 20:09:22 +0100 Subject: [PATCH 06/17] Use a version instead of a date --- stubs/corus/METADATA.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubs/corus/METADATA.toml b/stubs/corus/METADATA.toml index ceca43a98dae..e7cf25599620 100644 --- a/stubs/corus/METADATA.toml +++ b/stubs/corus/METADATA.toml @@ -2,5 +2,5 @@ version = "0.10.*" upstream_repository = "https://github.com/natasha/corus" [tool.stubtest] -# As of 2025-03-17, corus doesn't support Python 3.13. +# As of version 0.10.0, corus doesn't support Python 3.13. skip = true From 3891c82624795f7da1e0c08dc0cc83a2c28038f5 Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Mon, 17 Mar 2025 20:06:44 +0100 Subject: [PATCH 07/17] tensorflow doesn't support Python 3.13 --- stubs/tensorflow/METADATA.toml | 3 +++ stubs/tqdm/METADATA.toml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/stubs/tensorflow/METADATA.toml b/stubs/tensorflow/METADATA.toml index 66c658d2a6ce..94d4b9f8a08b 100644 --- a/stubs/tensorflow/METADATA.toml +++ b/stubs/tensorflow/METADATA.toml @@ -10,3 +10,6 @@ partial_stub = true ignore_missing_stub = true # TODO: Support/update to keras 3.7 stubtest_requirements = ["keras==3.6.*"] +# tensorflow 2.19 doesn't support Python 3.13: +# https://github.com/tensorflow/tensorflow/issues/78774 +skip = true diff --git a/stubs/tqdm/METADATA.toml b/stubs/tqdm/METADATA.toml index fddf4c03eb49..5db7be3f6223 100644 --- a/stubs/tqdm/METADATA.toml +++ b/stubs/tqdm/METADATA.toml @@ -5,3 +5,6 @@ requires = ["types-requests"] [tool.stubtest] extras = ["slack", "telegram"] stubtest_requirements = ["dask", "pandas", "rich", "tensorflow"] +# tensorflow 2.19 doesn't support Python 3.13: +# https://github.com/tensorflow/tensorflow/issues/78774 +skip = true From b05bff21a20af47e8c00080cf3b88f9b7069be6a Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Mon, 17 Mar 2025 22:34:01 +0100 Subject: [PATCH 08/17] Skip tree-sitter-languages stubtest --- stubs/tree-sitter-languages/METADATA.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/stubs/tree-sitter-languages/METADATA.toml b/stubs/tree-sitter-languages/METADATA.toml index 055b8d94dd38..b139562018f3 100644 --- a/stubs/tree-sitter-languages/METADATA.toml +++ b/stubs/tree-sitter-languages/METADATA.toml @@ -1,3 +1,9 @@ version = "1.10.*" upstream_repository = "https://github.com/grantjenks/py-tree-sitter-languages" requires = ["tree-sitter>=0.20.3"] + +[tool.stubtest] +# This package is unmaintained and doesn't support Python 3.13. +# See https://github.com/grantjenks/py-tree-sitter-languages/issues/75 and +# https://github.com/grantjenks/py-tree-sitter-languages/blob/main/README.rst#status +skip = true From 6e8c1388d9dc3d4e95e0b950dfea25280997e9e1 Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Mon, 17 Mar 2025 22:40:14 +0100 Subject: [PATCH 09/17] Skip pygit2 in stubtest --- stubs/pygit2/METADATA.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stubs/pygit2/METADATA.toml b/stubs/pygit2/METADATA.toml index 13eec7dc9537..5ef2fb2a2da5 100644 --- a/stubs/pygit2/METADATA.toml +++ b/stubs/pygit2/METADATA.toml @@ -5,3 +5,5 @@ obsolete_since = "1.16.0" # Released on 2024-10-11 [tool.stubtest] platforms = ["darwin", "linux", "win32"] +# Does not build on any platform for stubtest as of 2025-03-17. +skip = true From b68e3a6e7027b837963142e58baf3eb2e340408a Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Mon, 17 Mar 2025 22:53:18 +0100 Subject: [PATCH 10/17] Skip stubtest for cffi --- stubs/cffi/METADATA.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stubs/cffi/METADATA.toml b/stubs/cffi/METADATA.toml index f1607a4d9f2a..845e89684e35 100644 --- a/stubs/cffi/METADATA.toml +++ b/stubs/cffi/METADATA.toml @@ -5,3 +5,5 @@ requires = ["types-setuptools"] [tool.stubtest] # linux and darwin are mostly equivalent, except for a single `RTLD_DEEPBIND` variable platforms = ["linux", "win32"] +# cffi 1.16 doesn't support Python 3.13. Support was added in cffi 1.17.0. +skip = true From 9b5df260a7f801db9e124574af27f24238a1b4fa Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Mon, 17 Mar 2025 22:59:54 +0100 Subject: [PATCH 11/17] Revert "Skip stubtest for cffi" This reverts commit b68e3a6e7027b837963142e58baf3eb2e340408a. --- stubs/cffi/METADATA.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/stubs/cffi/METADATA.toml b/stubs/cffi/METADATA.toml index 845e89684e35..f1607a4d9f2a 100644 --- a/stubs/cffi/METADATA.toml +++ b/stubs/cffi/METADATA.toml @@ -5,5 +5,3 @@ requires = ["types-setuptools"] [tool.stubtest] # linux and darwin are mostly equivalent, except for a single `RTLD_DEEPBIND` variable platforms = ["linux", "win32"] -# cffi 1.16 doesn't support Python 3.13. Support was added in cffi 1.17.0. -skip = true From 9d07c5de83a83fef6cafaf1fc31a931978d5a9c3 Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Mon, 17 Mar 2025 23:50:15 +0100 Subject: [PATCH 12/17] Skip humanfriendly --- stubs/humanfriendly/METADATA.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stubs/humanfriendly/METADATA.toml b/stubs/humanfriendly/METADATA.toml index c8518e705021..eaca32d94d25 100644 --- a/stubs/humanfriendly/METADATA.toml +++ b/stubs/humanfriendly/METADATA.toml @@ -3,3 +3,5 @@ upstream_repository = "https://github.com/xolox/python-humanfriendly" [tool.stubtest] stubtest_requirements = ["docutils", "mock"] +# Package is unsupported and doesn't support Python 3.13 as of 2025-03-17. +skip = true From b9d4a4c518a6e204694851c2ea1a3ae95086cf9b Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Tue, 18 Mar 2025 12:05:05 +0100 Subject: [PATCH 13/17] Reenable tqdm Co-authored-by: Alex Waygood --- stubs/tqdm/METADATA.toml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/stubs/tqdm/METADATA.toml b/stubs/tqdm/METADATA.toml index 5db7be3f6223..025ae6e9e137 100644 --- a/stubs/tqdm/METADATA.toml +++ b/stubs/tqdm/METADATA.toml @@ -4,7 +4,6 @@ requires = ["types-requests"] [tool.stubtest] extras = ["slack", "telegram"] -stubtest_requirements = ["dask", "pandas", "rich", "tensorflow"] -# tensorflow 2.19 doesn't support Python 3.13: +# Add `"tensorflow"` to this list when there's a tensorflow release supporting Python 3.13: # https://github.com/tensorflow/tensorflow/issues/78774 -skip = true +stubtest_requirements = ["dask", "pandas", "rich"] From 691825e5352f9b419ab8bdbbaa4fee97b76fad8f Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Tue, 18 Mar 2025 12:18:38 +0100 Subject: [PATCH 14/17] Change pygit2 comment --- stubs/pygit2/METADATA.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubs/pygit2/METADATA.toml b/stubs/pygit2/METADATA.toml index 5ef2fb2a2da5..8f0525f88186 100644 --- a/stubs/pygit2/METADATA.toml +++ b/stubs/pygit2/METADATA.toml @@ -5,5 +5,5 @@ obsolete_since = "1.16.0" # Released on 2024-10-11 [tool.stubtest] platforms = ["darwin", "linux", "win32"] -# Does not build on any platform for stubtest as of 2025-03-17. +# Does not build on any platform on Python 3.13 as of 2025-03-17. skip = true From 03dbbb718798c78996293c55fb8a0397652302dd Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Tue, 18 Mar 2025 12:21:38 +0100 Subject: [PATCH 15/17] Stubtest ignore tqdm.keras --- stubs/tqdm/@tests/stubtest_allowlist.txt | 4 ++++ stubs/tqdm/METADATA.toml | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/stubs/tqdm/@tests/stubtest_allowlist.txt b/stubs/tqdm/@tests/stubtest_allowlist.txt index ca237a8d068d..89ed42aceaa4 100644 --- a/stubs/tqdm/@tests/stubtest_allowlist.txt +++ b/stubs/tqdm/@tests/stubtest_allowlist.txt @@ -6,3 +6,7 @@ tqdm._tqdm_notebook.__all__ # Cannot import in stubtest tqdm.__main__ + +# TODO: Reenable on tensorflow supports Python 3.13 and is added to the +# stubtest dependencies in METADATA.toml. +tqdm.keras diff --git a/stubs/tqdm/METADATA.toml b/stubs/tqdm/METADATA.toml index 025ae6e9e137..f218397eb207 100644 --- a/stubs/tqdm/METADATA.toml +++ b/stubs/tqdm/METADATA.toml @@ -4,6 +4,7 @@ requires = ["types-requests"] [tool.stubtest] extras = ["slack", "telegram"] -# Add `"tensorflow"` to this list when there's a tensorflow release supporting Python 3.13: -# https://github.com/tensorflow/tensorflow/issues/78774 +# Add `"tensorflow"` to this list when there's a tensorflow release supporting +# Python 3.13: https://github.com/tensorflow/tensorflow/issues/78774. +# Also remove tqdm.keras from @tests/stubtest_allowlist.txt. stubtest_requirements = ["dask", "pandas", "rich"] From 01d61d33716d9394a19d6355916156fd00ea90c6 Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Tue, 18 Mar 2025 12:33:07 +0100 Subject: [PATCH 16/17] Add passlib.hosts.host_context to the stubtest allowlist --- stubs/passlib/@tests/stubtest_allowlist.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stubs/passlib/@tests/stubtest_allowlist.txt b/stubs/passlib/@tests/stubtest_allowlist.txt index 16ec9f5109a1..c953253672cd 100644 --- a/stubs/passlib/@tests/stubtest_allowlist.txt +++ b/stubs/passlib/@tests/stubtest_allowlist.txt @@ -90,3 +90,8 @@ passlib.utils.compat.* # Tests are not included: passlib.tests.* + +# This is only available when the crypt module is available. This module +# was dropped from the standard library of Python 3.13, but is still available +# in some environments. +(passlib.hosts.host_context)? From 728075fe35e874d3dd564a5d78fba238d5d6d7dd Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Tue, 18 Mar 2025 12:39:55 +0100 Subject: [PATCH 17/17] Fix typo in comment Co-authored-by: Alex Waygood --- stubs/tqdm/@tests/stubtest_allowlist.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubs/tqdm/@tests/stubtest_allowlist.txt b/stubs/tqdm/@tests/stubtest_allowlist.txt index 89ed42aceaa4..e14a351b27a6 100644 --- a/stubs/tqdm/@tests/stubtest_allowlist.txt +++ b/stubs/tqdm/@tests/stubtest_allowlist.txt @@ -7,6 +7,6 @@ tqdm._tqdm_notebook.__all__ # Cannot import in stubtest tqdm.__main__ -# TODO: Reenable on tensorflow supports Python 3.13 and is added to the +# TODO: Reenable when tensorflow supports Python 3.13 and is added to the # stubtest dependencies in METADATA.toml. tqdm.keras