Skip to content

Add support for Python 3.13 #120

Open
@bdice

Description

@bdice

Overview

Python 3.13 was released in October 2024. This issue tracks the work to add support for Python 3.13 to RAPIDS.

Prior work:

We now have excellent automation for this process thanks to @jameslamb. We can use rapids-reviser with this example script, which we should update to "add 3.13" instead of 3.12: https://github.com/rapidsai/rapids-reviser/tree/main/examples/add-python-3.12

Note: We would like to complete our work on C++ wheels (#33) before adding Python 3.13 support, to keep CI build time down.

When should we drop Python 3.10?

Typically RAPIDS has kept the matrix of supported Python minor versions to ~3 versions at a time. However, I don't think we should drop Python 3.10 at the same time (explained below).

SPEC 0 recommended dropping support for Python 3.10 in 2024Q4. Meanwhile, NEP 29 recommended dropping support for Python 3.10 as of Apr 04, 2025. SPEC 0 is more aggressive, and we have not yet passed the deadline for NEP 29. Because of this, we probably want to leave Python 3.10 for now. Previously we have had concerns about build / test times for a larger Python matrix. However, there have been other advances that help us: through the introduction of C++ wheels (#33), we have moved most of our build time into the C++ wheels, and the Python wheels are comparatively very fast. Eventually we still hope to use the Limited API to reduce the number of Python wheels we must build.

Tasks

Each section should be fully completed before moving to the next section.

CI images

CI workflows

Branch Strategy:

  • Create a branch on shared-workflows called python-3.13
  • Add Python 3.13 to the build matrix on the python-3.13 branch
  • Add Python 3.13 to the test matrix on the python-3.13 branch
    • When adjusting the test matrix, be aware of total GPU resource consumption. Build jobs are CPU only but test jobs require GPUs. We want to keep our GPU consumption the same (don't increase the test matrix size), by making it a bit sparser in its coverage. We have some rough guidelines for how to decide on the matrix entries to include.

The above tasks are handled by: rapidsai/shared-workflows#268

RAPIDS repositories

This list is intentionally in RAPIDS dependency order... they'll need to be completed in roughly that order.

Consult #40 for example PRs for any necessary work that isn't handled by rapids-reviser.

Updates for libraries

  • pin Python version to 3.12 in devcontainers until all repos are migrated
  • update pypi-wheel-scripts and manually build/publish cubinlinker and ptxcompiler wheels
  • rapids-cmake
  • rmm
  • kvikio
  • pynvjitlink
  • dask-cuda
  • cudf
  • ucx-py
  • ucxx
  • raft
  • cugraph
  • cugraph-gnn
  • nx-cugraph
  • cuml
  • cuvs
  • cuspatial
  • cuxfilter
  • cucim
  • private repos
  • integration
  • cuopt

For each repo,

  1. Update .github/workflows/*.yaml to point to the python-3.13 branch of shared-workflows
  2. Update dependencies.yaml to add support for Python 3.13.
  3. Review any pyproject.toml files for necessary changes (classifiers, etc.)
  4. Update docs (README, etc) that reference a single Python version to point to the latest (3.13).
  5. Once CI passes, merge the PR.

Once all repos are migrated to the python-3.13 branch, the migration is complete. We merge python-3.13 into the development branch on shared-workflows and then open follow-up PRs to each repo to reset the branches to that development branch. This "reset" is simple and should be automated with rapids-reviser.

Post-migration

  • Update the ci-imgs repo's latest configuration to use Python 3.13.
  • Update the docker repo's build and test matrices, and references in docs
  • Update the build matrix in pypi-wheel-scripts so that Python 3.13 wheels are uploaded
  • Update rapidsai/dask-build-environment
  • update release selector in docs
  • update all the repos to point at branch-25.02 on shared-workflows again
  • move devcontainers Python version pin to Python 3.13
  • (after updating all the repos) delete the python-3.13 branch in shared-workflows
  • merge any remaining rapids-reviser changes

Notes:

The :latest image from ci-imgs is frequently used by CI jobs for building docs and testing notebooks. Be aware that issues may arise in those jobs.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions