Skip to content

Commit 369e2fc

Browse files
authored
PEP 794: Clarify the default action when Import-Name et. al. are not specified (#4545)
Also fix a couple critical typos.
1 parent d995878 commit 369e2fc

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

peps/pep-0794.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ name should also be listed appropriately in ``Import-Namespace`` and/or
142142
``spam`` with multiple submodules would only list
143143
``project.import-names = ["spam"]``. A project that lists ``spam.bacon.eggs``
144144
would also need to account for ``spam`` and ``spam.bacon`` appropriately in
145-
``project-names`` and ``project-namespaces``. Listing all names acts as a check
145+
``import-names`` and ``import-namespaces``. Listing all names acts as a check
146146
that the intent of the import names is as expected.
147147

148148
Tools SHOULD raise an error when two projects that are to be installed list
@@ -151,10 +151,13 @@ projects unexpectedly shadowing another project's code. The same applies to when
151151
a project has an entry in ``Import-Name`` that overlaps with another project's
152152
``Import-Namespace`` entries.
153153

154-
Projects MAY leave ``Import-Name`` and ``Import-Namespace`` empty. In that
155-
instance, tools SHOULD assume that the normalized project name when converted to
156-
an import name would be an entry in ``Import-Name``
157-
(i.e. ``-`` substituted for ``-`` in the normalized project name).
154+
Projects MAY leave ``Import-Name`` and ``Import-Namespace`` out of the core
155+
metadata for a project. In that instance, tools SHOULD assume that when the
156+
core metadata is 2.5 or newer that the normalized project name when converted to
157+
an import name would be an entry in ``Import-Name`` (i.e. ``-`` substituted for
158+
``-`` in the normalized project name). This is deemed reasonable as this will
159+
only occur for projects that make a new release once their build back-end
160+
supports core metadata 2.5 or newer as proposed by this PEP.
158161

159162

160163
Examples

0 commit comments

Comments
 (0)