From 0f35688b9b52efa37d5f10f3506f7f6f75ac9605 Mon Sep 17 00:00:00 2001 From: yihong0618 Date: Fri, 21 Mar 2025 20:51:08 +0800 Subject: [PATCH] fix: chore cargo lock and fix two warning for python bindings Signed-off-by: yihong0618 --- bindings/python/Cargo.lock | 17 +++++++++++++++++ bindings/python/src/transform.rs | 4 ++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/bindings/python/Cargo.lock b/bindings/python/Cargo.lock index 00e02e0fe..160c4d597 100644 --- a/bindings/python/Cargo.lock +++ b/bindings/python/Cargo.lock @@ -540,6 +540,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "bytemuck" +version = "1.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b1fc10dbac614ebc03540c9dbd60e83887fda27794998c6528f1782047d540" + [[package]] name = "byteorder" version = "1.5.0" @@ -1323,6 +1329,7 @@ dependencies = [ "paste", "rand", "reqwest", + "roaring", "rust_decimal", "serde", "serde_bytes", @@ -2560,6 +2567,16 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3582f63211428f83597b51b2ddb88e2a91a9d52d12831f9d08f5e624e8977422" +[[package]] +name = "roaring" +version = "0.10.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a652edd001c53df0b3f96a36a8dc93fce6866988efc16808235653c6bcac8bf2" +dependencies = [ + "bytemuck", + "byteorder", +] + [[package]] name = "rust-ini" version = "0.21.1" diff --git a/bindings/python/src/transform.rs b/bindings/python/src/transform.rs index 5b0d82f22..fa05eb095 100644 --- a/bindings/python/src/transform.rs +++ b/bindings/python/src/transform.rs @@ -75,7 +75,7 @@ fn apply(py: Python, array: PyObject, transform: Transform) -> PyResult, m: &Bound<'_, PyModule>) -> PyResult<()> { - let this = PyModule::new_bound(py, "transform")?; + let this = PyModule::new(py, "transform")?; this.add_function(wrap_pyfunction!(identity, &this)?)?; this.add_function(wrap_pyfunction!(void, &this)?)?; @@ -87,7 +87,7 @@ pub fn register_module(py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> this.add_function(wrap_pyfunction!(truncate, &this)?)?; m.add_submodule(&this)?; - py.import_bound("sys")? + py.import("sys")? .getattr("modules")? .set_item("pyiceberg_core.transform", this) }