PEP 420 (namespace packages)

E427619

PEP 420 (namespace packages) is a Python enhancement proposal that introduced implicit namespace packages, allowing portions of a single package to be split across multiple directories or distributions without requiring an __init__.py file.

All labels observed (1)

Label Occurrences
PEP 420 (namespace packages) canonical 1

How this entity was disambiguated

Statements (46)

Predicate Object
instanceOf Python Enhancement Proposal
affectsModuleAttribute __path__
allows multiple distributions to contribute subpackages to the same top-level package name
appliesToLanguage Python NERFINISHED
author Python core developers (as recorded in the PEP document)
backwardsCompatibility coexists with pkgutil and pkg_resources namespace packages
category Imports
clarifies how finders and loaders handle namespace packages
definesBehaviorFor import system handling of namespace packages
definesConcept namespace package
definesTerm namespace portion
portion (of a namespace package)
designGoal make namespace packages a first-class feature of the import system
simplify package layout for large projects
discourages use of pkg_resources.declare_namespace for new code
use of pkgutil.extend_path for new code
doesNotRequire __init__.py file in namespace package directories
ensures namespace packages participate in normal import semantics
governs creation of namespace packages without __init__.py
impact packaging of large frameworks split across multiple distributions
third-party library distribution on PyPI
introducedFeature implicit namespace packages
isDocumentedAt https://peps.python.org/pep-0420/
isImplementedIn CPython NERFINISHED
PyPy NERFINISHED
other Python 3 implementations
keyIdea a package can be created by the presence of directories on sys.path with the same name and no __init__.py
namespace packages are created implicitly by the import system
portions of a namespace package can live in multiple directories on sys.path
languageVersionIntroduced Python 3.3 NERFINISHED
motivation remove requirement for __init__.py in all package directories
support splitting a single logical package across multiple directories or distributions
relatedTo PEP 273 NERFINISHED
PEP 302 NERFINISHED
PEP 328 NERFINISHED
PEP 382 NERFINISHED
PEP 395 NERFINISHED
PEP 406 NERFINISHED
replacesMechanism pkg_resources-style namespace packages
pkgutil-style namespace packages
requiresPythonVersionAtLeast 3.3
specifies how __spec__ and module spec interact with namespace packages
status Final
title Implicit Namespace Packages
type Standards Track PEP
wasAcceptedFor Python 3.3 import system

How these facts were elicited

Referenced by (1)

Full triples — surface form annotated when it differs from this entity's canonical label.

setuptools supportsStandard PEP 420 (namespace packages)