diff options
author | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2019-08-23 23:11:00 +0200 |
---|---|---|
committer | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2019-08-26 21:33:28 +0200 |
commit | 5b9174aedaf9843ee5b3b6358461910e328e74d1 (patch) | |
tree | 4d32c28d3f0787bab7b73fb704cc6411bb08da9f /ChangeLog | |
parent | 0b0f9d3f2f5ffa1afe9452ec55d394d4bb1ba190 (diff) | |
download | semantic-version-5b9174aedaf9843ee5b3b6358461910e328e74d1.tar.gz |
Refactor spec/version matching.
Instead of choosing the comparison on each `.match()` call, the
expression is converted to a combination of `Range()` expressions
(simple comparison to a semver-compliant `Version`).
`Range()` objects can be combined with `And` and `Or` through the
`AnyOf` and `AllOf` clauses (sticking to Python's naming scheme).
Some specific flags have been provided to those range, allowing users to
subtly alter the matching behaviour - thus accomodating different
versioning schemes:
- `<0.1.2` won't match `0.1.2-rc1`, unless the prerelease_policy flag is
set to either `always` or `same-patch`
- `<0.1.2` will match `0.1.1-rc1`, unless the `prerelease_policy` flag
is set to `same-patch`
- `==0.1.2` will always match `0.1.2+build44`, unless the `build_policy`
is set to `strict`.
The `Spec` item has been updated, alongside `SpecItem`.
Those objects keep the original expression as attributes, but don't use
them for comparisons.
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -18,6 +18,11 @@ ChangeLog * Remove support for Python2 (End of life 4 months after this release) +*Refactor:* + + * Switch spec computation to a two-step process: convert the spec to a combination + of simple comparisons with clear semantics, then use those. + 2.6.0 (2016-09-25) ------------------ |