diff options
author | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2019-08-23 23:24:50 +0200 |
---|---|---|
committer | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2019-08-26 21:34:10 +0200 |
commit | c4c6ab0e925d8cfabb68d34a10a783cb854b63a0 (patch) | |
tree | 84895b9dd586594c380668875ede00ba4b8a928a /README.rst | |
parent | 5b9174aedaf9843ee5b3b6358461910e328e74d1 (diff) | |
download | semantic-version-c4c6ab0e925d8cfabb68d34a10a783cb854b63a0.tar.gz |
Add support for NPM-style version ranges.
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.
Diffstat (limited to 'README.rst')
-rw-r--r-- | README.rst | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -280,6 +280,22 @@ build metadata is equality. False +NPM-based ranges +---------------- + +The :class:`NpmSpec` class handles NPM-style ranges: + +.. code-block:: pycon + + >>> Version('1.2.3') in NpmSpec('1.2.2 - 1.4') + True + >>> Version('1.2.3') in NpmSpec('<1.x || >=1.2.3') + True + +Refer to https://docs.npmjs.com/misc/semver.html for a detailed description of NPM +range syntax. + + Using with Django ================= |