-
-
Notifications
You must be signed in to change notification settings - Fork 297
Consume PEP-751 lockfiles #2756
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
Comments
It is, but are you using Pex directly or are you using Pex via Pants? If the latter then you need subsetting capabilities and that may or may not be possible since PEP-751 explicitly punted on that use case in order to ship a PEP at all. |
I am using pex via pants. That's unfortunate to hear :( |
Ok @kuza55 , thanks for confirming. I'll mark this as a feature request then, but at low priority, since you likely won't be able to use the feature like you thought you would. AFAICT the real issue is sort of tracked here: pantsbuild/pants#20897 (comment) That's almost exactly a year old though, and looks like all talk with no action at this point. Some one or group of people really need to follow through on that line of thought though. Actually dig in to understand the root issues and re-build the Python backend. As I've suggested before, you might find you don't want Pex at all if you can solve some of the fundamental caching speed and granularity issues in Pants sandboxing / remoting. |
Pex can now resolve from PEP-751 locks. To support sub-setting, the lock must carry `dependencies` metadata for its locked packages, which is only optional data per the spec. The pylock resolver machinery will check the resulting resolve to confirm there are no missing dependencies and fail if holes are found. For example, as of this writing, `uv` PEP-751 lock exports don't include dependencies metadata and cannot be sub-setted. Pex PEP-751 lock exports do, but this is not too useful since you can just use a native Pex lock for that. Closes pex-tool#2756
@kuza55 yeah. So |
Could you point me to something that explains what is missing from these lockfiles to support subsetting? |
@kuza55 please read the PR if you haven't already. Speak up if you still don't see the issue. |
Pex can now resolve from PEP-751 locks. To support sub-setting, the lock must carry `dependencies` metadata for its locked packages, which is only optional data per the spec. The pylock resolver machinery will check the resulting resolve to confirm there are no missing dependencies and fail if holes are found. For example, as of this writing, `uv` PEP-751 lock exports don't include dependencies metadata and cannot be sub-setted. Pex PEP-751 lock exports do, but this is not too useful since you can just use a native Pex lock for that. Closes #2756
Alrighty - this is now available in Pex 2.39.0: https://github.com/pex-tool/pex/releases/tag/v2.39.0 |
Is it feasible for pex to consume pep-751 lockfiles when generating pex files?
I am interested in using uv to generate the lockfiles that pex consumes for producing pex files.
I have been doing a hacky version of this where I convert uv's lockfiles to pex lockfiles with a script (for performance reasons), but given there is now a standard, I wonder if it is possible for me to not need this.
The text was updated successfully, but these errors were encountered: