Is there a sensible way to change the constraints ...
# general
a
Is there a sensible way to change the constraints for pants? Currently, it will pull
requests
2.30
(even though it's yanked, but I guess there'll be a fix out soon) which pulls
urllib3
2.0.2
, which isn't compatible with
botocore
. We can probably play whackamole with
GLOBAL.plugins
, but we also need to run pants on older machines (with an
openssl
older than
1.1.1
, which `urllib3 requires), and then it'd fail to install pants, before resolving the plugins.
b
Doesn't answer your question in any way, but you might consider using
botocore-a-la-carte
for smaller installation foorprint: https://pypi.org/project/botocore-a-la-carte/
a
Interesting, but, my main problem is we need to run this on Amazon Linux 2, so I'm more interested in stopping
urllib3
from going to
2.x
, the boto stuff we can work around
b
yeah, again doesn't answer your question, but I hod to plug it
a
I forgot to mention, we're using the 'legacy' script for bootstrapping pants, not sure what the new one does. Let me see
I think I'm wrong, there's no way to actually fixing it in
GLOBAL.plugins
😞
Copy code
19:11:21.81 [INFO] Starting: Resolving plugins: boto3==1.24.59, urllib3==1.26.15
[...]
ERROR: Could not find a version that satisfies the requirement urllib3==1.26.15
ERROR: No matching distribution found for urllib3==1.26.15
b
...What are we even using requests for?!
a
Collecting requests (from humbug==0.2.7->pantsbuild.pants==2.15.0)
b
humbug
😐 Oh for anonymous telemetry? LAME
We've talked about removing that. CC @happy-kitchen-89482 @witty-crayon-22786 we could reduce the Pants environment footprint by removing
humbug
, which removes
requests
(and other deps)
b
Anonymous telemetry is optional. If it's in your way, feel free to turn it off. We appreciate the generosity, but as a community our goal is to support your productivity.
a
I think we do have it off 🙂
b
In this case, turning it off won't help in any way, since it's a hard requirement for Pants itself. It's a bit of a chicken-and-egg 😕
b
:⁠-⁠(
😢 1
a
So, I see that when it tries to install plugins it does a pip freeze and then puts them in
constraints.txt
, which in my case contain
urllib3==2.0.2
, so when I tell it to install an older one, it conflicts with that.
Which doesn't feel like the right thing, btw, since those aren't constraints, those are just what happens to be installed right now
w
do you have a Pants plugin which is using
urllib3
?
a
Yeah. We have one that's using
boto3
.
w
ah, sorry. missed that part.
a
I tried to put boto3 in the extra requirements of the plugin, but that didn't seem to work (and, well, I had to move the import somewhere in a function)
I get that, but it's a bit unreasonable to not have a way to override that, especially since requests 2.30 is broken (why pip still installs is it is another question).
Also, it seems that requests 2.30 is compatible with older urllib3s
So it's not unreasonable to put pin urllib3 to
<2
, which wouldn't break new requests, but it also won't break existing code
Okay, so, botocore will move to 2.x soon, until then I just hacked our shell script to force install urllib 1.x