https://pantsbuild.org/ logo
#general
Title
# general
s

sparse-lifeguard-95737

03/25/2022, 6:51 PM
Semi-related to Eric’s question above: is there a way for us to swap new versions of PEX into our pants 2.10.0 system, so we can make use of the support for VCS requirements in lockfiles? or do we need to wait for a pants 2.10.1?
h

hundreds-father-404

03/25/2022, 6:54 PM
Pex lockfile support is added to Pants 2.11 - 2.10 doesn't know how to consume Pex's lockfile format We still need to cherry-pick the Pex upgrade to 2.11. In the meantime you can use 2.11.0rc0 and set the options in
[pex-cli]
per this advice https://www.pantsbuild.org/v2.11/docs/restricted-internet-access#binary-tools
you'll also want to set
[python].lockfile_generator = 'pex'
s

sparse-lifeguard-95737

03/25/2022, 6:59 PM
ah! that’s good to know, I misunderstood the 2.10 announcement
another reason to be excited for 2.11 👀
💯 3
h

hundreds-father-404

03/25/2022, 7:02 PM
Ah yeah to clarify: 2.10 adds support for multiple lockfiles, along with generating those lockfiles via Poetry (which has issues). 2.11 adds support for generating w/ Pex. We did 2.11.0rc0 last week and are excited to hopefully stabilize soonish so that lockfile generation is a great experience
h

happy-kitchen-89482

03/25/2022, 7:36 PM
We hope to get 2.11 out ASAP so you don't get stuck on the 2.10 intermediate functionality for long
🎉 3
r

rhythmic-battery-45198

03/25/2022, 7:49 PM
Was able to get 2.11rc0 up with pex 2.1.74 with some minimal pants.toml changes as @hundreds-father-404 suggested.
Copy code
diff --git a/pants.toml b/pants.toml
index 9ca8ff6b..534cd060 100644
--- a/pants.toml
+++ b/pants.toml
@@ -1,5 +1,5 @@
 [GLOBAL]
-pants_version = "2.10.0"
+pants_version = "2.11.0rc0"
-use_deprecated_python_macros = false
 
 [python]
-resolves_generate_lockfiles = false
+lockfile_generator = 'pex'
 
+[pex-cli]
+version = "v2.1.74"
+known_versions = [
+  "v2.1.72|macos_arm64|fe5bd1fddf306e40d1828169dfd65c9faed98d2d98ebaba2753d99a91343014d|3723386",
+  "v2.1.72|macos_x86_64|fe5bd1fddf306e40d1828169dfd65c9faed98d2d98ebaba2753d99a91343014d|3723386",
+  "v2.1.72|linux_x86_64|fe5bd1fddf306e40d1828169dfd65c9faed98d2d98ebaba2753d99a91343014d|3723386",
+  "v2.1.74|linux_x86_64|7fea722b0faa5c5e802a327d3f75c8c363eb23460f1e5ddce7d45056105502de|3730463",
+]
❤️ 1
h

hundreds-father-404

03/25/2022, 7:50 PM
Sweet! Btw warning that you might hit a deadlock error, https://github.com/pantsbuild/pex/issues/1693. That's what's blocking us from getting out 2.11.0rc1 today. I was able to work around it by running the command again
r

rhythmic-battery-45198

03/25/2022, 7:55 PM
Cool thanks for the heads up. Testing VCS requirements on my end to hopefully move from custom script to generate-lockfiles goal. We also have a custom pypi repo (
repos = ["%(buildroot)s/3rdparty/python/wheel"]
) which might block us. We are just using the local repo to pre-build some wheels for non compliant python packages.
h

hundreds-father-404

03/25/2022, 7:55 PM
custom pypi repo should work! that's a major motivation for changing to Pex
r

rhythmic-battery-45198

03/25/2022, 7:56 PM
Ah great - thought I saw that it was not compatible somewhere. guess not!
h

hundreds-father-404

03/25/2022, 7:56 PM
2.10 generation via Poetry is not, but 2.11 generation via Pex is 🙂
🙌 1
Pex lockfile generation should be able to handle everything other than local files for now Only that there may still be bugs—Python ecosystem is very diverse and complex
b

busy-vase-39202

03/25/2022, 8:56 PM
Thanks for being an early adopter of this @rhythmic-battery-45198! And please do open issues on any quirks you encounter.
r

rhythmic-battery-45198

03/25/2022, 9:01 PM
My pleasure ! - I did indeed run into issues, and there looked to be relevant exceptions in the pip log. Had to take off though, will open an issue when I am back 👍🏼
b

busy-vase-39202

03/25/2022, 9:01 PM
Terrific!
h

happy-kitchen-89482

03/25/2022, 9:18 PM
Thanks! And if you don't mind being a lightning rod for that deadlock error it could help us verify a fix. Or if you don't encounter it, that's information too.
r

rhythmic-battery-45198

03/25/2022, 10:58 PM
I may have just been impatient. Left it running while I was gone and it did complete in 2165 seconds. I saw exceptions in the pip log relating to
importlib-resources
in a previous run which I cancelled. So either those didn't occur the second time or they weren't blockers. Will continue playing with it and let you guys know if I find any issues.
🐢 2
👀 1
h

hundreds-father-404

04/06/2022, 7:14 PM
Thanks for the update!
3 Views