From 50b7be3f693803eedb3543349d09b82397e67c60 Mon Sep 17 00:00:00 2001 From: CoretexShadow Date: Sat, 30 Aug 2025 18:28:14 +0330 Subject: [PATCH 1/3] docs(pip_freeze): clarify --all and add concise before/after example --- docs/html/cli/pip_freeze.rst | 48 ++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/docs/html/cli/pip_freeze.rst b/docs/html/cli/pip_freeze.rst index b90bcad70fb..d01ecafa25b 100644 --- a/docs/html/cli/pip_freeze.rst +++ b/docs/html/cli/pip_freeze.rst @@ -29,6 +29,14 @@ Options .. pip-command-options:: freeze +.. note:: + + By default, ``pip freeze`` omits pip's own bootstrap tools (``pip``, + ``setuptools``, and ``wheel``) to keep the output focused on project + dependencies. Use ``--all`` to include these as well, which is helpful when + capturing a full environment snapshot. Remember that ``pip freeze`` only + reports what is currently installed; it is not a lockfile or solver result. + Examples ======== @@ -73,6 +81,46 @@ Examples env1\bin\python -m pip freeze > requirements.txt env2\bin\python -m pip install -r requirements.txt +#. Compare default output with ``--all``. + + .. tab:: Unix/macOS + + .. code-block:: console + + $ python -m pip freeze + certifi==... + idna==... + requests==... + urllib3==... + + $ python -m pip freeze --all + certifi==... + idna==... + requests==... + urllib3==... + pip==... + setuptools==... + wheel==... + + .. tab:: Windows + + .. code-block:: console + + C:\> py -m pip freeze + certifi==... + idna==... + requests==... + urllib3==... + + C:\> py -m pip freeze --all + certifi==... + idna==... + requests==... + urllib3==... + pip==... + setuptools==... + wheel==... + Fixing "Permission denied:" errors ================================== From 6aebf80bd3e0bd65f83edc67cf85e46e43f9008c Mon Sep 17 00:00:00 2001 From: CoretexShadow Date: Sat, 30 Aug 2025 19:03:01 +0330 Subject: [PATCH 2/3] chore(news): add changelog fragment for docs(pip_freeze) (#13563) --- news/13563.doc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 news/13563.doc.rst diff --git a/news/13563.doc.rst b/news/13563.doc.rst new file mode 100644 index 00000000000..5d23dcb8b38 --- /dev/null +++ b/news/13563.doc.rst @@ -0,0 +1 @@ +Clarified ``pip freeze --all`` documentation and added a concise before/after example. From 5fd246bb4a680a62410c1a2b4f981749feef5766 Mon Sep 17 00:00:00 2001 From: CoretexShadow Date: Mon, 1 Sep 2025 13:31:42 +0330 Subject: [PATCH 3/3] docs(pip_freeze): clarify --all with Python 3.11/3.12 nuance; keep concise example; add towncrier fragment (#13563) --- docs/html/cli/pip_freeze.rst | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/html/cli/pip_freeze.rst b/docs/html/cli/pip_freeze.rst index d01ecafa25b..e52a7fa22de 100644 --- a/docs/html/cli/pip_freeze.rst +++ b/docs/html/cli/pip_freeze.rst @@ -31,11 +31,12 @@ Options .. note:: - By default, ``pip freeze`` omits pip's own bootstrap tools (``pip``, - ``setuptools``, and ``wheel``) to keep the output focused on project - dependencies. Use ``--all`` to include these as well, which is helpful when - capturing a full environment snapshot. Remember that ``pip freeze`` only - reports what is currently installed; it is not a lockfile or solver result. + By default, ``pip freeze`` omits some bootstrap tooling so the output focuses on + your project’s dependencies. In Python **3.11 and earlier**, this means ``pip``, + ``setuptools`` and ``wheel`` are skipped by default; in Python **3.12 and later**, + only ``pip`` is skipped. Use ``--all`` to include those entries as well when you + need a complete environment snapshot. Note that ``pip freeze`` reports what is + installed—it does **not** compute a lockfile or a solver result. Examples @@ -83,6 +84,9 @@ Examples #. Compare default output with ``--all``. + The exact entries vary by Python version; on Python 3.12 and later only + ``pip`` is omitted by default. + .. tab:: Unix/macOS .. code-block:: console