Skip to content

Commit 38675a1

Browse files
committed
Address review comments
1 parent a7592e8 commit 38675a1

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

source/discussions/distribution-package-vs-import-package.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,15 @@ package that provides it.
4444
What are the links between distribution packages and import packages?
4545
=====================================================================
4646

47-
By convention, a distribution package usually provides one single import
47+
Most of the time, a distribution package provides one single import
4848
package (or non-package module), with a matching name. For example,
4949
``pip install numpy`` lets you ``import numpy``.
5050

51-
However, this is only a convention. PyPI and other package indices do
52-
not enforce any relationship between the name of a distribution package
53-
and the import packages it provides.
51+
However, this is only a convention. PyPI and other package indices *do not
52+
enforce any relationship* between the name of a distribution package and the
53+
import packages it provides. (A consequence of this is that you cannot blindly
54+
install the PyPI package ``foo`` if you see ``import foo``; this may install an
55+
unintended, and potentially even malicious package.)
5456

5557
A distribution package could provide an import package with a different
5658
name. An example of this is the popular Pillow_ library for image

0 commit comments

Comments
 (0)