summaryrefslogtreecommitdiff
path: root/docs/reference.rst
diff options
context:
space:
mode:
authorRaphaël Barrois <raphael.barrois@polytechnique.org>2019-08-23 23:11:00 +0200
committerRaphaël Barrois <raphael.barrois@polytechnique.org>2019-08-26 21:33:28 +0200
commit5b9174aedaf9843ee5b3b6358461910e328e74d1 (patch)
tree4d32c28d3f0787bab7b73fb704cc6411bb08da9f /docs/reference.rst
parent0b0f9d3f2f5ffa1afe9452ec55d394d4bb1ba190 (diff)
downloadsemantic-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 'docs/reference.rst')
0 files changed, 0 insertions, 0 deletions