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

Add support for Python 3.12 #4647

Merged
merged 5 commits into from
Sep 11, 2024
Merged

Conversation

jameslamb
Copy link
Member

Description

Contributes to rapidsai/build-planning#40

This PR adds support for Python 3.12.

Notes for Reviewers

This is part of ongoing work to add Python 3.12 support across RAPIDS.
It temporarily introduces a build/test matrix including Python 3.12, from rapidsai/shared-workflows#213.

A follow-up PR will revert back to pointing at the branch-24.10 branch of shared-workflows once all
RAPIDS repos have added Python 3.12 support.

This will fail until all dependencies have been updates to Python 3.12

CI here is expected to fail until all of this project's upstream dependencies support Python 3.12.

This can be merged whenever all CI jobs are passing.

@jameslamb jameslamb added non-breaking Non-breaking change improvement Improvement / enhancement to an existing function labels Sep 4, 2024
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@github-actions github-actions bot added the python label Sep 4, 2024
@jameslamb jameslamb changed the title Add support for Python 3.12 WIP: Add support for Python 3.12 Sep 4, 2024
@jameslamb
Copy link
Member Author

Restarted CI here now that there are Python 3.12 packages for raft: rapidsai/raft#2428

Will put this up for review once I see enough of CI passing.

tar.extractall(str(curr_resultset_download_dir))
# TODO: pass filter="fully_trusted" when minimum supported Python version >=3.12
# ref: https://docs.python.org/3/library/tarfile.html#tarfile-extraction-filter
with warnings.catch_warnings():
Copy link
Member Author

@jameslamb jameslamb Sep 10, 2024

Choose a reason for hiding this comment

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

Starting with Python 3.12, using tar.extractall() without passing the filter argument raises this DeprecationWarning:

DeprecationWarning: Python 3.14 will, by default, filter extracted tar archives and reject files or modify their metadata. Use the filter argument to control this behavior.

That warning is treated as an error for CI here, so I added this warning filter to allow these tests to pass.

(build link)

@jameslamb jameslamb marked this pull request as ready for review September 11, 2024 13:35
@jameslamb jameslamb requested review from a team as code owners September 11, 2024 13:35
@jameslamb jameslamb changed the title WIP: Add support for Python 3.12 Add support for Python 3.12 Sep 11, 2024
@jameslamb jameslamb requested review from bdice and removed request for KyleFromNVIDIA September 11, 2024 13:36
Copy link
Contributor

@rlratzel rlratzel left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM, just one question which need not hold up approval.

@@ -28,7 +28,7 @@ concurrency:
jobs:
cpp-build:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@python-3.12
Copy link
Contributor

Choose a reason for hiding this comment

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

just curious if this is a new naming convention (going from RAPIDS branch name to python version) or just a temporary change for python 3.12

Copy link
Member Author

@jameslamb jameslamb Sep 11, 2024

Choose a reason for hiding this comment

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

Fair question! Nope this is only temporary.

The process I'm using is like this:

  1. put up CI changes on a new shared-workflows branch: Add Python 3.12. shared-workflows#213
  2. migrate all the repos to using those new CI configs one-by-one (with PRs like this one)
  3. once everything is migrated, merge those changes into shared-workflows
  4. change all the repos back to referencing a branch-{YY}.{MM} branch

This way, we can do the work incrementally. Instead of, say, adding Python 3.12 jobs that then all RAPIDS repos have to immediately become compliant with.

@jameslamb
Copy link
Member Author

/merge

@rapids-bot rapids-bot bot merged commit 7c86b98 into rapidsai:branch-24.10 Sep 11, 2024
131 of 141 checks passed
@jameslamb jameslamb deleted the python-3.12 branch September 11, 2024 16:28
@jameslamb jameslamb mentioned this pull request Sep 17, 2024
rapids-bot bot pushed a commit to rapidsai/docker that referenced this pull request Sep 17, 2024
…711)

Contributes to rapidsai/build-planning#40.

* adds Python 3.12 images
* defaults to latest Python (3.12) and CUDA (12.5[.1]) in docs and comments

## Notes for Reviewers

Builds here will fail until all RAPIDS libraries are supporting Python 3.12, but figured we don't need to wait on that to come to an agreement about the building and testing matrices.

Blocked by:

* [x] rapidsai/cuml#6060
* [x] rapidsai/cugraph#4647
* [x] rapidsai/integration#719

Authors:
  - James Lamb (https://github.com/jameslamb)

Approvers:
  - Bradley Dice (https://github.com/bdice)

URL: #711
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement / enhancement to an existing function non-breaking Non-breaking change python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants