Skip to content

Support Python 3.14 #1561

Description

@rajeeja

Summary

Add official support for Python 3.14 to UXarray. Local testing shows UXarray already works on Python 3.14.6 with no source changes required — the only necessary change is a numba>=0.63 version floor (older numba does not support 3.14).

Motivation

  • Python 3.14 (released 2025-10-07) is the latest stable CPython.
  • The dependency ecosystem is ready: numba (0.63+), numpy, xarray, numba-JIT, cartopy, healpix, matplotlib, sphinx/myst-nb all have working 3.14 builds/wheels.
  • Benefits: new tail-call interpreter (~3–5% faster general Python), officially supported free-threading (PEP 703/779), incremental GC, faster stdlib (io/pathlib/zlib), improved error messages, stdlib Zstandard.

Compatibility findings (local testing on Python 3.14.6)

Environment: fresh conda env, Python 3.14.6, numba 0.65.1, numpy 2.4.6, matplotlib 3.10.9.

Test results (all passing):

Suite Result
uxarray import + HEALPix grid + face_areas pass (4π)
numba @njit compile pass
test/test_remap.py 26/26 pass
test/test_plot.py 16/16 pass
test/test_subset.py, test_helpers.py, test_dependencies.py, test_icon_io.py 33/33 pass
test/test_remap_yac.py (with YAC 3.18) 15/15 pass

Required change

  • Pin numba>=0.63 in pyproject.toml. Per numba's support matrix, numba 0.63 (2025-12) is the first release supporting 3.10 <= python < 3.15; numba 0.61/0.62 cap at < 3.14. Without a floor, a 3.14 install can resolve an unsupported numba and fail at import.

Watch items (not blocking)

  • NumPy ceiling: numba 0.65.1 requires numpy < 2.5. Currently fine (2.4.6), but numpy 2.5 + current numba would conflict.
  • matplotlib: existing matplotlib<3.11 pin (see Remapping notebook is broken on RTD #1542) is unrelated to 3.14 and still satisfied.

Proposed tasks

  • Add numba>=0.63 to pyproject.toml dependencies
  • Add Programming Language :: Python :: 3.14 classifier
  • Add 3.14 to the CI test matrix (.github/workflows/ci.yml)
  • Update docs/CI conda envs (ci/environment.yml, ci/docs.yml) as needed
  • Confirm docs build on 3.14
  • (Optional) Decide whether to raise the minimum supported Python

Notes

Some of these changes (classifier, numba>=0.63, YAC 3.18 CI Python bump) are already staged on branch rajeeja/upgrade_yac alongside the YAC 3.18 upgrade.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
📚 Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions