fix(models): break circular import with Rekor clients#1667
fix(models): break circular import with Rekor clients#1667MatteoFari wants to merge 1 commit intosigstore:mainfrom
Conversation
Signed-off-by: Matteo Fari <matteofari06@gmail.com>
|
@jku sorry to bother, do you think it fixes the circular import or is there an issue? |
|
sorry, it's been a little busy. The PR moves the lazy imports to a different place -- maybe a slightly more appropriate one but it's still a lazy import to avoid the cycle, right? It's quite possible that there is no clean way to avoid lazy imports here but I'm not sure this is an improvement. |
|
Yeah, you're right it's just a lazy import in another place, even tho it's a little bit more clean. The goal was to keep sigstore.models clean and break the cycle by lazily importing TransparencyLogEntry inside the Rekor client methods where it’s actually used. So I think that if we want zero lazy imports we should split TransparencyLogEntry into a separate module and re‑export it from models, which is a bigger refactor tho. |
Summary
fixes: #1536
This PR fixes the circular import that required lazy imports in sigstore.models after moving additional trust/config types into models.py.
Release Note
Fixed a circular import between sigstore.models and Rekor client modules, removing the need for lazy imports when constructing transparency log clients.
Documentation