Skip to content

Add Python 3.15 test infrastructure#15718

Merged
JelleZijlstra merged 3 commits intopython:mainfrom
JelleZijlstra:codex/python315-testing
May 8, 2026
Merged

Add Python 3.15 test infrastructure#15718
JelleZijlstra merged 3 commits intopython:mainfrom
JelleZijlstra:codex/python315-testing

Conversation

@JelleZijlstra
Copy link
Copy Markdown
Member

@JelleZijlstra JelleZijlstra commented May 8, 2026

  • add Python 3.15 to the stdlib mypy, regression-test, and stdlib stubtest matrices
  • add Python 3.15 stdlib stubtest allowlists, including platform-specific allowlists for CI
  • move allowlist entries that are no longer needed on 3.15 out of the shared allowlist and into 3.10-3.14 allowlists
  • skip protobuf-sync and baseline-generation helper dependencies on Python 3.15 while their dependency stacks are not ready
  • in the Python 3.15 mypy and regression-test jobs, skip only the named third-party stubs whose runtime dependency stacks do not install on 3.15 yet: numpy-dependent packages, jsonschema -> referencing -> rpds-py/PyO3, and seaborn -> matplotlib -> contourpy

Not yet enabled: the pyright 3.15 CI leg, because its bulk third-party dependency installation currently pulls dependency stacks that are not installable on Python 3.15 yet, including rpds-py/PyO3.

@JelleZijlstra JelleZijlstra force-pushed the codex/python315-testing branch 5 times, most recently from a5bdf56 to 4b16997 Compare May 8, 2026 13:38
@github-actions

This comment has been minimized.

@JelleZijlstra JelleZijlstra force-pushed the codex/python315-testing branch from 4b16997 to 9fec5c1 Compare May 8, 2026 14:02
@github-actions

This comment has been minimized.

@JelleZijlstra JelleZijlstra force-pushed the codex/python315-testing branch from 9fec5c1 to b6e8147 Compare May 8, 2026 14:17
@github-actions

This comment has been minimized.

@JelleZijlstra JelleZijlstra force-pushed the codex/python315-testing branch from b6e8147 to e06d38b Compare May 8, 2026 14:32
@github-actions

This comment has been minimized.

@JelleZijlstra JelleZijlstra force-pushed the codex/python315-testing branch from e06d38b to dc304d7 Compare May 8, 2026 14:54
@JelleZijlstra
Copy link
Copy Markdown
Member Author

Codex is still chugging along but I think this is close enough that it can be reviewed (current CI has one failure but it's a flake).

The main thing I'm uncertain about is the testing for third-party packages. I had it add a denylist of packages that have deps that don't support 3.15 yet and exclude them from mypy; @srittau do you think that's the right approach? We could also skip 3.15 CI completely for now for third-party packages, as it feels less valuable than for the stdlib.

I think the current iteration also skips pyright 3.15 CI completely, I'll make that work similarly to the mypy CI, whatever we decide on.

@JelleZijlstra JelleZijlstra changed the title [do not review] Add Python 3.15 test infrastructure Add Python 3.15 test infrastructure May 8, 2026
@github-actions

This comment has been minimized.

@JelleZijlstra JelleZijlstra force-pushed the codex/python315-testing branch from dc304d7 to 2024781 Compare May 8, 2026 15:15
@github-actions

This comment has been minimized.

@JelleZijlstra JelleZijlstra force-pushed the codex/python315-testing branch from 2024781 to 44d2e56 Compare May 8, 2026 15:41
@github-actions

This comment has been minimized.

@srittau
Copy link
Copy Markdown
Collaborator

srittau commented May 8, 2026

I think in the past we skipped third-party tests only for those packages that didn't work yet, although I don't recall how exactly we did that. I'm fine for skipping all third-party tests for now.

@JelleZijlstra
Copy link
Copy Markdown
Member Author

For pyright we now skip everything (because it's harder to exclude just some packages), for mypy only those exact packages that are broken. That seems fine for now.

@JelleZijlstra JelleZijlstra marked this pull request as ready for review May 8, 2026 16:07
@@ -0,0 +1,129 @@
_decimal
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Apparently Ubuntu 3.15 on CI doesn't have the C version of decimal which seems a bit concerning.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The Python versions on GitHub are sometimes a bit concerning ...

Copy link
Copy Markdown
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

Looks good, just two comment-related remarks.

@@ -0,0 +1,25 @@
_decimal.SPEC_VERSION
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Could we add a TODO comment to all new allowlists?

Comment thread tests/regr_test.py Outdated
JelleZijlstra and others added 2 commits May 8, 2026 09:36
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Diff from mypy_primer, showing the effect of this PR on open source code:

pandas (https://github.com/pandas-dev/pandas)
+ pandas/core/computation/ops.py:328: error: Need type annotation for "_binary_ops_dict" (hint: "_binary_ops_dict: dict[<type>, <type>] = ...")  [var-annotated]

@JelleZijlstra JelleZijlstra merged commit 29bffca into python:main May 8, 2026
95 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants