From e8d957d99be89cfcd2824f31216d3ad80d803707 Mon Sep 17 00:00:00 2001 From: Misaki Kasumi Date: Mon, 22 Jul 2024 11:15:24 +0800 Subject: [PATCH] feat: use _import_arrow_from_c instead of _import_from_c --- pyo3-polars/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyo3-polars/src/lib.rs b/pyo3-polars/src/lib.rs index e40437e..206fd90 100644 --- a/pyo3-polars/src/lib.rs +++ b/pyo3-polars/src/lib.rs @@ -172,7 +172,10 @@ impl IntoPy for PySeries { fn into_py(self, py: Python<'_>) -> PyObject { let polars = py.import_bound("polars").expect("polars not installed"); let s = polars.getattr("Series").unwrap(); - match s.getattr("_import_arrow_from_c") { + match s + .getattr("_import_arrow_from_c") + .or_else(|_| s.getattr("_import_from_c")) + { // Go via polars Ok(import_arrow_from_c) => { // Get supported compatibility level