Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sigstore: flatten models into sigstore.models #990

Merged
merged 7 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ All versions prior to 0.9.0 are untracked.
### Removed

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

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

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

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

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

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

## [2.1.5]

Expand Down
2 changes: 1 addition & 1 deletion sigstore/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
from sigstore._utils import sha256_digest
from sigstore.errors import Error, VerificationError
from sigstore.hashes import Hashed
from sigstore.models import Bundle
from sigstore.oidc import (
DEFAULT_OAUTH_ISSUER_URL,
STAGING_OAUTH_ISSUER_URL,
Expand All @@ -54,7 +55,6 @@
Verifier,
policy,
)
from sigstore.verify.models import Bundle

logging.basicConfig(format="%(message)s", datefmt="[%X]", handlers=[RichHandler()])
_logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion sigstore/_internal/merkle.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from sigstore.errors import VerificationError

if typing.TYPE_CHECKING:
from sigstore.transparency import LogEntry
from sigstore.models import LogEntry


_LEAF_HASH_PREFIX = 0
Expand Down
5 changes: 0 additions & 5 deletions sigstore/_internal/rekor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,7 @@
from sigstore._utils import base64_encode_pem_cert
from sigstore.hashes import Hashed

from .checkpoint import SignedCheckpoint
from .client import RekorClient

__all__ = [
"RekorClient",
"SignedCheckpoint",
"_hashedrekord_from_parts",
]

Expand Down
2 changes: 1 addition & 1 deletion sigstore/_internal/rekor/checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from sigstore.errors import VerificationError

if typing.TYPE_CHECKING:
from sigstore.transparency import LogEntry
from sigstore.models import LogEntry


@dataclass(frozen=True)
Expand Down
2 changes: 1 addition & 1 deletion sigstore/_internal/rekor/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import rekor_types
import requests

from sigstore.transparency import LogEntry
from sigstore.models import LogEntry

_logger = logging.getLogger(__name__)

Expand Down
Loading
Loading