From 9ccdd9ee4b072de7d6a34d7a60f8362273cde2d7 Mon Sep 17 00:00:00 2001 From: Clement Delafargue Date: Fri, 19 Sep 2025 23:03:00 +0200 Subject: [PATCH 1/3] fix: expose `ThirdPartyRequest` and `ThirdPartyBlock` --- CHANGELOG.md | 4 ++++ biscuit_auth.pyi | 2 ++ src/lib.rs | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f544e9..a479ec7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# Unreleased + +- support for third-party blocks + # 0.4.0-beta.2 - pre-built wheels for python 3.9-3.13 diff --git a/biscuit_auth.pyi b/biscuit_auth.pyi index cb21d30..845cf58 100644 --- a/biscuit_auth.pyi +++ b/biscuit_auth.pyi @@ -626,6 +626,7 @@ class UnverifiedBiscuit: def revocation_ids(self) -> List[str]: ... def verify(self, root: PublicKey) -> Biscuit: ... +# Third party block request class ThirdPartyRequest: # Create a third-party block # @@ -643,5 +644,6 @@ class ThirdPartyRequest: block: BlockBuilder ) -> ThirdPartyBlock: ... +# Third party block contents class ThirdPartyBlock: pass diff --git a/src/lib.rs b/src/lib.rs index 2bdb8a4..89de5ec 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1065,6 +1065,7 @@ impl PyBlockBuilder { } } +/// Third party block request #[pyclass(name = "ThirdPartyRequest")] pub struct PyThirdPartyRequest(Option); @@ -1097,6 +1098,7 @@ impl PyThirdPartyRequest { } } +/// Third party block contents #[pyclass(name = "ThirdPartyBlock")] pub struct PyThirdPartyBlock(ThirdPartyBlock); @@ -1706,6 +1708,8 @@ pub fn biscuit_auth(py: Python, m: &Bound) -> PyResult<()> { m.add_class::()?; m.add_class::()?; m.add_class::()?; + m.add_class::()?; + m.add_class::()?; m.add("DataLogError", py.get_type::())?; m.add("AuthorizationError", py.get_type::())?; From 95c86fe6abf7b06df6da9a581509d5b31ad1fde5 Mon Sep 17 00:00:00 2001 From: Clement Delafargue Date: Fri, 19 Sep 2025 23:08:24 +0200 Subject: [PATCH 2/3] chore: bump biscuit-rust to 6.0.0 --- CHANGELOG.md | 1 + Cargo.lock | 12 ++++++------ Cargo.toml | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a479ec7..146e82a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Unreleased - support for third-party blocks +- biscuit-rust 6.0.0 # 0.4.0-beta.2 diff --git a/Cargo.lock b/Cargo.lock index b557bbc..1160630 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -58,9 +58,9 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "biscuit-auth" -version = "6.0.0-beta.3" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "336ffc076d302968607866acb85378ed77066289ce1868aa7770c0f3f6e83e5c" +checksum = "d5884fc86b3e21f5649ef4326e17ef729b3096e6502deaf13db7b7fb05bb992b" dependencies = [ "base64", "biscuit-parser", @@ -87,9 +87,9 @@ dependencies = [ [[package]] name = "biscuit-parser" -version = "0.2.0-beta.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6f2eb85dcc822200621ce077b9382453d28ddd6a55e7a97bdb592370d2d440" +checksum = "9d7cafdbc8c30e1f0fb87df7161bec77f6f00da652cc33f102b0f95bd1cbc0fa" dependencies = [ "hex", "nom", @@ -112,9 +112,9 @@ dependencies = [ [[package]] name = "biscuit-quote" -version = "0.3.0-beta.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12c624b1cf44110708a62b63341b17c37c33fcdd3cce89b501a115af3454dcf8" +checksum = "49d2332c742a07a846f1fb2760e58a0ee60f2bc30987046fcea816b40630335a" dependencies = [ "biscuit-parser", "proc-macro-error2", diff --git a/Cargo.toml b/Cargo.toml index 1984216..99eafea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ name = "biscuit_auth" crate-type = ["cdylib"] [dependencies] -biscuit-auth = { version = "6.0.0-beta.3", features = ["pem"] } +biscuit-auth = { version = "6.0.0", features = ["pem"] } pyo3 = { version = "0.24.1", features = ["extension-module", "chrono"] } hex = "0.4" base64 = "0.13.0" From 4ae52f968a118fd4564845b7b2a3caa912625204 Mon Sep 17 00:00:00 2001 From: Clement Delafargue Date: Fri, 19 Sep 2025 23:11:39 +0200 Subject: [PATCH 3/3] 0.4.0-beta.3 --- CHANGELOG.md | 2 +- Cargo.lock | 2 +- Cargo.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 146e82a..9a75937 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# Unreleased +# 0.4.0-beta.3 - support for third-party blocks - biscuit-rust 6.0.0 diff --git a/Cargo.lock b/Cargo.lock index 1160630..fa4e6d3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -101,7 +101,7 @@ dependencies = [ [[package]] name = "biscuit-python" -version = "0.4.0-beta.2" +version = "0.4.0-beta.3" dependencies = [ "base64", "biscuit-auth", diff --git a/Cargo.toml b/Cargo.toml index 99eafea..ca6d3c9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "biscuit-python" -version = "0.4.0-beta.2" +version = "0.4.0-beta.3" edition = "2021" [lib]