File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -44,13 +44,15 @@ package that provides it.
44
44
What are the links between distribution packages and import packages?
45
45
=====================================================================
46
46
47
- By convention , a distribution package usually provides one single import
47
+ Most of the time , a distribution package provides one single import
48
48
package (or non-package module), with a matching name. For example,
49
49
``pip install numpy `` lets you ``import numpy ``.
50
50
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.)
54
56
55
57
A distribution package could provide an import package with a different
56
58
name. An example of this is the popular Pillow _ library for image
You can’t perform that action at this time.
0 commit comments