Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Run stubtest with Python 3.13 #13638

Merged
merged 22 commits into from
Mar 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stubtest_third_party.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions stubs/corus/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
version = "0.10.*"
upstream_repository = "https://github.com/natasha/corus"

[tool.stubtest]
# As of version 0.10.0, corus doesn't support Python 3.13.
skip = true
2 changes: 2 additions & 0 deletions stubs/humanfriendly/METADATA.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions stubs/passlib/@tests/stubtest_allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Comment on lines +94 to +96
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't found out which package installs crypt.py, but I have had it happen once locally, and the same issue seems to happen in CI. (In this particular run. Previously, it complained that passlib.hosts.host_context was spurious. 🤷‍♂️)

(passlib.hosts.host_context)?
2 changes: 2 additions & 0 deletions stubs/pygit2/METADATA.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 on Python 3.13 as of 2025-03-17.
skip = true
3 changes: 3 additions & 0 deletions stubs/tensorflow/METADATA.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions stubs/tqdm/@tests/stubtest_allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ tqdm._tqdm_notebook.__all__

# Cannot import in stubtest
tqdm.__main__

# TODO: Reenable when tensorflow supports Python 3.13 and is added to the
# stubtest dependencies in METADATA.toml.
tqdm.keras
5 changes: 4 additions & 1 deletion stubs/tqdm/METADATA.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ requires = ["types-requests"]

[tool.stubtest]
extras = ["slack", "telegram"]
stubtest_requirements = ["dask", "pandas", "rich", "tensorflow"]
# 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"]
6 changes: 6 additions & 0 deletions stubs/tree-sitter-languages/METADATA.toml
Original file line number Diff line number Diff line change
@@ -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
Comment on lines +5 to +9
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit weird that the "this is unmaintained" note was PR'd by the author of the competing package and merged without comment: grantjenks/py-tree-sitter-languages#84. But it's true that it can't be installed on Python 3.13 currently and hasn't had any significant updates since February 2024.

The stubs were added by @Akuli in #8548 and IIRC he's contributed to the upstream package as well