Skip to content

PEP 627: Remove REQUESTED from the spec #1575

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

Merged
merged 2 commits into from
Aug 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions pep-0627.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ except for ``*.pyc`` and ``RECORD`` itself.
(Note that PEP 376 is unclear on what was optional; when taken literally,
its text and examples contradict. Despite that, “both fields are optional“ is a
reasonable interpretation of PEP 376.
The alternative would be to mandate—rather rhan recommend—which files can be
The alternative would be to mandate—rather than recommend—which files can be
recorded without hash and size, and to update that list over time as new use
cases come up.)

Expand Down Expand Up @@ -204,21 +204,21 @@ any ASCII string in ``INSTALLER``, rather than a lowercase identifier.
It also suggests using the command-line command, if available.


The ``REQUESTED`` File
----------------------
The ``REQUESTED`` File: Removed from Spec
-----------------------------------------

The ``REQUESTED`` file is kept in the specification, with only tool-specific
notes removed.
The ``REQUESTED`` file is now considered a tool-specific extension.

It is made clear that while ``REQUESTED`` is optional, tools must handle it:
it can only be omitted only if it is known that a user did not request
installation directly.
Per :pep:`376`, ``REQUESTED`` was to be written when a project was installed
by direct user request, as opposed to automatically to satisfy dependencies
of another project. Projects without this marker file could be uninstalled
when no longer needed.

Note that tools that do not create this file effectively mark all installed
projects as “removable unless needed by another project”.
This was was the case with ``pip`` before version 20.2.
Before ``REQUESTED`` becomes commonplace, automatically uninstalling “orphaned”
projects should be done with care.
Despite the standard, many existing installers (including older versions of
``pip``) never write this file. There is no distinction between projects
that are “OK to remove when no longer needed” and ones simply installed by
a tool that ignores ``REQUESTED``. So, the file is currently not usable for its
intended purpose (unless a tool can use additional, non-standard information).


Clarifications
Expand All @@ -236,8 +236,9 @@ future PEPs:

* Encoding of the ``RECORD`` file
* Limiting or namespacing files that can appear in ``.dist-info``
* Marking the difference between projects installed by a tool that does not
support the ``REQUESTED`` file and projects installed as dependencies
* Marking the difference between projects installed directly by user request
versus those installed to satisfy dependencies, so that the latter can be
removed when no longer needed.


Copyright
Expand Down