summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix Spec.specs for single-term ranges.maint/2.xRaphaël Barrois2019-09-063-5/+14
| | | | | | | This (deprecated) property failed when used on a `Spec` item based on a single-term range (e.g. `==0.1.2` `<2.0.0`). Closes #82.
* Adapt from_db_value() for Django 3Dan Kolbman2019-08-301-1/+1
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Back to development: 2.8.2Raphaël Barrois2019-08-292-1/+7
|
* Preparing release 2.8.12.8.1Raphaël Barrois2019-08-292-2/+2
|
* Restore `Spec.specs` [Closes #79]Raphaël Barrois2019-08-292-1/+7
| | | | This attribute wasn't meant to be removed.
* Back to development: 2.8.1Raphaël Barrois2019-08-292-1/+7
|
* Preparing release 2.8.02.8.0Raphaël Barrois2019-08-292-2/+2
|
* Restore Python2 support.rbarrois/restore-py2Raphaël Barrois2019-08-2910-25/+94
|
* Back to development: 2.7.2Raphaël Barrois2019-08-282-1/+7
|
* Preparing release 2.7.12.7.1Raphaël Barrois2019-08-282-2/+2
|
* Fix NPM-style caret matching.Raphaël Barrois2019-08-283-7/+25
|
* Back to development: 2.7.1maint/v2.7Raphaël Barrois2019-08-282-1/+7
|
* Preparing release 2.7.02.7.0Raphaël Barrois2019-08-282-2/+2
|
* Enable zest.releaser.Raphaël Barrois2019-08-284-1/+23
| | | | Streamline the release process.
* Fix MANIFEST.inRaphaël Barrois2019-08-281-5/+5
| | | | Always include every dev/doc/test related files.
* Add `make help`.Raphaël Barrois2019-08-281-5/+53
|
* Describe upcoming changes.Raphaël Barrois2019-08-281-0/+11
|
* Rewrite `Spec` documentation.Raphaël Barrois2019-08-271-52/+49
| | | | Write clear, explicit rules for the `SimpleSpec` syntax.
* Deprecate support for 'partial' versions.rba/pre-2.8Raphaël Barrois2019-08-266-8/+21
| | | | | Their comparison semantics were ill-defined, and mostly an implementation detail for the old, 'native' specs.
* Adjust docs for readthedocs.Raphaël Barrois2019-08-261-3/+9
| | | | | - Use proper theme in development - Use ReadTheDocs version numbers in titles
* Add `Version.precedence_key`.Raphaël Barrois2019-08-265-205/+114
| | | | | | | | | | | | | | | | | | | This will be used in `sort(..., key=lambda v: v.precedence_key)`. Remove previous comparison/ordering implementation. The current implementation relies on a 4-tuple: - major, minor, patch (as integers) - natural order matches precedence rules - a tuple of identifiers for the prerelease component. The identifiers for the prerelease components are based on: - A `NumericIdentifier` class, that compares number using their natural order, and always compares lower than non-numeric identifiers - A `AlphaIdentifier` class for non-numeric identifiers; it compares versions using ASCII ordering. - A `MaxIdentifier` class, that compares higher to any other identifier; used to ensure that a non-prerelease version is greater than any of its prereleases.
* Rename the 'setup' Makefile target.Raphaël Barrois2019-08-261-1/+1
| | | | | | Using `make update` is closer to common patterns than `make install-deps`; it is also suitable to update the local development environment.
* Add some docstrings.Raphaël Barrois2019-08-261-0/+1
|
* Add deprecations for Spec/SpecItem.Raphaël Barrois2019-08-266-138/+204
| | | | | | | | | The internal features from those classes will be removed in future versions: - The `Spec` class is incompatible with the support of multiple syntaxes - The `SpecItem` class was an implementation detail, but doesn't support complex `Range` combinations.
* Add support for NPM-style version ranges.Raphaël Barrois2019-08-268-4/+333
| | | | | | | | The code follows closely the specification available at https://docs.npmjs.com/misc/semver.html. Despite similarities, the matching logic is fully separate from the `native` code, since both might evolve at their own scales.
* Refactor spec/version matching.Raphaël Barrois2019-08-267-125/+641
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix minor docs typo.Raphaël Barrois2019-08-241-2/+2
|
* Fix inconsistent matching behaviour.Raphaël Barrois2019-08-245-36/+39
| | | | | | | | According to the stated goal of "intuitive" behaviour, we want: ``Version('0.1.1-a1') not in Spec('<0.1.1')``. Tests, code and docs have been fixed.
* Add `Version.truncate()`.Raphaël Barrois2019-08-243-0/+51
| | | | This simplifies computing neighbouring versions.
* Clarify hashing strategy for Version.Raphaël Barrois2019-08-241-0/+2
|
* Lint setup.py.Raphaël Barrois2019-08-242-2/+1
|
* Lint test code.Raphaël Barrois2019-08-249-37/+41
|
* Use unittest.subTest in tests.Raphaël Barrois2019-08-243-124/+168
| | | | This provides more helpful error messages when a test fails.
* Drop support for Python<3.4.Raphaël Barrois2019-08-2413-84/+45
|
* Use Version(major=1, ...) for next_...Raphaël Barrois2019-08-241-7/+35
| | | | Avoids generating text to be parsed immediately.
* Allow Version(major=1, ...).Raphaël Barrois2019-08-245-2/+98
| | | | | | Eases the creation of version objects from existing versions. We still validate the type and structure of each component.
* Add myself to the creditsKyle Baird2018-06-181-0/+1
| | | | | Do this so I am available as a reference for questions about the changes I have made
* Make class name dynamic in Version.__repr__Kyle Baird2018-06-181-1/+2
| | | | | Do this so any subclasses will be shown with their class name instead of a potentially misleading Version
* Remove hacks for old Django under Pypy.Raphaël Barrois2018-06-181-8/+0
|
* Adapt code to Django>=1.11.Raphaël Barrois2018-06-182-17/+2
| | | | Drop compatibility layer for Django<1.11.
* Upgrade supported Python and Django versions.packaging/bump-test-environmentRaphaël Barrois2018-06-184-17/+17
| | | | | | | Django: Support the latest released version, and the latest LTS before that version. Python: Add support for python3.6 and pypy3.
* Improve docs on `next_patch()`.Raphaël Barrois2018-06-182-3/+52
| | | | | | | | | | Those functions had been forgotten in the docs. Clarify that `Version('1.0.1-alpha').next_patch()` is `Version('1.0.1')`, since that version is the smallest non-prerelease version greater than `Version('1.0.1-alpha')`. Closes: #67
* Don't use `is` for integer comparisons.Raphaël Barrois2018-06-181-2/+2
| | | | | | Closes #65. Reported-By: Julian Berman <julian@grayvines.com>
* correct spelling mistakeEdward Betts2017-09-031-1/+1
|
* Release version 2.6.0v2.6.0Raphaël Barrois2016-09-253-4/+4
|
* Fix deconstruct() tests under Pypy.Raphaël Barrois2016-09-011-8/+18
| | | | | Pypy seems to deconstruct fields differently from Django, thus bringing in variations in the actual deconstruct() output.
* Officially drop support for Django<1.7Raphaël Barrois2016-09-011-0/+4
|
* django: Replace south with django.db.migrationsRaphaël Barrois2016-09-013-127/+110
| | | | Update tests accordingly.
* LintingRaphaël Barrois2016-09-013-11/+18
|
* Rearrange test suite.Raphaël Barrois2016-09-019-44/+99
| | | | | * Use tox * Add a full linting step