Skip to content

CI Add CPython 3.13 free-threaded manylinux wheel #29247

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

Merged
merged 4 commits into from
Jun 18, 2024

Conversation

lesteve
Copy link
Member

@lesteve lesteve commented Jun 13, 2024

This adds a CPython 3.13 free-threaded manylinux wheel.

I haven't thought too much about it, but if we merge this PR, there may be a risk that we upload a CPython 3.13 free-thread wheel to PyPI by mistake. CPython 3.13 is supposed to be schedule in October 2024 and scikit-learn 1.6 release will probably happen November/December 2024, so we may be fine based on this.

Related to #28978.

Copy link

github-actions bot commented Jun 13, 2024

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: cb5f85e. Link to the linter CI: here

@lesteve lesteve added the free-threading PRs and issues related to support for free-threaded CPython (a.k.a. nogil or no-GIL, PEP 703) label Jun 13, 2024
@lesteve lesteve changed the title CI Add a CPython 3.13 free threaded wheel CI Add CPython 3.13 free-threaded manylinux wheel Jun 13, 2024
@lesteve lesteve marked this pull request as ready for review June 13, 2024 15:32
@@ -59,6 +59,13 @@ if [[ "$GITHUB_EVENT_NAME" == "schedule" || "$CIRRUS_CRON" == "nightly" ]]; then
export CIBW_BUILD_FRONTEND='pip; args: --pre --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple"'
fi

if [[ "$CIBW_FREE_THREADED_SUPPORT" =~ [tT]rue ]]; then
Copy link
Member Author

@lesteve lesteve Jun 13, 2024

Choose a reason for hiding this comment

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

The regex here is because I am not too sure about yaml value plus its env var translation. It looks like you can use true and True in the yaml and the env variable will be "true". You could imagine using "True" (a string rather than a boolean) in the yaml and that should still work I think.

Copy link
Member

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

I haven't thought too much about it, but if we merge this PR, there may be a risk that we upload a CPython 3.13 free-thread wheel to PyPI by mistake. CPython 3.13 is supposed to be schedule in October 2024 and scikit-learn 1.6 release will probably happen November/December 2024, so we may be fine based on this.

The pypi wheel uploader workflow should fail because it checks the number of files to upload. If that happens, we can update it at the time of the release to either update the expected number of wheels to include the free-threaded variants or filter them out of the final upload.

Copy link
Member

@betatim betatim left a comment

Choose a reason for hiding this comment

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

One question for my education, otherwise this looks reasonable to me. Not merging because I am not super sure, so hoping for another brain to review.

@@ -154,7 +161,8 @@ jobs:

- name: Build and test wheels
env:
CIBW_PRERELEASE_PYTHONS: ${{ matrix.prerelease }}
Copy link
Member

Choose a reason for hiding this comment

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

What happened to the prerelease variable? Was it not used anywhere else?

It looked like this PR was renaming it from matrix.prerelease to matrix.prerelease_pythons which made me expect to see some other renames as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think matrix.prerelease was used at one point for Python 3.12 before Python 3.12 was released and then once Python 3.12 was released, the line was removed

@lesteve
Copy link
Member Author

lesteve commented Jun 18, 2024

I am going to merge my own PR with 1.75 approval(s). My main worry was the potential side-effect on PyPI and according to #29247 (review) it should be fine. At worst we upload a free-threaded Python 3.13 wheel to PyPI that people are unlikely to use.

I am reasonably confident everything is will be fine and I will deal with the consequences if anything goes awry 😉

@lesteve lesteve merged commit b20998d into scikit-learn:main Jun 18, 2024
46 checks passed
@lesteve lesteve deleted the free-threaded-wheel branch June 18, 2024 14:35
@jeremiedbb jeremiedbb mentioned this pull request Jul 2, 2024
11 tasks
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build / CI free-threading PRs and issues related to support for free-threaded CPython (a.k.a. nogil or no-GIL, PEP 703)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants