From c4c6ab0e925d8cfabb68d34a10a783cb854b63a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Barrois?= Date: Fri, 23 Aug 2019 23:24:50 +0200 Subject: 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. --- README.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'README.rst') diff --git a/README.rst b/README.rst index 0d0d421..257b2a4 100644 --- a/README.rst +++ b/README.rst @@ -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 ================= -- cgit v1.2.1