Skip to content

Commit 7fdf163

Browse files
authored
Merge pull request #8795 from McSinyx/user-guide-fmt
Reformat a few spots in user guide
2 parents 8663855 + 984fa3c commit 7fdf163

File tree

2 files changed

+46
-44
lines changed

2 files changed

+46
-44
lines changed

docs/html/user_guide.rst

+46-44
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ directly from distribution files.
3636

3737

3838
The most common scenario is to install from `PyPI`_ using :ref:`Requirement
39-
Specifiers`
40-
41-
::
39+
Specifiers` ::
4240

4341
$ pip install SomePackage # latest version
4442
$ pip install SomePackage==1.0.4 # specific version
@@ -144,9 +142,7 @@ Requirements Files
144142
==================
145143

146144
"Requirements files" are files containing a list of items to be
147-
installed using :ref:`pip install` like so:
148-
149-
::
145+
installed using :ref:`pip install` like so::
150146

151147
pip install -r requirements.txt
152148

@@ -232,9 +228,7 @@ contents is nearly identical to :ref:`Requirements Files`. There is one key
232228
difference: Including a package in a constraints file does not trigger
233229
installation of the package.
234230

235-
Use a constraints file like so:
236-
237-
::
231+
Use a constraints file like so::
238232

239233
pip install -c constraints.txt
240234

@@ -848,16 +842,14 @@ Understanding your error message
848842
When you get a ``ResolutionImpossible`` error, you might see something
849843
like this:
850844

851-
::
852-
853-
pip install package_coffee==0.44.1 package_tea==4.3.0
854-
855-
::
845+
.. code-block:: console
856846
857-
Due to conflicting dependencies pip cannot install package_coffee and
858-
package_tea:
859-
- package_coffee depends on package_water<3.0.0,>=2.4.2
860-
- package_tea depends on package_water==2.3.1
847+
$ pip install package_coffee==0.44.1 package_tea==4.3.0
848+
...
849+
Due to conflicting dependencies pip cannot install
850+
package_coffee and package_tea:
851+
- package_coffee depends on package_water<3.0.0,>=2.4.2
852+
- package_tea depends on package_water==2.3.1
861853
862854
In this example, pip cannot install the packages you have requested,
863855
because they each depend on different versions of the same package
@@ -876,27 +868,37 @@ commonly understood comparison operators to specify the required version
876868
However, Python packaging also supports some more complex ways for
877869
specifying package versions (e.g. ``~=`` or ``*``):
878870

879-
.. csv-table::
880-
:header: "Operator", "Description", "Example"
881-
882-
``>``, "Any version greater than the specified version", "``>3.1``: any
883-
version greater than 3.1"
884-
``<``, "Any version less than the specified version", "``<3.1``: any version
885-
less than ``3.1``"
886-
``<=``, "Any version less than or equal to the specified version", "``<=3.1``:
887-
any version less than or equal to ``3.1``"
888-
``>=``, "Any version greater than or equal to the specified
889-
version", "``>=3.1``: version ``3.1`` and greater"
890-
``==``, "Exactly the specified version", ``==3.1``: only version ``3.1``
891-
``!=``, "Any version not equal to the specified version", "``!=3.1``: any
892-
version other than ``3.1``"
893-
``~=``, "Any compatible release. Compatible releases are releases that are
894-
within the same major or minor version, assuming the package author is using
895-
semantic versioning.", "``~=3.1``: version ``3.1`` or later, but not version
896-
``4.0`` or later. ``~=3.1.2``: version ``3.1.2`` or later, but not
897-
version ``3.2.0`` or later."
898-
``*``,Can be used at the end of a version number to represent "all", "``== 3.
899-
1.*``: any version that starts with ``3.1``. Equivalent to ``~=3.1.0``."
871+
+----------+---------------------------------+--------------------------------+
872+
| Operator | Description | Example |
873+
+==========+=================================+================================+
874+
| ``>`` | Any version greater than | ``>3.1``: any version |
875+
| | the specified version. | greater than ``3.1``. |
876+
+----------+---------------------------------+--------------------------------+
877+
| ``<`` | Any version less than | ``<3.1``: any version |
878+
| | the specified version. | less than ``3.1``. |
879+
+----------+---------------------------------+--------------------------------+
880+
| ``<=`` | Any version less than or | ``<=3.1``: any version |
881+
| | equal to the specified version. | less than or equal to ``3.1``. |
882+
+----------+---------------------------------+--------------------------------+
883+
| ``>=`` | Any version greater than or | ``>=3.1``: |
884+
| | equal to the specified version. | version ``3.1`` and greater. |
885+
+----------+---------------------------------+--------------------------------+
886+
| ``==`` | Exactly the specified version. | ``==3.1``: only ``3.1``. |
887+
+----------+---------------------------------+--------------------------------+
888+
| ``!=`` | Any version not equal | ``!=3.1``: any version |
889+
| | to the specified version. | other than ``3.1``. |
890+
+----------+---------------------------------+--------------------------------+
891+
| ``~=`` | Any compatible release. | ``~=3.1``: version ``3.1`` |
892+
| | Compatible releases are | or later, but not |
893+
| | releases that are within the | version ``4.0`` or later. |
894+
| | same major or minor version, | ``~=3.1.2``: version ``3.1.2`` |
895+
| | assuming the package author | or later, but not |
896+
| | is using semantic versioning. | version ``3.2.0`` or later. |
897+
+----------+---------------------------------+--------------------------------+
898+
| ``*`` | Can be used at the end of | ``==3.1.*``: any version |
899+
| | a version number to represent | that starts with ``3.1``. |
900+
| | *all*, | Equivalent to ``~=3.1.0``. |
901+
+----------+---------------------------------+--------------------------------+
900902

901903
The detailed specification of supported comparison operators can be
902904
found in :pep:`440`.
@@ -1181,11 +1183,11 @@ How to test
11811183
- If you use pip to install your software, try out the new resolver
11821184
and let us know if it works for you with ``pip install``. Try:
11831185

1184-
- installing several packages simultaneously
1185-
- re-creating an environment using a ``requirements.txt`` file
1186-
- using ``pip install --force-reinstall`` to check whether
1187-
it does what you think it should
1188-
- using constraints files
1186+
- installing several packages simultaneously
1187+
- re-creating an environment using a ``requirements.txt`` file
1188+
- using ``pip install --force-reinstall`` to check whether
1189+
it does what you think it should
1190+
- using constraints files
11891191

11901192
- If you have a build pipeline that depends on pip installing your
11911193
dependencies for you, check that the new resolver does what you

news/093f7456-cc25-4df9-9518-4732b1e07fe5.trivial

Whitespace-only changes.

0 commit comments

Comments
 (0)