Skip to content

Commit e6acca6

Browse files
committed
docs: Fix formatting and duplication in backtracking info
1 parent 00f3d57 commit e6acca6

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

docs/html/user_guide.rst

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1337,7 +1337,7 @@ candidate can take a lot of time. (The amount of time depends on the
13371337
package size, the number of versions pip must try, and other concerns.)
13381338

13391339
How does backtracking work?
1340-
~~~~~~~~~~~~~~~~~~~~~~~~~~~
1340+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
13411341

13421342
When doing a pip install, pip starts by making assumptions about the
13431343
packages it needs to install. During the install process it needs to check these
@@ -1384,8 +1384,6 @@ version of a package is a good candidate to install. It reduces the risk that
13841384
installing a new package will accidentally break an existing installed package,
13851385
and so reduces the risk that your environment gets messed up.
13861386

1387-
Please address this.
1388-
13891387
What does this behaviour look like?
13901388
-----------------------------------
13911389

@@ -1439,14 +1437,13 @@ Right now backtracking behaviour looks like this:
14391437
Downloading cup-3.13.0-py2.py3-none-any.whl (374 kB)
14401438

14411439
In the above sample output, pip had to download multiple versions of
1442-
package cup - cup-3.22.0 to cup-3.13.0 - to find a version that will be
1443-
compatible with the other packages - ``spoon``, ``hot-water``, ``cup``
1444-
etc.
1440+
package ``cup`` - cup-3.22.0 to cup-3.13.0 - to find a version that will be
1441+
compatible with the other packages - ``spoon``, ``hot-water``, etc.
14451442

14461443
These multiple ``Downloading cup-version`` lines show pip backtracking.
14471444

14481445
Possible ways to reduce backtracking occurring
1449-
---------------------------------------------
1446+
----------------------------------------------
14501447

14511448
It's important to mention backtracking behaviour is expected during a
14521449
``pip install`` process. What pip is trying to do is complicated - it is
@@ -1459,7 +1456,7 @@ here are a number of ways.
14591456
.. _1-allow-pip-to-complete-its-backtracking:
14601457

14611458
1. Allow pip to complete its backtracking
1462-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1459+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14631460

14641461
In most cases, pip will complete the backtracking process successfully.
14651462
It is possible this could take a very long time to complete - this may
@@ -1474,7 +1471,7 @@ If you'd prefer not to wait, you can interrupt pip (ctrl and c) and use
14741471
.. _2-reduce-the-versions-of-the-backtracking-package:
14751472

14761473
2. Reduce the number of versions pip will try to backtrack through
1477-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1474+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14781475

14791476
If pip is backtracking more than you'd like, the next option is to
14801477
constrain the number of package versions it tries.
@@ -1496,7 +1493,7 @@ can be trial and error.
14961493
.. _3-use-constraint-files-or-lockfiles:
14971494

14981495
3. Use constraint files or lockfiles
1499-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1496+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15001497

15011498
This option is a progression of 2 above. It requires users to know how
15021499
to inspect:
@@ -1518,7 +1515,7 @@ suitable constraints file.
15181515
.. _4-be-more-strict-on-package-dependencies-during-development:
15191516

15201517
4. Be more strict on package dependencies during development
1521-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1518+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15221519

15231520
For package maintainers during the development, give pip some help by
15241521
creating constraint files for the dependency tree. This will reduce the

0 commit comments

Comments
 (0)