https://pantsbuild.org/ logo
r

rough-vase-83553

09/21/2022, 6:49 PM
Having some periodic trouble initializing any lockfile that contains backports.cached_property=1.02. It was working for a bit and now it doesn't work either for the default PyPi index or our internal mirror, and neither on our VPN or on regular internet. Easy repro attached
Copy code
git clone master.bundle
cd master
./pants generate-lockfiles --resolve=test
Copy code
pip3 install backports.cached-property==1.0.2
works fine. I'm wondering if it has something to do with the hyphens and periods.
backports-cached-property
and
backports.cached_property
all fail. Changing the format doesn't seem to make a difference.
Okay it works now for some reason, again not sure why
Oh sorry, I did
1.02
on accident. The real issue is that if the global interpreter constraints allow Python 2.7, the install fails
master.bundle
That seems... wrong? Even when I specify that all consumers of the lockfile are using Python 3, the global interpreter constraints will break the resolve file generation.
e

enough-analyst-54434

09/21/2022, 7:09 PM
You probably want https://www.pantsbuild.org/docs/reference-python#resolves_to_interpreter_constraints Pants doesn't back calculate the ICs for you.
2
r

rough-vase-83553

09/21/2022, 7:10 PM
Ah yep, sorry didn't catch that one. That's the answer
5 Views