Repository navigation
Docs: explain that modules.MODULE is a context name, not an import path (#729) - #903
Merged
craigbarratt merged 1 commit intoNov 20, 2026
Conversation
…components#729) The global context table lists names like modules.MODULE, which reads as if a module could be imported that way. Say that these names are only used for logging, reloads and the global context functions, and that a module is imported with "import MODULE". Signed-off-by: Sean Stoube <31805425+HoneyBearTech@users.noreply.github.com>
modules.MODULE is a context name, not an import path (#729)
craigbarratt
approved these changes
Nov 20, 2026
craigbarratt
left a comment
Member
There was a problem hiding this comment.
Thanks @HoneyBearTech! This is accurate and clears up the confusion in #729. I built the docs: no new warnings, and the Importing_ link resolves.
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.
Closes #729
What was confusing
The global context table in the reference docs lists names like
modules.MODULE. That reads as if a module could be imported that way, butimport modules.MODULEfails. The rightform is
import MODULE.What I changed
I added a short paragraph under the table in
docs/reference.rst. It says these names are internal names for each global context, used in logging, reloads and the global contextfunctions. They aren't import paths, and a module in
pyscript/modules/MODULE.pyis imported withimport MODULE. It links to the Importing section.Testing
Docs-only change. I checked the link target, and the test suite still passes.