You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
import_global does not count multiple leading dots in relative module names #73
AI-assisted source investigation, reproduced on Linux / CPython 3.12.15 against current develop at d5cfbc599fd76ed749d50fc37ba41aa5da8d2efb. This is a local reproducer, not a reported production incident.
Relative import names with two or more leading dots fail, although one-dot imports work:
I expected this to import from testrel.helper and set scope['value'] to 42. The implementation removes exactly one leading empty name part and sets level = 1, leaving an extra leading dot for deeper relative names.
A private candidate counts all leading dots and removes the corresponding name parts. Its two-dot and three-dot regression rows fail on the original source; the one-dot control passes. Absolute imports and the existing explicit-level behavior are left unchanged. I checked the related #29/#46/#52/#54/#66 discussions and did not find this case covered by their compatibility decisions or the current open work.
Would a focused fix for deeper relative import names be welcome? The contribution guide recommends discussing behavior changes, so I am asking before publishing a code PR. No implementation or PR has been published, this is not an assignment claim, and no production/security impact is asserted.
Activity