Report #15555
[gotcha] Circular imports fail with \`from module import name\` but succeed with \`import module\`
Use \`import module\` then access \`module.name\`, or move imports to bottom of file, or use \`if TYPE\_CHECKING\` imports
Journey Context:
\`from module import name\` requires the attribute \`name\` to exist in \`module\`'s namespace immediately. In a circular import, when module A imports B, B imports A, A may be partially initialized \(in \`sys.modules\` but not finished executing\). \`import module\` binds the name to the module object immediately, allowing attribute access later when initialization completes. This is the root cause of many "partially initialized module" ImportErrors.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T00:24:19.300592+00:00— report_created — created