-
Notifications
You must be signed in to change notification settings - Fork 20
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
Prep support for running Pants with Python 3.10 or 3.11. #351
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thejcannon if you're able, would love to get your eyes on my assumptions about our released pex files 😬 in case I'm wrong about anything here..
Likely want to add some nicer feedback in case you're on scie-pants 0.10.7 and try to use a newer pants that wants py 3.12.. I have no idea what that failure will look like now. EDIT: It'll try to download a non-existing asset, and say as much, so the error message is giving enough details to show the issue, although it's not spelled out that upgrading scie-pants is the solution. So.. good enough? :) |
Uh... still need the find-links thing for Pants <2.. 😬 |
"The primary rate limit for unauthenticated requests is 60 requests per hour." Just wanted to highlight the docs, I don't have a strong sense of how "risky" this is. |
Im happy to have a discussion about dropping v1 support. And telling people to use an older scie-pants for that. |
What's this in relation to? If it's the PEX downloading that isn't the API, and isnt limited. |
We use GH api requests to get the available assets for a release. But I think the number of requests will be relatively few, and cached, so ought to be OK in most cases. |
I considered dropping v1 support as well. But then again, I don't feel it is motivated to drop it at this time, as it was working, and it didn't cost me much to preserve that functionality--I was just not aware of v1 being a thing still 😅 If it becomes difficult to maintain, I'm +1 to dropping it in a future version. Users still on Pants v1 already show they're OK staying on an old version, so feels like freezing their version of supported scie-pants should be no worse off. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one.
I'd find it a bit easier to review if we split up the changes:
- remove support for PANTS_SHA
- fix the stdout bug
Is that too annoying to do? Thanks
No, that's a good move. It kind of fell in my lap while going for the Py support changes.. but breaking those out makes sense. |
Closes pantsbuild/pants#20315 Broken out from #351
Co-authored-by: Huon Wilson <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice!
I like it a lot... however, it's a moderately complicated switch. We could consider doing a pre-release release containing this change (e.g. 0.12.0rc0) that we can manually test for a day or two before doing a proper full release.
In particular, I think get-pants.sh
without --version
will automatically pick up the "latest" release. Thus, if people do an unpinned install in CI (highly likely), every time we do a release we instantly start running the new code in people's CI. This means if we've made a mistake here, we'll have a bit of a panic to get it fixed up. By doing a non-"latest" pre-release first we'll have a bit of breathing room to validate.
Alternatively, we can just hope for the best! What do you think?
I'm in favor of doing a pre-release. Prefer to avoid stressful bugs :p |
@huonw I've added support for manually running the release workflow for a pre-release tag. The pre-release is not announced (besides to the GH discussions topic) nor published to our brew tap, so flies entirely under the radar. (had a bug so it wasn't marked as a pre-release properly, but I hope it was just my typo which is now fixed.) Only way to use it is to explicitly download the binary from GH release assets and run/install it that way. I've made a quick smoke test on a repo of mine using the 0.12.0-beta.0 version on Mac M2, seems to be working fine there at least.
And it picked the correct Python:
|
Oh, cool! My testing:
I feel like I have a pretty boring set-up though: everything connected to the internet always, no proxies/blocking. "Standard" operating systems etc. Do we want to solicit people to test more, especially if they have unusual set-ups?
FYI looks like the
Minor process things, but I wonder if, for future, we could still announce these to Slack, similar to how we announce Pants dev releases. We can get this PR and its feature in, and iterate on the unrelated stuff once it's in, though. |
I'm willing to handle any edgy issues as they come up, as it seems to work fine for the general case it ought to work for most users. If there's too much issues, we can always roll back the latest version to 0.11.0 again to address them.
Awesome.
Sounds good. |
Building on the work in pantsbuild/scie-pants#351 this brings the version of Python used by Pants from 3.9 to 3.11. Why 3.11 and not 3.12 or 3.13? Because that is what we already released on the scie-pants side and two release forward is still a big benefit. NOTE: I'd like to hold off on stomping out all deprecation warnings until one `dev` release since the release process part is what I'm most nervous about.
Building on the work in pantsbuild/scie-pants#351 this brings the version of Python used by Pants from 3.9 to 3.11. Why 3.11 and not 3.12 or 3.13? Because that is what we already released on the scie-pants side and two release forward is still a big benefit. NOTE: I'd like to hold off on stomping out all deprecation warnings until one `dev` release since the release process part is what I'm most nervous about.
Building on the work in pantsbuild/scie-pants#351 this brings the version of Python used by Pants from 3.9 to 3.11. Why 3.11 and not 3.12 or 3.13? Because that is what we already released on the scie-pants side and two release forward is still a big benefit. NOTE: I'd like to hold off on stomping out all deprecation warnings until one `dev` release since the release process part is what I'm most nervous about.
Building on the work in pantsbuild/scie-pants#351 this brings the version of Python used by Pants from 3.9 to 3.11. Why 3.11 and not 3.12 or 3.13? Because that is what we already released on the scie-pants side and two release forward is still a big benefit. NOTE: I'd like to hold off on stomping out all deprecation warnings until one `dev` release since the release process part is what I'm most nervous about.
Building on the work in pantsbuild/scie-pants#351 this brings the version of Python used by Pants from 3.9 to 3.11. Why 3.11 and not 3.12 or 3.13? Because that is what we already released on the scie-pants side and two release forward is still a big benefit. NOTE: I'd like to hold off on stomping out all deprecation warnings until one `dev` release since the release process part is what I'm most nervous about.
Building on the work in pantsbuild/scie-pants#351 this brings the version of Python used by Pants from 3.9 to 3.11. Why 3.11 and not 3.12 or 3.13? Because that is what we already released on the scie-pants side and two release forward is still a big benefit. NOTE: I'd like to hold off on stomping out all deprecation warnings and anything else that "depends" on 3.11until one `dev` release since the release process part is what I'm most nervous about.
Fixes #424 This makes a few adjustments to support running Pants 2.25.0.dev0 and newer, which run using Python 3.11 (pantsbuild/pants#21528), iterating on #351. Particularly: - expanding tools.pex's interpreter constraints to include 3.11 (and also 3.10, which seems fine) - add a test (NB. Pants 2.25 cannot run on macOS older than 13 / 14, depending on platform, so this test is conditional: pantsbuild/pants#21655) - hardcoding that 2.25.0.dev0 uses Python 3.11, to use the optimised "hit the exact URL first time" codepath, instead of having to try all Python versions: https://github.com/pantsbuild/scie-pants/blob/d50bd33fd67e944384c9548811a66c1cb03113a5/tools/src/scie_pants/pants_version.py#L239-L252 This thus preps scie-pants release 0.12.1 too, which I'll tag once merged.
Look at the Python tag in the Pants PEX filenameCycle through all supported Python versions and check the PEX download URL using HEAD for each one to infer the Python version to use when installing Pants, when using a version of Pants that we don't already know which version of Python to use.Drop support forDone in #376.PANTS_SHA
.Silence the install step, capturing the output to aDone in #375.pants-install.log
file in the science cache.