Skip to content

deps(python): enable Python 3.15 and Python 3.15t support - #293

Merged
XuehaiPan merged 1 commit into
metaopt:mainfrom
XuehaiPan:codex/python315-support
Aug 20, 2026
Merged

deps(python): enable Python 3.15 and Python 3.15t support#293
XuehaiPan merged 1 commit into
metaopt:mainfrom
XuehaiPan:codex/python315-support

Conversation

@XuehaiPan

@XuehaiPan XuehaiPan commented Aug 19, 2026

Copy link
Copy Markdown
Member

Description

Enable general Python 3.15 and Python 3.15t support across optree's CI, documentation, and packaging maintenance environments.

This change advances the stable full-test matrix from Python 3.12/3.13 to Python 3.13/3.14, moves lint, Read the Docs, and Conda maintenance to Python 3.14, raises the Conda typing-extensions floor to the version required by that interpreter, and updates the PyTree typing examples for Python 3.14's union representation.

Motivation and Context

Python 3.15 support had arrived incrementally in classifiers, dependency markers, free-threaded wheel builds, Pyodide coverage, and built-in frozendict support. This PR completes the general version-support update following the same repository-wide pattern used for Python 3.13 in #156 and Python 3.14/3.14t in #216.

  • I have raised an issue to propose this change (required for new features and bug fixes)

Types of changes

What types of changes does your code introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds core functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (update in the documentation)

Implemented Tasks

  • Test Python 3.15 and Python 3.15t and advance the stable full-test matrix to Python 3.13/3.14.
  • Move lint, documentation, and Conda maintenance environments to Python 3.14 and align typing-extensions.
  • Update typing examples for Python 3.14's union representation and document Python 3.15 support in the changelog.

Checklist

Go over all the following points, and put an x in all the boxes that apply.
If you are unsure about any of these, don't hesitate to ask. We are here to help!

  • I have read the CONTRIBUTION guide. (required)
  • My change requires a change to the documentation.
  • I have updated the tests accordingly. (required for a bug fix or a new feature)
  • I have updated the documentation accordingly.
  • I have reformatted the code using make format. (required)
  • I have checked the code using make lint. (required)
  • I have ensured make test pass. (required)

Validation

  • Python 3.15.0rc1: 100858 passed, 7 skipped, 1 xfailed, 100% coverage.
  • Python 3.15.0rc1 free-threaded: 100858 passed, 7 skipped, 1 xfailed, 100% coverage.
  • Python 3.14 typing xdoctests: passed.
  • python3 -m pre_commit run --all-files: passed.
  • Sphinx HTML build with warnings treated as errors: passed.
  • Conda environment resolution with the updated constraints: passed.

make lint passed its Python, type-checking, and doctest stages locally. Its clang-tidy stage is left unchecked because the available macOS LLVM 22 toolchain reports existing platform/toolchain diagnostics; no clang-tidy --fix output is included in this PR.

Advance stable CI and maintenance environments to Python 3.14, align the Conda typing-extensions floor, update typing examples for Python 3.14's union representation, and suppress enum suggestions for preprocessor-only feature flags.
@XuehaiPan
XuehaiPan force-pushed the codex/python315-support branch from 744a755 to 48b1a71 Compare August 19, 2026 11:34
@XuehaiPan XuehaiPan self-assigned this Aug 19, 2026
@XuehaiPan XuehaiPan added the enhancement New feature or request label Aug 19, 2026
@XuehaiPan
XuehaiPan marked this pull request as ready for review August 19, 2026 11:38
@codecov

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (2928b52) to head (48b1a71).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #293   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           15        15           
  Lines         1655      1655           
  Branches       225       225           
=========================================
  Hits          1655      1655           
Flag Coverage Δ
unittests 100.00% <ø> (ø)
unittests-cp310-Linux 100.00% <ø> (ø)
unittests-cp310-Windows 100.00% <ø> (ø)
unittests-cp310-macOS 100.00% <ø> (ø)
unittests-cp311-Linux 100.00% <ø> (ø)
unittests-cp311-Windows 100.00% <ø> (ø)
unittests-cp311-macOS 100.00% <ø> (ø)
unittests-cp312-Linux 100.00% <ø> (ø)
unittests-cp312-Windows 100.00% <ø> (ø)
unittests-cp312-macOS 100.00% <ø> (ø)
unittests-cp313-Linux 100.00% <ø> (ø)
unittests-cp313-Windows 100.00% <ø> (ø)
unittests-cp313-macOS 100.00% <ø> (ø)
unittests-cp313t-Linux 100.00% <ø> (ø)
unittests-cp313t-Windows 100.00% <ø> (ø)
unittests-cp313t-macOS 100.00% <ø> (ø)
unittests-cp314-Linux 100.00% <ø> (ø)
unittests-cp314-Windows 100.00% <ø> (ø)
unittests-cp314-macOS 100.00% <ø> (ø)
unittests-cp314t-Linux 100.00% <ø> (ø)
unittests-cp314t-Windows 100.00% <ø> (ø)
unittests-cp314t-macOS 100.00% <ø> (ø)
unittests-cp315-Linux 100.00% <ø> (ø)
unittests-cp315-Windows 100.00% <ø> (ø)
unittests-cp315-macOS 100.00% <ø> (ø)
unittests-cp315t-Linux 100.00% <ø> (ø)
unittests-cp315t-Windows 100.00% <ø> (ø)
unittests-cp315t-macOS 100.00% <ø> (ø)
unittests-cp39-Linux 100.00% <ø> (ø)
unittests-cp39-Windows 100.00% <ø> (ø)
unittests-cp39-macOS 100.00% <ø> (ø)
unittests-pp311-Linux 100.00% <ø> (ø)
unittests-pp311-Windows 100.00% <ø> (ø)
unittests-pp311-macOS 100.00% <ø> (ø)
unittests-pydebug 100.00% <ø> (ø)
unittests-pydebug-cp310d-Linux 100.00% <ø> (ø)
unittests-pydebug-cp310d-Windows 100.00% <ø> (ø)
unittests-pydebug-cp310d-macOS 100.00% <ø> (ø)
unittests-pydebug-cp311d-Linux 100.00% <ø> (ø)
unittests-pydebug-cp311d-Windows 100.00% <ø> (ø)
unittests-pydebug-cp311d-macOS 100.00% <ø> (ø)
unittests-pydebug-cp312d-Linux 100.00% <ø> (ø)
unittests-pydebug-cp312d-Windows 100.00% <ø> (ø)
unittests-pydebug-cp312d-macOS 100.00% <ø> (ø)
unittests-pydebug-cp313d-Linux 100.00% <ø> (ø)
unittests-pydebug-cp313d-Windows 100.00% <ø> (ø)
unittests-pydebug-cp313d-macOS 100.00% <ø> (ø)
unittests-pydebug-cp313td-Linux 100.00% <ø> (ø)
unittests-pydebug-cp313td-Windows 100.00% <ø> (ø)
unittests-pydebug-cp313td-macOS 100.00% <ø> (ø)
unittests-pydebug-cp314d-Linux 100.00% <ø> (ø)
unittests-pydebug-cp314d-Windows 100.00% <ø> (ø)
unittests-pydebug-cp314d-macOS 100.00% <ø> (ø)
unittests-pydebug-cp314td-Linux 100.00% <ø> (ø)
unittests-pydebug-cp314td-Windows 100.00% <ø> (ø)
unittests-pydebug-cp314td-macOS 100.00% <ø> (ø)
unittests-pydebug-cp315d-Linux 100.00% <ø> (ø)
unittests-pydebug-cp315d-Windows 100.00% <ø> (ø)
unittests-pydebug-cp315d-macOS 100.00% <ø> (ø)
unittests-pydebug-cp315td-Linux 100.00% <ø> (ø)
unittests-pydebug-cp315td-Windows 100.00% <ø> (ø)
unittests-pydebug-cp315td-macOS 100.00% <ø> (ø)
unittests-pydebug-cp39d-Linux 100.00% <ø> (ø)
unittests-pydebug-cp39d-Windows 100.00% <ø> (ø)
unittests-pydebug-cp39d-macOS 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@XuehaiPan
XuehaiPan merged commit 45bba86 into metaopt:main Aug 20, 2026
206 of 237 checks passed
@XuehaiPan
XuehaiPan deleted the codex/python315-support branch August 20, 2026 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant