Skip to content

Analyze dynamic imports and release 0.6.0 - #4

Merged
Horcag merged 2 commits into
masterfrom
analyze-dynamic-imports
Oct 26, 2026
Merged

Horcag merged 2 commits into
masterfrom
analyze-dynamic-imports

Conversation

@Horcag

@Horcag Horcag commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Problem and behavior

Dynamic imports previously bypassed the architecture rules. Add non-executing AST analysis for importlib.import_module, importlib.import, built-in import, and imports embedded in literal exec/eval/compile code. Resolved targets feed the existing layer, slice, public API, app/UI and optional wildcard-export checks.

Resolve loader aliases, constants, concatenation, f-strings, joins, relative packages and fromlists. Preserve scope and possible loader bindings across function parameters, methods, comprehensions and branches. A recognized loader with an unresolved target or opaque use fails explicitly with dynamic-imports, so uncertainty no longer counts as successful validation. Nested code expansion and diagnostics have finite budgets.

Release 0.6.0 includes updated documentation and installed-wheel acceptance controls. No new dependencies; project code and user-defined import hooks are never executed.

Validation

  • 270 tests pass locally, including 106 dynamic-import cases and subprocess controls.
  • Built wheel/source distribution; installed wheel passes computed sibling, upward, unknown-target, literal-exec and permitted-import controls in an isolated interpreter.
  • Python 3.8 grammar check and git diff --check pass; CI covers Python 3.8–3.14 and installed wheels.

@Horcag
Horcag merged commit 1bb1ed0 into master Oct 26, 2026
7 checks passed
@Horcag
Horcag deleted the analyze-dynamic-imports branch October 26, 2026 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant