Skip to content
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

Add scenarios based on legacy versions and legacy specifiers #168

Open
notatallshaw opened this issue Mar 30, 2024 · 4 comments
Open

Add scenarios based on legacy versions and legacy specifiers #168

notatallshaw opened this issue Mar 30, 2024 · 4 comments

Comments

@notatallshaw
Copy link

notatallshaw commented Mar 30, 2024

I'm willing to write these scenarios myself, but I'm making an issue first in case of any objection, in particular because this is about following the spec, and I beleive uv deviates from the spec for this behavior to be more compatible with the ecosystem:

  1. With requirement A and A has a new version with a non-legacy version and an old version with a legacy version then A should successfully resolve to the new non-legacy version
  2. With requirement A and A has a new version with a legacy version and an old version with a non-legacy version then A should successfully resolve to old non-legacy version
  3. With requirement A and A only has legacy versions then A should not resolve
  4. With a requirement on A that involves a legacy version in the specifier then that requirement should not resolve
  5. Same as all of above but the where A depends on B and B suffers from the legacy versions/specifiers
@konstin
Copy link
Member

konstin commented Apr 2, 2024

Note that in uv, we have lenient requirement and lenient version types with a hardcoded set of fixups and we don't make a different and we currently don't track whether the fixups were used or not, while errors outside of these are already skipped.

@notatallshaw
Copy link
Author

Yeah, if my understanding is correct, both pip and uv are not following the spec.

It seems like the correct things to do it's make a scenario that follows the spec and it can be set to expect fail where it has to.

@zanieb
Copy link
Member

zanieb commented Apr 2, 2024

Sounds good to me! Although I'm not sure what we should do with the outcomes considering that pip and uv both support lenient parsing. Perhaps we can have a strict parse mode that we enable for these particular scenarios.

@notatallshaw
Copy link
Author

pip is very likely to stop accepting legacy versions and specifiers on the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants