fix(base): concrete-module imports for the init-time resolved module - #178
Merged
Merged
Conversation
base.py resolves during the package root's lazy 's' export, while the root namespace is still initializing: 'from flext_cli import m' bound a partial module and m.Cli raised AttributeError, orphaning the s export fleet-wide (every gen/conform importing flext-cli failed). Import the facade objects from their concrete owner modules instead.
|
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.



Summary
flext_cli/base.pyresolves while the package root is still initializing (it is the lazy target of thesfacade export). Its root-package import bound a partial module, som.Cliraised AttributeError and thesexport orphaned fleet-wide — every gen/conform importing flext-cli failed withcannot import name 's' from 'flext_cli'.Fix: import the facade objects from their concrete owner modules (
flext_cli.models/protocols/typings/utilities), which initialize without the root cycle.Evidence
from flext_cli import c, m, p, r, s, settings, t, u— all resolve (was: ImportError ons).Tracking
Summary by cubic
Fixes an import-time failure when importing
flext_cliduring package root initialization.base.pypreviously imported facade objects from the root package, which bound a partial module and causedm.Clito raise AttributeError, orphaning thesexport and breakingfrom flext_cli import s. Now imports from the concrete owner modules (models,protocols,typings,utilities), which initialize without the root cycle, so all facade imports resolve normally.Written for commit 1d8f061. Summary will update on new commits.