Skip to content

Commit 5015e8f

Browse files
build(python): Update pyo3 and numpy crates to version 0.24
1 parent 3cfa7cd commit 5015e8f

File tree

3 files changed

+21
-20
lines changed

3 files changed

+21
-20
lines changed

Cargo.lock

+15-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ memchr = "2.6"
5656
memmap = { package = "memmap2", version = "0.9" }
5757
ndarray = { version = "0.16", default-features = false }
5858
num-traits = "0.2"
59-
numpy = "0.23"
59+
numpy = "0.24"
6060
object_store = { version = "0.11", default-features = false }
6161
parking_lot = "0.12"
6262
percent-encoding = "2.3"
6363
pin-project-lite = "0.2"
64-
pyo3 = "0.23.4"
64+
pyo3 = "0.24.2"
6565
rand = "0.8"
6666
rand_distr = "0.4"
6767
raw-cpuid = "11"

crates/polars-python/src/conversion/datetime.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use chrono_tz::Tz;
77
use polars::datatypes::TimeUnit;
88
use polars_core::datatypes::TimeZone;
99
use pyo3::types::PyAnyMethods;
10-
use pyo3::{Bound, IntoPyObject, PyAny, PyResult, Python, intern};
10+
use pyo3::{Bound, PyAny, PyResult, Python, intern, IntoPyObjectExt};
1111

1212
use crate::error::PyPolarsErr;
1313
use crate::py_modules::pl_utils;
@@ -57,16 +57,16 @@ pub fn datetime_to_py_object<'py>(
5757
.call1((v, tu.to_ascii(), time_zone.as_str()))
5858
} else {
5959
let datetime = utc_datetime.with_timezone(&tz);
60-
datetime.into_pyobject(py)
60+
datetime.into_bound_py_any(py)
6161
}
6262
} else if let Ok(tz) = FixedOffset::from_str(time_zone) {
6363
let naive_datetime = timestamp_to_naive_datetime(v, tu);
6464
let datetime = tz.from_utc_datetime(&naive_datetime);
65-
datetime.into_pyobject(py)
65+
datetime.into_bound_py_any(py)
6666
} else {
6767
Err(PyPolarsErr::Other(format!("Could not parse timezone: {time_zone}")).into())
6868
}
6969
} else {
70-
timestamp_to_naive_datetime(v, tu).into_pyobject(py)
70+
timestamp_to_naive_datetime(v, tu).into_bound_py_any(py)
7171
}
7272
}

0 commit comments

Comments
 (0)