Fix for handling of version ranges #645
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
don't include first prerelease in the allowed max for an exclusive range.
Fixes python-poetry/poetry#8475, python-poetry/poetry#8405, python-poetry/poetry#8202
(actually 8202 seems to have been resolved by changes in the available dependencies on pypi and so I can't reproduce it now: but I'm pretty sure these will all be the same)
Absurdly I can't find a simple testcase that takes two versions or version ranges and compares or intersects them or something to demonstrate the point. So I confess that I don't fully understand what was going wrong before this fix.
However I do understand that those issues are
=2.*
) which poetry interprets as having a lower bound that is the first dev-release (eg2.dev0
)<2
so I've made this fix somewhat on gut:
<2
certainly shouldn't allow2.dev0
and so it's weird thatallowed_max
would return that value.What can I say? I'm confused, but this looks like a good fix and it does resolve those issues...