Skip to content

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

Merged
sdispater merged 3 commits into
python-poetry:masterfrom
abn:fix/version-ranges
Apr 2, 2021
Merged

pep440: support upper bound post/local release comparisons#157
sdispater merged 3 commits into
python-poetry:masterfrom
abn:fix/version-ranges

Conversation

@abn

@abn abn commented Apr 2, 2021

Copy link
Copy Markdown
Member

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`.
@abn
abn force-pushed the fix/version-ranges branch from 4431d67 to bf2785e Compare April 2, 2021 15:13

@sdispater sdispater left a comment

Copy link
Copy Markdown
Member

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