Skip to content

test: measure packages introduced by isolated imports - #7470

Open
astrogilda wants to merge 1 commit into
google:mainfrom
astrogilda:codex/import-startup-fix-20261009
Open

astrogilda wants to merge 1 commit into
google:mainfrom
astrogilda:codex/import-startup-fix-20261009

Conversation

@astrogilda

Copy link
Copy Markdown

The isolated import checks include modules loaded by Python before the requested import. On Ubuntu's Python 3.12, that attributes sitecustomize to ADK and fails both entry-point allowlist checks.

Capture the full module-name baseline before the statement and measure only names introduced afterward. The controls preload a startup package, then confirm that a new package and a new submodule of that package are still counted. The existing allowlist and absolute unloaded-module checks stay in force.

Validation: 26 import checks pass on Python 3.12 and 3.14. The changed measurement helper has 100% statement coverage against the existing 80% per-file gate. Pyink, isort and compliance checks pass.

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.

2 participants