Skip to content

Commit

Permalink
feat: use _import_arrow_from_c instead of _import_from_c
Browse files Browse the repository at this point in the history
  • Loading branch information
ruihe774 authored and ritchie46 committed Jul 25, 2024
1 parent 061320e commit e8d957d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pyo3-polars/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,10 @@ impl IntoPy<PyObject> 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
Expand Down

0 comments on commit e8d957d

Please sign in to comment.