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

pep440: support upper bound post/local release comparisons #157

Merged
merged 3 commits into from
Apr 2, 2021

Conversation

abn
Copy link
Member

@abn abn commented Apr 2, 2021

This change ensures that post and local releases are taken into
consideration when checking if version range allows a post release
local build release at upper and lower bounds.

The following conditions now hold for upper bound checks.

  • <=3.0.0 allows 3.0.0+local.1, 3.0.0-1
  • <=3.0.0+local.1 disallows 3.0.0+local.2, allows 3.0.0-1
  • <=3.0.0-1 allows 3.0.0+local.1, 3.0.0

Lower bound checks require no modification and works due to the
implicit version comparison of poetry.core.pep440.PEP440Version.

Note: Majority of the changes here are test coverage.

@abn abn requested a review from a team April 2, 2021 15:06
@abn abn marked this pull request as ready for review April 2, 2021 15:09
This change ensures that post and local releases are taken into
consideration when checking if version range allows a post release
local build release at upper and lower bounds.

The following conditions now hold for upper bound checks.

- `<=3.0.0` allows `3.0.0+local.1`, `3.0.0-1`
- `<=3.0.0+local.1` disallows `3.0.0+local.2`, allows `3.0.0-1`
- `<=3.0.0-1` allows `3.0.0+local.1`, `3.0.0`

Lower bound checks require no modification and works due to the
implicit version comparison of `poetry.core.pep440.PEP440Version`.
Copy link
Member

@sdispater sdispater left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

@sdispater sdispater merged commit f5c6b64 into python-poetry:master Apr 2, 2021
@abn abn deleted the fix/version-ranges branch April 2, 2021 22:27
@sdispater sdispater mentioned this pull request Apr 8, 2021
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