-
-
Notifications
You must be signed in to change notification settings - Fork 292
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
Support VCS requirements 1st class #1562
Comments
These VCS requirements can come in two forms:
|
In case we need support for cloning using these requirements, some notes:
|
What if you only supported locking PEP 440 style VCS requirements? |
@cognifloyd the work to support Pip proprietary VCS requirements was done long ago. You might notice in #1563 there are no instances of 2 ~parallel changes. The PEP-440 direct reference and Pip proprietary url handling are already unified. There is a test edited there that shows the fact both are handled. |
Ah - you were thinking this has to do with lockability. It does not. Both forms are equally unlockable without special effort since both forms can carry floating contents. Although PEP-440 decrees SHOULDs (https://datatracker.ietf.org/doc/html/rfc2119#section-3), they are just that, reccomendations that may be bypassed in practice. As such, Pex must parse a commit id from either format (which both formats support) and:
Instead of failing though, it could just pre-clone the repo and hash its contents. This would allow branches and tags to be useable in locks safely and it would also allow non-vcs local project requirements to be useable in locks safely (today these are rejected outright by pex3 lock). Beyond the floating issue lies the issue that Pip does not handle VCS requirements in hash checking mode; so Pex will need to do the hash checking itself. This can only be done afaict by Pex pre-cloning, building wheels and using --find-links substituting pinned reqs for the original VCS reqs. |
The current pex lock infrastructure cannot handle VCS requirements in the same way it can't handle local project requirements. Unlike local project requirements though, the failure to handle these requirements was uncontrolled. Add explicit parsing of VCS requirements to allow them to be singled out and rejected along side local project requirements. This addresses the UX for the failure noted in #1556 but may not be the final word there. If there is a desire to actually handle VCS requirements in locks, the `VCSRequirement` parsing added here can be expanded to extract the needed extra data (commit id certainly) to build that support. Closes #1562
Right now Pex requirement parsing lumps these under
URLRequirement
precluding any special handling required. One way or another #1556 will require recognizing VCS requirements.The text was updated successfully, but these errors were encountered: