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

feat: use python3.11+ for cibuildwheel driver #1912

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mayeut
Copy link
Member

@mayeut mayeut commented Jun 30, 2024

As discussed in various issues, I think that cibuildwheel is in position where it might make sense to follow SPEC 0 schedule rather than the CPython schedule. This would allow to take advantage of new Python features faster (or without/ with less back ports).

The idea is that this is a developer tool, and CI and developers tend to be able to get newer versions of Python, so dropping old versions of Python will not affect them too much, and we get big benefits in maintenance. You only need to have Python 3.11 or newer on your CI, and locally if you want to debug wheel production.

For producing Python wheels, we do and still will support the widest range of basically any PyPA project. Currently 3.6+.

This draft PR is:

  • to gather feedback on such a change
  • to check that indeed, every CI we support is ready.
  • preview what would change
  • if we want to follow-up with this, then, it might be a good thing to warn users ahead to let them update there workflows if need be (mostly for CI that do not come with python pre-installed).

The idea would be to switch to SPEC 0 in 2024Q4 after Python 3.8 EOL & Python 3.13 GA, thus dropping 3.8, 3.9 & 3.10.

To be clear to anyone coming across this, we're talking about the version of Python that is used to run cibuildwheel. That is distinct from the versions of Python that we build wheels for, which would be unchanged by this.

.github/workflows/test.yml Outdated Show resolved Hide resolved
@mayeut mayeut force-pushed the nep29 branch 2 times, most recently from 4ba37cb to 1e899ff Compare June 30, 2024 15:58
@joerick
Copy link
Contributor

joerick commented Jul 2, 2024

I support this change. There is very little reason to hang on to older Pythons on the host side, when we can benefit from new features.

To be clear to anyone coming across this, we're talking about the version of Python that is used to run cibuildwheel. That is distinct from the versions of Python that we build wheels for, which would be unchanged by this.

@mayeut mayeut force-pushed the nep29 branch 3 times, most recently from 60a7a82 to 3dd21fc Compare July 6, 2024 08:35
@mayeut mayeut force-pushed the nep29 branch 2 times, most recently from 270d925 to 065d64c Compare July 7, 2024 07:51
@mayeut mayeut force-pushed the nep29 branch 2 times, most recently from 0a491ed to 020e0fd Compare July 9, 2024 19:02
@EwoutH
Copy link
Contributor

EwoutH commented Jul 11, 2024

I think it's very logical for a project like cibuildwheel to follow SPEC 0 on the host side.

@henryiii
Copy link
Contributor

henryiii commented Oct 7, 2024

Let's get 3.13.0 in, make a patch release, then I think this will be ready to merge?

@mayeut
Copy link
Member Author

mayeut commented Oct 8, 2024

then I think this will be ready to merge?

I was waiting for 3.13.0 final availability in GHA but maybe we don't care that much about that (or removing the allow-prereleases: true in tests)

@henryiii
Copy link
Contributor

henryiii commented Oct 8, 2024

Don't necessarily need to remove the allow-prereleases. The only time Python pre-releases is for upcoming Python versions, which you opt-into anyway. Maybe "3.x" or version ranges could be confused, but otherwise there's no harm in keeping it around. And it's really only our tests, users don't care or need GHA's 3.13.

@henryiii
Copy link
Contributor

henryiii commented Oct 8, 2024

(and, 3.13.0 is available AFAICT, it's just not shipped in manifests or runner images yet. But also I'm not talking about merging the instant we release, either ;) )

@mayeut mayeut marked this pull request as ready for review October 15, 2024 14:19
cibuildwheel/linux.py Outdated Show resolved Hide resolved
Copy link
Contributor

@Czaki Czaki left a comment

Choose a reason for hiding this comment

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

looks good to me

@henryiii
Copy link
Contributor

Should we add a warning to cibuildwheel running on Python 3.8-3.10 stating that the host Python needs to be upgraded to keep working with the next version of cibuildwheel? Unlike a normal Python package, you don't want to get silently stuck on an older version of cibuildwheel.

@joerick
Copy link
Contributor

joerick commented Oct 18, 2024

Yeah, that's a good idea. I just checked and a decent number of projects just write pip install cibuildwheel into their build scripts - those people would miss out on cibuildwheel upgrades if their python is oldish.

This was referenced Oct 19, 2024
@mayeut mayeut force-pushed the nep29 branch 2 times, most recently from 5b1c1e9 to 274d985 Compare October 25, 2024 20:32
@joerick joerick added the Hold for future release This PR might be complete, but is scheduled to be merged in a future release. Don't merge yet. label Oct 27, 2024
@joerick
Copy link
Contributor

joerick commented Oct 27, 2024

We're talking in #2047 about holding this until a v3.0 release, but we'll want to get #2052 and perhaps other changes in before then, so I've added a label to that effect.

@jezdez
Copy link
Member

jezdez commented Nov 23, 2024

Since you're asking for feedback, count me in as worried about adopting a faster-paced deprecation for a PyPA project, which traditionally focuses on all Python ecosystems, not just the Scientific Python ecosystem, which SPEC 0 was approved for.

Would not merging this prevent innovation? Could you share more about the rationale please?

@mayeut
Copy link
Member Author

mayeut commented Nov 23, 2024

@jezdez, I added the comment bit from @joerick in the description:

To be clear to anyone coming across this, we're talking about the version of Python that is used to run cibuildwheel. That is distinct from the versions of Python that we build wheels for, which would be unchanged by this.

@henryiii
Copy link
Contributor

henryiii commented Nov 23, 2024

I wonder if we should avoid mentioning SPEC 0 too much, I’ve been avoiding mentioning it. I believe the idea is that this is a developer tool, and CI and developers tend to be able to get newer versions of Python, so dropping old versions of Python will not affect them too much, and we get big benefits in maintenance. You only need to have Python 3.11 or newer on your CI, and locally if you want to debug wheel production.

For producing Python wheels, we do and still will support the widest range of basically any PyPA project except manylinux. Currently 3.6+.

Do you have a specific example of a CI service that does not have Python 3.11 or newer?

@mayeut mayeut force-pushed the nep29 branch 2 times, most recently from 72e46a4 to e1112fe Compare November 25, 2024 07:26
@jezdez
Copy link
Member

jezdez commented Nov 25, 2024

I wonder if we should avoid mentioning SPEC 0 too much, I’ve been avoiding mentioning it.

To be honest, that might do the trick since it doesn't add much clarity to downstream developers, given cibuildwheel's foundational position in the Python ecosystem. SPEC 0 is as you know pretty impactful for the SciPy community and a major achievement for the coordinated maintenance of a core set of packages.

I believe the idea is that this is a developer tool, and CI and developers tend to be able to get newer versions of Python, so dropping old versions of Python will not affect them too much, and we get big benefits in maintenance. You only need to have Python 3.11 or newer on your CI, and locally if you want to debug wheel production.

That's the key information that wasn't clear from the PR description above and I worried this would accelerate the deprecation of supported Python versions when building wheel files.

For producing Python wheels, we do and still will support the widest range of basically any PyPA project except manylinux. Currently 3.6+.

Excellent, thanks for confirming.

Do you have a specific example of a CI service that does not have Python 3.11 or newer?

No, this is moot now that I better understand the motivation for the change.

@mayeut mayeut changed the title feat: use SPEC 0 schedule for cibuildwheel feat: use python3.11+ schedule for cibuildwheel driver Nov 25, 2024
@mayeut mayeut changed the title feat: use python3.11+ schedule for cibuildwheel driver feat: use python3.11+ for cibuildwheel driver Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hold for future release This PR might be complete, but is scheduled to be merged in a future release. Don't merge yet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants