Skip to content

Commit

Permalink
pyo3-polars 0.19/Polars 0.45 (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 authored Dec 8, 2024
1 parent 5105044 commit d1b6df0
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion example/derive_expression/expression_lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ crate-type = ["cdylib"]

[dependencies]
polars = { workspace = true, features = ["fmt", "dtype-date", "timezones"], default-features = false }
pyo3 = { version = "0.21", features = ["abi3-py38"] }
pyo3 = { version = "0.22", features = ["abi3-py38"] }
pyo3-polars = { version = "*", path = "../../../pyo3-polars", features = ["derive"] }
rayon = "1.7.0"
serde = { version = "1", features = ["derive"] }
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ crate-type = ["cdylib"]
polars = { workspace = true, features = ["fmt"] }
polars-core = { workspace = true }
polars-lazy = { workspace = true }
pyo3 = { version = "0.21", features = ["extension-module"] }
pyo3 = { version = "0.22", features = ["extension-module"] }
pyo3-polars = { version = "*", path = "../../../pyo3-polars", features = ["lazy"] }
rayon = "1.10"
2 changes: 1 addition & 1 deletion example/io_plugin/io_plugin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ crate-type = ["cdylib"]

[dependencies]
polars = { workspace = true, features = ["fmt", "dtype-date", "timezones", "lazy"], default-features = false }
pyo3 = { version = "0.21", features = ["abi3-py38"] }
pyo3 = { version = "0.22", features = ["abi3-py38"] }
pyo3-polars = { version = "*", path = "../../../pyo3-polars", features = ["derive", "lazy"] }
rand = { version = "0.8.5", features = [] }
2 changes: 1 addition & 1 deletion pyo3-polars-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pyo3-polars-derive"
version = "0.12.0"
version = "0.13.0"
edition = "2021"
license = "MIT"
readme = "README.md"
Expand Down
6 changes: 3 additions & 3 deletions pyo3-polars/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pyo3-polars"
version = "0.18.0"
version = "0.19.0"
edition = "2021"
license = "MIT"
readme = "../README.md"
Expand All @@ -18,8 +18,8 @@ polars-core = { workspace = true, default-features = false }
polars-ffi = { workspace = true, optional = true }
polars-lazy = { workspace = true, optional = true }
polars-plan = { workspace = true, optional = true }
pyo3 = "0.21"
pyo3-polars-derive = { version = "0.12.0", path = "../pyo3-polars-derive", optional = true }
pyo3 = "0.22"
pyo3-polars-derive = { version = "0.13.0", path = "../pyo3-polars-derive", optional = true }
serde = { version = "1", optional = true }
serde-pickle = { version = "1", optional = true }
thiserror = "1"
Expand Down
4 changes: 3 additions & 1 deletion pyo3-polars/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,8 @@ impl ToPyObject for PyDataType {
DataType::BinaryOffset => {
panic!("this type isn't exposed to python")
}
#[allow(unreachable_patterns)]
_ => panic!("activate dtype"),
}
}
}
Expand All @@ -511,7 +513,7 @@ impl IntoPy<PyObject> for PySchema {
impl<'py> FromPyObject<'py> for PyDataType {
fn extract_bound(ob: &Bound<'py, PyAny>) -> PyResult<Self> {
let py = ob.py();
let type_name = ob.get_type().qualname()?;
let type_name = ob.get_type().qualname()?.to_string();

let dtype = match type_name.as_ref() {
"DataTypeClass" => {
Expand Down

0 comments on commit d1b6df0

Please sign in to comment.