From 9ddd132c46278ac8aeb70474e688acec3465ce30 Mon Sep 17 00:00:00 2001 From: Amin Alaee Date: Thu, 21 Nov 2024 13:24:25 +0000 Subject: [PATCH] Version 0.10.0 (#72) --- Cargo.lock | 20 ++++++++++---------- Cargo.toml | 2 +- src/lib.rs | 6 +++--- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 603c7e5..9e1ddc6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -189,9 +189,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.22.5" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d922163ba1f79c04bc49073ba7b32fd5a8d3b76a87c955921234b8e77333c51" +checksum = "7ebb0c0cc0de9678e53be9ccf8a2ab53045e6e3a8be03393ceccc5e7396ccb40" dependencies = [ "cfg-if", "indoc", @@ -207,9 +207,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.22.5" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc38c5feeb496c8321091edf3d63e9a6829eab4b863b4a6a65f26f3e9cc6b179" +checksum = "80e3ce69c4ec34476534b490e412b871ba03a82e35604c3dfb95fcb6bfb60c09" dependencies = [ "once_cell", "python3-dll-a", @@ -218,9 +218,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.22.5" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94845622d88ae274d2729fcefc850e63d7a3ddff5e3ce11bd88486db9f1d357d" +checksum = "3b09f311c76b36dfd6dd6f7fa6f9f18e7e46a1c937110d283e80b12ba2468a75" dependencies = [ "libc", "pyo3-build-config", @@ -228,9 +228,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.22.5" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e655aad15e09b94ffdb3ce3d217acf652e26bbc37697ef012f5e5e348c716e5e" +checksum = "fd4f74086536d1e1deaff99ec0387481fb3325c82e4e48be0e75ab3d3fcb487a" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -240,9 +240,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.22.5" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1e3f09eecd94618f60a455a23def79f79eba4dc561a97324bf9ac8c6df30ce" +checksum = "9e77dfeb76b32bbf069144a5ea0a36176ab59c8db9ce28732d0f06f096bbfbc8" dependencies = [ "heck", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index b56e4dc..a53657b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,6 @@ crate-type = ["cdylib"] [dependencies] mac_address = "1.1.7" -pyo3 = { version = "0.22.5", features = ["extension-module", "generate-import-lib", 'abi3-py39'] } +pyo3 = { version = "0.23.1", features = ["extension-module", "generate-import-lib", 'abi3-py39'] } rand = "0.8.5" uuid = { version = "1.11.0", features = ["v1", "v3", "v4", "v5", "v6", "v7", "v8", "fast-rng"]} diff --git a/src/lib.rs b/src/lib.rs index 052e53e..bd6538f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -138,7 +138,7 @@ impl UUID { } pub fn __deepcopy__(&self, py: Python, _memo: &Bound<'_, PyDict>) -> Py { - self.clone().into_py(py) + self.clone().into_pyobject(py).unwrap().into_any().unbind() } #[getter] @@ -158,7 +158,7 @@ impl UUID { bytes[3], bytes[2], bytes[1], bytes[0], bytes[5], bytes[4], bytes[7], bytes[6], bytes[8], bytes[9], bytes[10], bytes[11], bytes[12], bytes[13], bytes[14], bytes[15], ]; - PyBytes::new_bound(py, &bytes) + PyBytes::new(py, &bytes) } #[getter] @@ -449,7 +449,7 @@ fn getnode() -> PyResult { #[pymodule] fn _uuid_utils(m: &Bound<'_, PyModule>) -> PyResult<()> { let safe_uuid_unknown = Python::with_gil(|py| { - return PyModule::import_bound(py, "uuid") + return PyModule::import(py, "uuid") .unwrap() .getattr("SafeUUID") .unwrap()