Skip to content
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
13 changes: 8 additions & 5 deletions peps/pep-0794.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ name should also be listed appropriately in ``Import-Namespace`` and/or
``spam`` with multiple submodules would only list
``project.import-names = ["spam"]``. A project that lists ``spam.bacon.eggs``
would also need to account for ``spam`` and ``spam.bacon`` appropriately in
``project-names`` and ``project-namespaces``. Listing all names acts as a check
``import-names`` and ``import-namespaces``. Listing all names acts as a check
that the intent of the import names is as expected.

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

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


Examples
Expand Down