Skip to content

Commit 6d8be68

Browse files
committed
DOC: Discourage
1 parent e338def commit 6d8be68

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

source/specifications/recording-installed-packages.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -175,14 +175,15 @@ attempt to uninstall or upgrade the package.
175175
(This restriction does not apply to tools that rely on other sources of information,
176176
such as system package managers in Linux distros.)
177177

178-
.. warning::
179-
180-
If your package dynamically generates files at runtime, you will need to update
181-
the ``RECORD`` file to reflect the new files. If you do not, the files will be
182-
retained during uninstallation (e.g., by ``pip uninstall my_package``) likely leading
183-
to issues such as the package remaining importable but errantly appearing as a
184-
namespace package. See :gh:`pypa/pip/issues/11835` for discussion.
178+
.. note::
185179

180+
It is *strongly discouraged* for an installed package to modify itself
181+
(e.g., store cache files under its namespace in ``site-packages``).
182+
Changes inside ``site-packages`` should be left to specialized installer
183+
tools such as pip. If a package is nevertheless modified in this way,
184+
then the ``RECORD`` must be updated, otherwise uninstalling the package
185+
will leave unlisted files in place (possibly resulting in a zombie
186+
namespace package).
186187

187188
The INSTALLER file
188189
==================

0 commit comments

Comments
 (0)