Skip to content

fix: resolve circular import of models.LogEntry#1458

Merged
jku merged 1 commit intosigstore:mainfrom
SequeI:importFix
Jun 23, 2025
Merged

fix: resolve circular import of models.LogEntry#1458
jku merged 1 commit intosigstore:mainfrom
SequeI:importFix

Conversation

@SequeI
Copy link
Contributor

@SequeI SequeI commented Jun 23, 2025

This PR addresses an ImportError caused by a circular dependency between sigstore.models and the sigstore._internal.rekor package, specifically in its init.py file. This issue prevented the successful initialization of the sigstore library at runtime.

The problem occurred because sigstore.models (during its loading) was importing verify_checkpoint from sigstore._internal.rekor.checkpoint, while sigstore._internal.rekor/init.py simultaneously attempted to import LogEntry from the still-loading sigstore.models.

Resolves #1457

Signed-off-by: SequeI <asiek@redhat.com>
@jku
Copy link
Member

jku commented Jun 23, 2025

/gcbrun

Copy link
Member

@jku jku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@jku
Copy link
Member

jku commented Jun 23, 2025

no need for a changelog entry as we haven't released the bug yet

@jku jku merged commit 8cb6fc7 into sigstore:main Jun 23, 2025
23 checks passed
@SequeI SequeI deleted the importFix branch July 29, 2025 15:24
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.

Circular ImportError: sigstore.models and sigstore._internal.rekor dependency loop

2 participants