Skip to content

Commit e043849

Browse files
authored
sigstore: flatten models into sigstore.models (#990)
* sigstore: flatten models into sigstore.models Signed-off-by: William Woodruff <william@trailofbits.com> * CHANGELOG: record Signed-off-by: William Woodruff <william@trailofbits.com> --------- Signed-off-by: William Woodruff <william@trailofbits.com>
1 parent 9cc8cb1 commit e043849

15 files changed

+350
-390
lines changed

CHANGELOG.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ All versions prior to 0.9.0 are untracked.
3131
### Removed
3232

3333
* **BREAKING API CHANGE**: `SigningResult` has been removed.
34-
The public signing APIs now return `sigstore.verify.models.Bundle`.
34+
The public signing APIs now return `sigstore.models.Bundle`.
3535

3636
* **BREAKING API CHANGE**: `VerificationMaterials` has been removed.
37-
The public verification APIs now accept `sigstore.verify.models.Bundle`.
37+
The public verification APIs now accept `sigstore.models.Bundle`.
3838

3939
* **BREAKING API CHANGE**: `Signer.sign(...)` has been removed. Use
4040
either `sign_artifact(...)` or `sign_dsse(...)`, depending on whether
@@ -55,7 +55,7 @@ All versions prior to 0.9.0 are untracked.
5555
a `Hashed` parameter to convey the digest used for Rekor entry lookup
5656
([#904](https://github.com/sigstore/sigstore-python/pull/904))
5757

58-
* **BREAKING API CHANGE**: `Verifier.verify(...)` now takes a `sigstore.verify.models.Bundle`,
58+
* **BREAKING API CHANGE**: `Verifier.verify(...)` now takes a `sigstore.models.Bundle`,
5959
instead of a `VerificationMaterials` ([#937](https://github.com/sigstore/sigstore-python/pull/937))
6060

6161
* sigstore-python now requires inclusion proofs in all signing and verification
@@ -74,6 +74,9 @@ All versions prior to 0.9.0 are untracked.
7474
an inclusion proof. Passing `--offline` with detached materials will cause
7575
an error ([#937](https://github.com/sigstore/sigstore-python/pull/937))
7676

77+
* API: `sigstore.transparency` has been removed, and its pre-existing APIs
78+
have been re-homed under `sigstore.models`
79+
([#990](https://github.com/sigstore/sigstore-python/pull/990))
7780

7881
## [2.1.5]
7982

sigstore/_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
from sigstore._utils import sha256_digest
4242
from sigstore.errors import Error, VerificationError
4343
from sigstore.hashes import Hashed
44+
from sigstore.models import Bundle
4445
from sigstore.oidc import (
4546
DEFAULT_OAUTH_ISSUER_URL,
4647
STAGING_OAUTH_ISSUER_URL,
@@ -54,7 +55,6 @@
5455
Verifier,
5556
policy,
5657
)
57-
from sigstore.verify.models import Bundle
5858

5959
logging.basicConfig(format="%(message)s", datefmt="[%X]", handlers=[RichHandler()])
6060
_logger = logging.getLogger(__name__)

sigstore/_internal/merkle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
from sigstore.errors import VerificationError
3434

3535
if typing.TYPE_CHECKING:
36-
from sigstore.transparency import LogEntry
36+
from sigstore.models import LogEntry
3737

3838

3939
_LEAF_HASH_PREFIX = 0

sigstore/_internal/rekor/__init__.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,7 @@
2424
from sigstore._utils import base64_encode_pem_cert
2525
from sigstore.hashes import Hashed
2626

27-
from .checkpoint import SignedCheckpoint
28-
from .client import RekorClient
29-
3027
__all__ = [
31-
"RekorClient",
32-
"SignedCheckpoint",
3328
"_hashedrekord_from_parts",
3429
]
3530

sigstore/_internal/rekor/checkpoint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
from sigstore.errors import VerificationError
3333

3434
if typing.TYPE_CHECKING:
35-
from sigstore.transparency import LogEntry
35+
from sigstore.models import LogEntry
3636

3737

3838
@dataclass(frozen=True)

sigstore/_internal/rekor/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import rekor_types
2929
import requests
3030

31-
from sigstore.transparency import LogEntry
31+
from sigstore.models import LogEntry
3232

3333
_logger = logging.getLogger(__name__)
3434

0 commit comments

Comments
 (0)