Skip to content

Commit e02a468

Browse files
committed
Make version specifier explanation easier to read in reST
1 parent f060669 commit e02a468

File tree

1 file changed

+31
-21
lines changed

1 file changed

+31
-21
lines changed

docs/html/user_guide.rst

+31-21
Original file line numberDiff line numberDiff line change
@@ -827,27 +827,37 @@ commonly understood comparison operators to specify the required version
827827
However, Python packaging also supports some more complex ways for
828828
specifying package versions (e.g. ``~=`` or ``*``):
829829

830-
.. csv-table::
831-
:header: "Operator", "Description", "Example"
832-
833-
``>``, "Any version greater than the specified version", "``>3.1``: any
834-
version greater than 3.1"
835-
``<``, "Any version less than the specified version", "``<3.1``: any version
836-
less than ``3.1``"
837-
``<=``, "Any version less than or equal to the specified version", "``<=3.1``:
838-
any version less than or equal to ``3.1``"
839-
``>=``, "Any version greater than or equal to the specified
840-
version", "``>=3.1``: version ``3.1`` and greater"
841-
``==``, "Exactly the specified version", ``==3.1``: only version ``3.1``
842-
``!=``, "Any version not equal to the specified version", "``!=3.1``: any
843-
version other than ``3.1``"
844-
``~=``, "Any compatible release. Compatible releases are releases that are
845-
within the same major or minor version, assuming the package author is using
846-
semantic versioning.", "``~=3.1``: version ``3.1`` or later, but not version
847-
``4.0`` or later. ``~=3.1.2``: version ``3.1.2`` or later, but not
848-
version ``3.2.0`` or later."
849-
``*``,Can be used at the end of a version number to represent "all", "``== 3.
850-
1.*``: any version that starts with ``3.1``. Equivalent to ``~=3.1.0``."
830+
+----------+---------------------------------+--------------------------------+
831+
| Operator | Description | Example |
832+
+==========+=================================+================================+
833+
| ``>`` | Any version greater than | ``>3.1``: any version |
834+
| | the specified version. | greater than ``3.1``. |
835+
+----------+---------------------------------+--------------------------------+
836+
| ``<`` | Any version less than | ``<3.1``: any version |
837+
| | the specified version. | less than ``3.1``. |
838+
+----------+---------------------------------+--------------------------------+
839+
| ``<=`` | Any version less than or | ``<=3.1``: any version |
840+
| | equal to the specified version. | less than or equal to ``3.1``. |
841+
+----------+---------------------------------+--------------------------------+
842+
| ``>=`` | Any version greater than or | ``>=3.1``: |
843+
| | equal to the specified version. | version ``3.1`` and greater. |
844+
+----------+---------------------------------+--------------------------------+
845+
| ``==`` | Exactly the specified version. | ``==3.1``: only ``3.1``. |
846+
+----------+---------------------------------+--------------------------------+
847+
| ``!=`` | Any version not equal | ``!=3.1``: any version |
848+
| | to the specified version. | other than ``3.1``. |
849+
+----------+---------------------------------+--------------------------------+
850+
| ``~=`` | Any compatible release. | ``~=3.1``: version ``3.1`` |
851+
| | Compatible releases are | or later, but not |
852+
| | releases that are within the | version ``4.0`` or later. |
853+
| | same major or minor version, | ``~=3.1.2``: version ``3.1.2`` |
854+
| | assuming the package author | or later, but not |
855+
| | is using semantic versioning. | version ``3.2.0`` or later. |
856+
+----------+---------------------------------+--------------------------------+
857+
| ``*`` | Can be used at the end of | ``==3.1.*``: any version |
858+
| | a version number to represent | that starts with ``3.1``. |
859+
| | *all*, | Equivalent to ``~=3.1.0``. |
860+
+----------+---------------------------------+--------------------------------+
851861

852862
The detailed specification of supported comparison operators can be
853863
found in :pep:`440`.

0 commit comments

Comments
 (0)