Skip to content

fix(resolver): block invalid import call fallback - #26

Draft
JohnXu22786 wants to merge 2 commits into
mainfrom
fix/block-overdeep-python-global-call-fallback
Draft

JohnXu22786 wants to merge 2 commits into
mainfrom
fix/block-overdeep-python-global-call-fallback

Conversation

@JohnXu22786

@JohnXu22786 JohnXu22786 commented Sep 12, 2026 •

Copy link
Copy Markdown
Owner

What this PR does

Before this PR:

Over-deep Python relative imports could remain unresolved while calls through imported names fell through to unrelated globally unique symbols. Raw aliases and wildcard imports could bypass the guard.

After this PR:

Unresolved Python from bindings stop before global-name fallback, including as aliases and * imports. Relative imports beyond package depth are rejected in module and imported-file resolution. Focused regression coverage covers the direct, aliased, and wildcard forms with one unique foo symbol.

Type of change

Bug fix

Keep unresolved Python from-import bindings from falling through to a globally unique symbol, and reject relative imports that traverse beyond the package depth.
Raw Python from-import entries include alias and wildcard syntax, so compare bound names before allowing an unresolved import to use the global fallback.
@JohnXu22786 JohnXu22786 reopened this Sep 25, 2026
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