Skip to content

CI Add CPython 3.13 free-threaded manylinux wheel - #29247

Merged
lesteve merged 4 commits into
scikit-learn:mainfrom
lesteve:free-threaded-wheel
Jun 18, 2024
Merged

lesteve merged 4 commits into
scikit-learn:mainfrom
lesteve:free-threaded-wheel

Conversation

@lesteve

@lesteve lesteve commented Jun 13, 2024 •

Copy link
Copy Markdown
Member

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.

@github-actions

github-actions Bot commented Jun 13, 2024 •

Copy link
Copy Markdown

✔️ 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
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

@lesteve lesteve Jun 13, 2024 •

Copy link
Copy Markdown
Member Author

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.

Comment thread .github/workflows/wheels.yml Resolved

@ogrisel ogrisel left a comment

Copy link
Copy Markdown
Member

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.

@betatim betatim left a comment •

Copy link
Copy Markdown
Member

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.


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

Copy link
Copy Markdown
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
Copy Markdown
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

lesteve commented Jun 18, 2024 •

Copy link
Copy Markdown
Member Author

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
@lesteve
lesteve deleted the free-threaded-wheel branch June 18, 2024 14:35
@jeremiedbb jeremiedbb mentioned this pull request Jul 2, 2024
11 tasks done
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