-
Notifications
You must be signed in to change notification settings - Fork 3.2k
docs(pip_freeze): clarify --all; add concise example #13563
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ncise example; add towncrier fragment (pypa#13563)
Hi @CoretexShadow thanks for submitting this PR to pip! All pip maintainers currently operate on a volunteer basis, so it can take some time for one of to take a look and review a PR. I will try and make some time soon to review this PR though. |
Hi @CortexShadow, thanks a lot for contributing to pip! |
Thanks for checking this and confirming! Really appreciate your feedback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for your interest in improving pip!
While I agree we could document pip freeze --all
better, we can probably simplify how we go about that. It's likely a very uncommon option. Short and sweet is best.
Sorry for the long wait!
docs/html/cli/pip_freeze.rst
Outdated
.. note:: | ||
|
||
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.. note:: | |
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. | |
.. note:: | |
By default, ``pip freeze`` omits some bootstrap tooling so the output focuses on | |
your project’s dependencies. On Python **3.11 and earlier**, this means ``pip``, | |
``setuptools`` and ``wheel`` are skipped by default; on Python **3.12 and later**, | |
only ``pip`` is skipped. Use ``--all`` to include those packages 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, on Python 3.11 and lower, distribute
is also ignored.
docs/html/cli/pip_freeze.rst
Outdated
env1\bin\python -m pip freeze > requirements.txt | ||
env2\bin\python -m pip install -r requirements.txt | ||
#. Compare default output with ``--all``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest, I don't think we gain much from including an example. It's predictable what --all
will do given the note you added earlier. I suspect --all
is very rarely used, so IMO it doesn't warrant an example.
docs/html/cli/pip_freeze.rst
Outdated
|
||
.. pip-command-options:: freeze | ||
|
||
.. note:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
news/13563.doc.rst
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should really make this clearer in the contributing docs, but we only add changelog entries for documentation changes when the changes are major (like restructuring a large portion).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should really make this clearer in the contributing docs, but we only add changelog entries for documentation changes when the changes are major (like restructuring a large portion).
Thanks for the review! I’ve applied the requested changes, and I agree that no changelog entry is needed for these minor documentation updates. I’ve removed the unnecessary example, clarified the --all option, and moved the note as suggested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Summary
Improves the documentation for
pip freeze --all
by adding a clear explanatory note and a before/after example. This is a documentation-only change; no behavior is modified.Motivation
The current description of
--all
can be misread and leaves ambiguity about which packages are shown. By making it explicit thatpip
,setuptools
, andwheel
are skipped by default—and included with--all
—the docs now provide a more accurate and practical mental model for users.Changes
.. note::
clarifying default behavior and the effect of--all
.pip freeze
vs.pip freeze --all
.Notes
Related
Closes #13557