pip 22.2, released on July 21, 2022, lets Python build teams see what an installation would select without installing those packages. The new --dry-run option can be paired with an experimental --report option to save the proposed installation as JSON. Build teams can inspect the proposed packages in a structured file before allowing an install. This retrospective uses official pip 22.2 release-tagged documentation and code retrieved in 2026; July 21 is the release date, not a separately established first-publication date for each document. [S1][S2]

Both features are opt-in. In the 22.2 implementation, dry-run defaults to false and the report destination defaults to none. Asking for a report does not itself stop installation: --report can describe an ordinary install, while --dry-run is the switch that prevents it. A review job intended only to produce a package plan therefore needs the dry-run option as well as a report filename. [S3][S5]

The existing environment also matters. pip normally prefers to leave an installed version in place unless --upgrade is specified. Its documented combination of --dry-run, --ignore-installed and --report resolves requirements without using the installed packages as the starting point. For teams inspecting a fresh dependency selection, that is a different question from what an update to an already populated environment would do. Keep --dry-run in that combination: the separate --ignore-installed option is not a preview switch. [S2][S3]

The report records the pip version and the environment in which it was generated, along with an install array of packages. Each item includes package metadata and a requested flag: true means the user supplied the requirement, directly or through a requirements file; false means it arrived as another requirement’s dependency. A build team could use that distinction to inspect unexpected indirect dependencies before approving an installation. That is a possible use of the report, not a security assessment supplied by pip. [S5]

Dry-run still performs dependency resolution. The 22.2 code resolves requirements before writing the report and returning from the dry-run branch. The install documentation also says that discovering metadata for local directories or explicitly supplied source distributions uses setup.py egg_info. Teams should not mistake “do not install” for “do not process package metadata,” or treat this option as a sandbox for untrusted packages. [S2][S3]

The July release’s report format is version "0", explicitly experimental. Its specification tells consumers to check the version field and allows incompatible changes when the format reaches version 1. It also says the report is not a lock-file format and that pip has no plan to accept it as input to install, download or wheel commands. Saving the JSON is therefore an inspection record, not a ready-made instruction to reproduce that installation later. [S5]

Source documents

  1. pip 22.2 release noteshttps://raw.githubusercontent.com/pypa/pip/22.2/NEWS.rst
  2. pip 22.2 install documentationhttps://raw.githubusercontent.com/pypa/pip/22.2/docs/html/cli/pip_install.rst
  3. pip 22.2 install command implementationhttps://raw.githubusercontent.com/pypa/pip/22.2/src/pip/_internal/commands/install.py
  4. pip 22.2 installation-report specificationhttps://raw.githubusercontent.com/pypa/pip/22.2/docs/html/reference/installation-report.md