Skip to content

Commit 34c4396

Browse files
authored
mark gil_used = false in all pymodules (#13230)
1 parent e66dbe7 commit 34c4396

22 files changed

+25
-25
lines changed

src/rust/src/asn1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ fn encode_dss_signature<'p>(
130130
Ok(pyo3::types::PyBytes::new(py, &result))
131131
}
132132

133-
#[pyo3::pymodule]
133+
#[pyo3::pymodule(gil_used = false)]
134134
#[pyo3(name = "asn1")]
135135
pub(crate) mod asn1_mod {
136136
#[pymodule_export]

src/rust/src/backend/aead.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1174,7 +1174,7 @@ impl AesGcmSiv {
11741174
}
11751175
}
11761176

1177-
#[pyo3::pymodule]
1177+
#[pyo3::pymodule(gil_used = false)]
11781178
pub(crate) mod aead {
11791179
#[pymodule_export]
11801180
use super::{AesCcm, AesGcm, AesGcmSiv, AesOcb3, AesSiv, ChaCha20Poly1305};

src/rust/src/backend/ciphers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ fn _advance_aad(ctx: pyo3::Bound<'_, pyo3::PyAny>, n: u64) {
608608
}
609609
}
610610

611-
#[pyo3::pymodule]
611+
#[pyo3::pymodule(gil_used = false)]
612612
pub(crate) mod ciphers {
613613
#[pymodule_export]
614614
use super::{

src/rust/src/backend/cmac.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl Cmac {
101101
}
102102
}
103103

104-
#[pyo3::pymodule]
104+
#[pyo3::pymodule(gil_used = false)]
105105
pub(crate) mod cmac {
106106
#[pymodule_export]
107107
use super::Cmac;

src/rust/src/backend/dh.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ impl DHParameterNumbers {
541541
}
542542
}
543543

544-
#[pyo3::pymodule]
544+
#[pyo3::pymodule(gil_used = false)]
545545
pub(crate) mod dh {
546546
#[pymodule_export]
547547
use super::{

src/rust/src/backend/dsa.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ impl DsaParameterNumbers {
508508
}
509509
}
510510

511-
#[pyo3::pymodule]
511+
#[pyo3::pymodule(gil_used = false)]
512512
pub(crate) mod dsa {
513513
#[pymodule_export]
514514
use super::{

src/rust/src/backend/ec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ impl EllipticCurvePublicNumbers {
661661
}
662662
}
663663

664-
#[pyo3::pymodule]
664+
#[pyo3::pymodule(gil_used = false)]
665665
pub(crate) mod ec {
666666
#[pymodule_export]
667667
use super::{

src/rust/src/backend/ed25519.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ impl Ed25519PublicKey {
163163
}
164164
}
165165

166-
#[pyo3::pymodule]
166+
#[pyo3::pymodule(gil_used = false)]
167167
pub(crate) mod ed25519 {
168168
#[pymodule_export]
169169
use super::{

src/rust/src/backend/ed448.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ impl Ed448PublicKey {
160160
}
161161
}
162162

163-
#[pyo3::pymodule]
163+
#[pyo3::pymodule(gil_used = false)]
164164
pub(crate) mod ed448 {
165165
#[pymodule_export]
166166
use super::{

src/rust/src/backend/hashes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ impl XOFHash {
244244
}
245245
}
246246

247-
#[pyo3::pymodule]
247+
#[pyo3::pymodule(gil_used = false)]
248248
pub(crate) mod hashes {
249249
#[pymodule_export]
250250
use super::{hash_supported, Hash, XOFHash};

0 commit comments

Comments
 (0)