@@ -85,7 +85,7 @@ impl ArtifactSource for BytesArtifact {
8585 }
8686}
8787
88- #[ pyclass]
88+ #[ pyclass( frozen , skip_from_py_object ) ]
8989#[ derive( Clone ) ]
9090pub struct PyArtifactResult {
9191 #[ pyo3( get) ]
@@ -210,7 +210,7 @@ fn build_context_and_sign(
210210#[ pyfunction]
211211#[ pyo3( signature = ( file_path, identity_key_alias, repo_path, passphrase=None , expires_in=None , note=None ) ) ]
212212pub fn sign_artifact (
213- py : Python < ' _ > ,
213+ _py : Python < ' _ > ,
214214 file_path : & str ,
215215 identity_key_alias : & str ,
216216 repo_path : & str ,
@@ -229,9 +229,9 @@ pub fn sign_artifact(
229229 let alias = identity_key_alias. to_string ( ) ;
230230 let rp = repo_path. to_string ( ) ;
231231
232- py . allow_threads ( move || {
232+ {
233233 build_context_and_sign ( artifact, & alias, & rp, passphrase, expires_in, note)
234- } )
234+ }
235235}
236236
237237/// Sign raw bytes, producing a dual-signed attestation.
@@ -251,7 +251,7 @@ pub fn sign_artifact(
251251#[ pyfunction]
252252#[ pyo3( signature = ( data, identity_key_alias, repo_path, passphrase=None , expires_in=None , note=None ) ) ]
253253pub fn sign_artifact_bytes (
254- py : Python < ' _ > ,
254+ _py : Python < ' _ > ,
255255 data : & [ u8 ] ,
256256 identity_key_alias : & str ,
257257 repo_path : & str ,
@@ -265,7 +265,7 @@ pub fn sign_artifact_bytes(
265265 let alias = identity_key_alias. to_string ( ) ;
266266 let rp = repo_path. to_string ( ) ;
267267
268- py . allow_threads ( move || {
268+ {
269269 build_context_and_sign ( artifact, & alias, & rp, passphrase, expires_in, note)
270- } )
270+ }
271271}
0 commit comments