pyupio / pyup

A tool to update your project's dependencies on GitHub. Runs on pyup.io, comes with a command line interface.
https://pyup.io
MIT License
454 stars 67 forks source link

Rework how we do compatible releases #367

Closed stephenfin closed 4 years ago

stephenfin commented 4 years ago

Currently, compatible releases - that is, lines like 'Django~=1.7.2' - are treat like fixed version - 'Django==1.7.2'. This is incorrect behavior. In reality, 'Django~1.7.2' resolves to 'Django>=1.7.2,<1.8.0' and these version specifiers can be used to avoid having to bump a version repeatedly by ensuring the latest PATCH release of a semantically versioned package is always installed.

Change how we treat these releases so that compatible packages behave as expected. We do this by replacing the '~=A' format with '>=A,<B' format specifiers, allowing us to use all the logic we have built up for range-based specifiers.

Signed-off-by: Stephen Finucane stephen@that.guru Closes: #361

codecov[bot] commented 4 years ago

Codecov Report

Merging #367 into master will increase coverage by 0.01%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #367      +/-   ##
==========================================
+ Coverage   93.92%   93.94%   +0.01%     
==========================================
  Files          11       11              
  Lines        1103     1106       +3     
==========================================
+ Hits         1036     1039       +3     
  Misses         67       67
Impacted Files Coverage Δ
pyup/requirements.py 87.61% <100%> (+0.11%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b20fa88...87c4e68. Read the comment docs.