Skip to content

In event of error, check equality #2415

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

Merged
merged 4 commits into from
Jun 17, 2025
Merged

Conversation

8W9aG
Copy link
Contributor

@8W9aG 8W9aG commented Jun 17, 2025

  • When checking if 2 version strings are greater or equal, if an error occurs parsing the version
    fall back to string equality instead of panicking

* When checking if 2 version strings are greater
or equal, if an error occurs parsing the version
fall back to string equality instead of panicking
@8W9aG 8W9aG requested review from michaeldwan and aron June 17, 2025 15:07
@8W9aG 8W9aG changed the title In event of error, checking equality In event of error, check equality Jun 17, 2025
@8W9aG 8W9aG requested a review from aron June 17, 2025 17:03
Copy link
Contributor

@aron aron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I'm still not sure this is doing what we need it to do. To be clear if a user project provides a version range then we need to ensure that that range is satisfied by the explicit version pinned in the requirements we get from the CDN.

Some examples of this would be:

replicate==1.0.0
replicate>=1.0.0b1
replicate>=1.0.0b1,<2.0.0a1

It's important to note that Python does not use SemVer, instead it uses it's own syntax defined in pep440 and implemented in the packaging module.

@8W9aG 8W9aG requested a review from aron June 17, 2025 20:11
Copy link
Contributor

@aron aron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thanks for working through that, this works perfectly.

@8W9aG 8W9aG merged commit 0e0a0a5 into main Jun 17, 2025
26 checks passed
@8W9aG 8W9aG deleted the sackfield/fall-back-string-equality branch June 17, 2025 20:59
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

Successfully merging this pull request may close these issues.

2 participants