Skip to content

Commit 76520a5

Browse files
Add the JSON report to html/man documentation and add NEWS entry!
1 parent 711972f commit 76520a5

File tree

4 files changed

+314
-3
lines changed

4 files changed

+314
-3
lines changed

Diff for: docs/html/cli/pip_download.rst

+20
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ them. Generic dependencies (e.g. universal wheels, or dependencies with no
4545
platform, abi, or implementation constraints) will still match an over-
4646
constrained download requirement.
4747

48+
``pip download --report output.json`` is an experimental feature which writes a :ref:`JSON report` of the
49+
inputs and outputs of pip's internal resolution process to ``output.json``. This can be useful to
50+
generate a lockfile, check whether transitive dependencies would introduce a conflict, or download
51+
packages directly from download URLs without having to traverse PyPI again. The ``--dry-run`` option
52+
can be used in conjunction to just produce a JSON report without actually downloading any packages,
53+
which is faster.
4854

4955

5056
Options
@@ -224,3 +230,17 @@ Examples
224230
--implementation cp ^
225231
--abi cp36m --abi cp36 --abi abi3 --abi none ^
226232
SomePackage
233+
234+
#. Generate a JSON report of the inputs and outputs of pip's internal resolution process with ``--report`` to ``pip-resolve.json``. See the documentation for :ref:`the JSON report <JSON report>`.
235+
236+
.. tab:: Unix/macOS
237+
238+
.. code-block:: shell
239+
240+
$ python -m pip download --dry-run --report pip-resolve.json SomePackage
241+
242+
.. tab:: Windows
243+
244+
.. code-block:: shell
245+
246+
C:> py -m pip download --dry-run --report pip-resolve.json SomePackage

Diff for: docs/html/topics/dependency-resolution.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,9 @@ will avoid performing dependency resolution during deployment.
163163

164164
## Dealing with dependency conflicts
165165

166-
This section provides practical suggestions to pip users who encounter
167-
a `ResolutionImpossible` error, where pip cannot install their specified
168-
packages due to conflicting dependencies.
166+
This section provides practical suggestions to pip users who encounter a `ResolutionImpossible`
167+
error, where pip cannot install their specified packages due to conflicting dependencies. Note that
168+
the {ref}`JSON report` may offer more debugging information.
169169

170170
### Understanding your error message
171171

0 commit comments

Comments
 (0)