Upgrade most Python dependencies in 3rdparty/python/requirements.txt#22812
Conversation
|
Get this error after updating SetupTools to support <81 (so, I've already pinned it). This import will need to be removed in Python 3.14 anyways. |
|
From the |
3rdparty/python/requirements.txt
Outdated
| # https://github.com/boto/botocore/issues/2926 this can likely be relaxed when | ||
| # Pants itself is on a newer version of Python | ||
| urllib3<2 | ||
| urllib3==2.5.0 |
There was a problem hiding this comment.
As far as I can see, we meet the conditions for upgrading this (and if we don't, we have to hold back other deps).
Seems like this is resolved enough to update, but I don't know if this is captured in the tests - I saw other packages unpinned though.
To follow up, this was resolved in today's release (botocore 1.34.63) with boto/botocore#3141. Users on Python 3.10+ should be free to control their urllib3 2.x requirements going forward.
This is weird for us, because if someone is using an old python with botocore, will this interfere with that? Should this allow a range of deps? The comment I just deleted suggests this could be relaxed when we upgrade Python, but having never used Botocore, I can't safely state what will happen here.
Importantly, there were some security updates between what we used, and now - so 🤷🏽
There was a problem hiding this comment.
If any reviewers are more educated on this, please let me know what I should do here ^^
There was a problem hiding this comment.
I think the code comment here, and the issue comment you quoted, combine to mean:
once we upgrade to Python 3.10+ (which we've done since we're on Python 3.11), we can remove this version constraint entirely. That should allow pex+pip to select the best version when people add botocore to their list of backend packages.
| urllib3==2.5.0 |
Or if mypy or something complains about a missing dep, maybe:
| urllib3==2.5.0 | |
| urllib3 |
There was a problem hiding this comment.
Yeah, I'm even better with that
| host=request.address, | ||
| port=request.port, | ||
| timeout_notify=0.25, | ||
| timeout_notify=1, |
There was a problem hiding this comment.
Internally, this is very much used as a float by uvicorn (comparing against a float and time.time()) - but they've typed it as an int. Also, 0.25s vs 1s for a timeout is fine, as they default it to 30s
|
I'm holding these back until after 3.30 is released. These are all also used in Python 3.14, which I'm also keeping out of 3.30 |
2.30? If so, why wait? |
Ran into some quirks while testing on one of my branches with these changes. Unsure if it's directly related to these, but there isn't much else on that branch right now. So, I think this might need some more time. Alternatively, if I can see the one I think was causing a hassle, I'll drop just that. |
|
@cburroughs Okay, turns out the quirk was in a rust update - or stale cache. I nuked every cache on my machine and re-ran, and I don't get intermittent failures anymore. It may have lingered from some of the Python 3.14 updates, as that caused weirdness too. I'm good to merge this |
Tried to capture most of the updates here - testing to see what happens in CI
Reviewers: I didn't upgrade all Python deps. The ones I went through, I just reviewed changelogs (didn't review their code changes) and pulled these from dependabot's suggestions.
I left some off if they looked more invasive. Will circle back to those later on. Left pex alone too, as I'll do that in the python 3.14 upgrade branch (since pex supports free-threaded Python downloads).
Can anyone who knows more about botocore vs urllib speak to the comment I placed in the review please?
I also opened #22814 to maybe split off explorer as a separate plugin, or remove it - as it seems unfinished, and requires several deps - which don't end up in our main pants package - but they're still part of our CI and lockfiles. Everything in the main repo that we don't use (or is unfinished) burdens us slightly when it comes to updates, so I'd rather it be it's own thing (related to built-in goals though, so might not move soon).