Repository navigation
Clarify namespace package requirements in plugin discovery guide - #2194
Merged
rgommers merged 2 commits intoNov 26, 2026
Merged
Conversation
rgommers
requested changes
Nov 18, 2026
The "Using namespace packages" section only described pkgutil-style namespace sub-packages (requiring an `__init__.py`), which contradicts PEP 420 native namespace packages. Describe both variants, mention `find_namespace_packages`, and note that `import myapp.plugins` fails when no plugin is installed. Fixes python#1104 Co-authored-by: jeej1k <351634202+jeej1k@users.noreply.github.com> Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… note Co-authored-by: jeej1k <351634202+jeej1k@users.noreply.github.com> Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
jeej3000
force-pushed
the
clarify-plugin-namespace-packages
branch
from
November 19, 2026 16:40
1b89453 to
4dfa8d8
Compare
rgommers
added this pull request to the merge queue
Nov 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The "Using namespace packages" section of the plugin discovery guide only described pkgutil-style namespace sub-packages (requiring an
__init__.py), which contradicts PEP 420 native namespace packages.This change:
setuptools.find_namespace_packagesinstead ofsetup(packages=...), sincefind_packagesskips directories without__init__.py,import myapp.pluginsraisesModuleNotFoundErrorwhen no plugin is installed.Tested: docs build with
sphinx-build -W; I also checked the native-namespace behaviour described with a small script.Fixes #1104
jeej3000 and jeej1k are both my accounts; jeej1k is credited as co-author as a backup in case one account is lost.
🤖 Generated with Claude Code
📚 Documentation preview 📚: https://python-packaging-user-guide--2194.org.readthedocs.build/en/2194/