From 834c5caa9a1fd4c8720b111048fc1e8d5e7740f5 Mon Sep 17 00:00:00 2001 From: kclowes Date: Mon, 27 Nov 2023 16:01:13 -0700 Subject: [PATCH 1/4] Update pyo3 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 52f8a00..7148019 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ repository = "https://github.com/davesque/blake2b-py" description = "Blake2b hashing in Rust with Python bindings." [dependencies] -pyo3 = { version = "~0.15", features = ["extension-module"] } +pyo3 = { version = "~0.20", features = ["extension-module"] } [dev-dependencies] hex = "~0.4" From 3f3fbe2d77b987b9d8b2fb73a7ace2a9875d72ca Mon Sep 17 00:00:00 2001 From: kclowes Date: Mon, 27 Nov 2023 16:03:46 -0700 Subject: [PATCH 2/4] Upgrade pyo3 to 0.16 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 7148019..79bfba9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ repository = "https://github.com/davesque/blake2b-py" description = "Blake2b hashing in Rust with Python bindings." [dependencies] -pyo3 = { version = "~0.20", features = ["extension-module"] } +pyo3 = { version = "~0.16", features = ["extension-module"] } [dev-dependencies] hex = "~0.4" From dad71316783292e790406275fe6db966e4e47b49 Mon Sep 17 00:00:00 2001 From: kclowes Date: Mon, 27 Nov 2023 16:11:36 -0700 Subject: [PATCH 3/4] Upgrade pyo3 to 0.20 again, remove #[pymodule] --- Cargo.toml | 2 +- src/lib.rs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 79bfba9..7148019 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ repository = "https://github.com/davesque/blake2b-py" description = "Blake2b hashing in Rust with Python bindings." [dependencies] -pyo3 = { version = "~0.16", features = ["extension-module"] } +pyo3 = { version = "~0.20", features = ["extension-module"] } [dev-dependencies] hex = "~0.4" diff --git a/src/lib.rs b/src/lib.rs index 115c406..156c92b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -159,7 +159,6 @@ fn decode_and_compress(py: Python, input: Vec) -> PyResult { } /// Functions for calculating blake2b hashes. -#[pymodule] fn blake2b(_py: Python, m: &PyModule) -> PyResult<()> { m.add_wrapped(wrap_pyfunction!(decode_parameters))?; m.add_wrapped(wrap_pyfunction!(compress))?; From 97a1d5394d8e72674f979f75e3ae469f48dedc2a Mon Sep 17 00:00:00 2001 From: kclowes Date: Mon, 27 Nov 2023 16:25:41 -0700 Subject: [PATCH 4/4] pyo3 to 0.17 --- Cargo.toml | 2 +- src/lib.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 7148019..1c2b40c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ repository = "https://github.com/davesque/blake2b-py" description = "Blake2b hashing in Rust with Python bindings." [dependencies] -pyo3 = { version = "~0.20", features = ["extension-module"] } +pyo3 = { version = "~0.17", features = ["extension-module"] } [dev-dependencies] hex = "~0.4" diff --git a/src/lib.rs b/src/lib.rs index 156c92b..115c406 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -159,6 +159,7 @@ fn decode_and_compress(py: Python, input: Vec) -> PyResult { } /// Functions for calculating blake2b hashes. +#[pymodule] fn blake2b(_py: Python, m: &PyModule) -> PyResult<()> { m.add_wrapped(wrap_pyfunction!(decode_parameters))?; m.add_wrapped(wrap_pyfunction!(compress))?;