From c6a3df09beca709923029635f563a305251f5d06 Mon Sep 17 00:00:00 2001 From: Ritchie Vink Date: Fri, 10 Feb 2023 18:39:40 +0100 Subject: [PATCH] rust polars 0.27.x (#6789) --- Cargo.toml | 2 +- polars/Cargo.toml | 15 ++++++++------- polars/polars-algo/Cargo.toml | 6 +++--- polars/polars-core/Cargo.toml | 4 ++-- polars/polars-core/src/fmt.rs | 4 ++++ polars/polars-io/Cargo.toml | 8 ++++---- polars/polars-lazy/Cargo.toml | 16 ++++++++-------- polars/polars-lazy/polars-pipe/Cargo.toml | 12 ++++++------ polars/polars-lazy/polars-plan/Cargo.toml | 12 ++++++------ polars/polars-ops/Cargo.toml | 6 +++--- polars/polars-sql/Cargo.toml | 10 +++++----- polars/polars-time/Cargo.toml | 8 ++++---- 12 files changed, 54 insertions(+), 49 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1f49650b6cde..aab3b037cb8f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ members = [ ] [workspace.package] -version = "0.26.1" +version = "0.27.1" [workspace.dependencies] rayon = "1.5" diff --git a/polars/Cargo.toml b/polars/Cargo.toml index 02073be99df8..c4fac20e125b 100644 --- a/polars/Cargo.toml +++ b/polars/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polars" -version = "0.26.1" +version.workspace = true authors = ["ritchie46 "] edition = "2021" keywords = ["dataframe", "query-engine", "arrow"] @@ -297,16 +297,17 @@ bench = [ ] [dependencies] -polars-algo = { version = "0.26.1", path = "./polars-algo", optional = true } -polars-core = { version = "0.26.1", path = "./polars-core", features = ["docs", "private"], default-features = false } -polars-io = { version = "0.26.1", path = "./polars-io", features = ["private"], default-features = false, optional = true } -polars-lazy = { version = "0.26.1", path = "./polars-lazy", features = ["private"], default-features = false, optional = true } -polars-ops = { version = "0.26.1", path = "./polars-ops" } +polars-algo = { version = "0.27.1", path = "./polars-algo", optional = true } +polars-core = { version = "0.27.1", path = "./polars-core", features = ["docs", "private"], default-features = false } +polars-io = { version = "0.27.1", path = "./polars-io", features = ["private"], default-features = false, optional = true } +polars-lazy = { version = "0.27.1", path = "./polars-lazy", features = ["private"], default-features = false, optional = true } +polars-ops = { version = "0.27.1", path = "./polars-ops" } polars-sql = { version = "0.2", path = "./polars-sql", default-features = false, optional = true } -polars-time = { version = "0.26.1", path = "./polars-time", default-features = false, optional = true } +polars-time = { version = "0.27.1", path = "./polars-time", default-features = false, optional = true } # enable js feature for getrandom to work in wasm [target.'cfg(target_family = "wasm")'.dependencies.getrandom] +version = "0.2" features = ["js"] [dev-dependencies] diff --git a/polars/polars-algo/Cargo.toml b/polars/polars-algo/Cargo.toml index 7e0ce5c407ba..ce97058d0e26 100644 --- a/polars/polars-algo/Cargo.toml +++ b/polars/polars-algo/Cargo.toml @@ -10,9 +10,9 @@ description = "Algorithms built upon Polars primitives" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -polars-core = { version = "0.26.1", path = "../polars-core", features = ["private", "dtype-categorical", "asof_join"], default-features = false } -polars-lazy = { version = "0.26.1", path = "../polars-lazy", features = ["asof_join", "concat_str", "strings"] } -polars-ops = { version = "0.26.1", path = "../polars-ops", features = ["dtype-categorical", "asof_join"], default-features = false } +polars-core = { version = "0.27.1", path = "../polars-core", features = ["private", "dtype-categorical", "asof_join"], default-features = false } +polars-lazy = { version = "0.27.1", path = "../polars-lazy", features = ["asof_join", "concat_str", "strings"] } +polars-ops = { version = "0.27.1", path = "../polars-ops", features = ["dtype-categorical", "asof_join"], default-features = false } [package.metadata.docs.rs] all-features = true diff --git a/polars/polars-core/Cargo.toml b/polars/polars-core/Cargo.toml index 07dad74bd218..58dc6c682863 100644 --- a/polars/polars-core/Cargo.toml +++ b/polars/polars-core/Cargo.toml @@ -164,8 +164,8 @@ ndarray = { version = "0.15", optional = true, default_features = false } num.workspace = true object_store = { version = "0.5.3", default-features = false, optional = true } once_cell.workspace = true -polars-arrow = { version = "0.26.1", path = "../polars-arrow", features = ["compute"] } -polars-utils = { version = "0.26.1", path = "../polars-utils" } +polars-arrow = { version = "0.27.1", path = "../polars-arrow", features = ["compute"] } +polars-utils = { version = "0.27.1", path = "../polars-utils" } rand = { version = "0.8", optional = true, features = ["small_rng", "std"] } rand_distr = { version = "0.4", optional = true } rayon.workspace = true diff --git a/polars/polars-core/src/fmt.rs b/polars/polars-core/src/fmt.rs index d5be9c83a0ae..872960a835fa 100644 --- a/polars/polars-core/src/fmt.rs +++ b/polars/polars-core/src/fmt.rs @@ -10,6 +10,7 @@ use std::sync::atomic::{AtomicU8, Ordering}; feature = "dtype-time" ))] use arrow::temporal_conversions::*; +#[cfg(feature = "dtype-datetime")] use chrono::NaiveDateTime; #[cfg(feature = "timezones")] use chrono::TimeZone; @@ -781,16 +782,19 @@ impl Display for AnyValue<'_> { /// Utility struct to format a timezone aware datetime. #[allow(dead_code)] +#[cfg(feature = "dtype-datetime")] pub struct PlTzAware<'a> { ndt: NaiveDateTime, tz: &'a str, } +#[cfg(feature = "dtype-datetime")] impl<'a> PlTzAware<'a> { pub fn new(ndt: NaiveDateTime, tz: &'a str) -> Self { Self { ndt, tz } } } +#[cfg(feature = "dtype-datetime")] impl Display for PlTzAware<'_> { #[allow(unused_variables)] fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { diff --git a/polars/polars-io/Cargo.toml b/polars/polars-io/Cargo.toml index 67aab8f72ab6..a918d7ca212d 100644 --- a/polars/polars-io/Cargo.toml +++ b/polars/polars-io/Cargo.toml @@ -67,10 +67,10 @@ memmap = { package = "memmap2", version = "0.5.2", optional = true } num.workspace = true object_store = { version = "0.5.3", default-features = false, optional = true } once_cell = "1" -polars-arrow = { version = "0.26.1", path = "../polars-arrow" } -polars-core = { version = "0.26.1", path = "../polars-core", features = ["private"], default-features = false } -polars-time = { version = "0.26.1", path = "../polars-time", features = ["private"], default-features = false, optional = true } -polars-utils = { version = "0.26.1", path = "../polars-utils" } +polars-arrow = { version = "0.27.1", path = "../polars-arrow" } +polars-core = { version = "0.27.1", path = "../polars-core", features = ["private"], default-features = false } +polars-time = { version = "0.27.1", path = "../polars-time", features = ["private"], default-features = false, optional = true } +polars-utils = { version = "0.27.1", path = "../polars-utils" } rayon.workspace = true regex = "1.6" serde = { version = "1", features = ["derive"], optional = true } diff --git a/polars/polars-lazy/Cargo.toml b/polars/polars-lazy/Cargo.toml index 96213a16a45a..c6d4081e0542 100644 --- a/polars/polars-lazy/Cargo.toml +++ b/polars/polars-lazy/Cargo.toml @@ -16,14 +16,14 @@ serde_json = "1" ahash.workspace = true bitflags.workspace = true glob = "0.3" -polars-arrow = { version = "0.26.1", path = "../polars-arrow" } -polars-core = { version = "0.26.1", path = "../polars-core", features = ["lazy", "private", "zip_with", "random"], default-features = false } -polars-io = { version = "0.26.1", path = "../polars-io", features = ["lazy", "csv-file", "private"], default-features = false } -polars-ops = { version = "0.26.1", path = "../polars-ops", default-features = false } -polars-pipe = { version = "0.26.1", path = "./polars-pipe", optional = true } -polars-plan = { version = "0.26.1", path = "./polars-plan" } -polars-time = { version = "0.26.1", path = "../polars-time", optional = true } -polars-utils = { version = "0.26.1", path = "../polars-utils" } +polars-arrow = { version = "0.27.1", path = "../polars-arrow" } +polars-core = { version = "0.27.1", path = "../polars-core", features = ["lazy", "private", "zip_with", "random"], default-features = false } +polars-io = { version = "0.27.1", path = "../polars-io", features = ["lazy", "csv-file", "private"], default-features = false } +polars-ops = { version = "0.27.1", path = "../polars-ops", default-features = false } +polars-pipe = { version = "0.27.1", path = "./polars-pipe", optional = true } +polars-plan = { version = "0.27.1", path = "./polars-plan" } +polars-time = { version = "0.27.1", path = "../polars-time", optional = true } +polars-utils = { version = "0.27.1", path = "../polars-utils" } pyo3 = { version = "0.18", optional = true } rayon.workspace = true diff --git a/polars/polars-lazy/polars-pipe/Cargo.toml b/polars/polars-lazy/polars-pipe/Cargo.toml index 5dd262649514..92e0f8b7c7ee 100644 --- a/polars/polars-lazy/polars-pipe/Cargo.toml +++ b/polars/polars-lazy/polars-pipe/Cargo.toml @@ -13,12 +13,12 @@ crossbeam-channel = "0.5" enum_dispatch = "0.3" hashbrown.workspace = true num.workspace = true -polars-arrow = { version = "0.26.1", path = "../../polars-arrow", default-features = false } -polars-core = { version = "0.26.1", path = "../../polars-core", features = ["lazy", "private", "zip_with", "random"], default-features = false } -polars-io = { version = "0.26.1", path = "../../polars-io", default-features = false, features = ["ipc"] } -polars-ops = { version = "0.26.1", path = "../../polars-ops", features = ["search_sorted"] } -polars-plan = { version = "0.26.1", path = "../polars-plan", default-features = false, features = ["compile"] } -polars-utils = { version = "0.26.1", path = "../../polars-utils", features = ["sysinfo"] } +polars-arrow = { version = "0.27.1", path = "../../polars-arrow", default-features = false } +polars-core = { version = "0.27.1", path = "../../polars-core", features = ["lazy", "private", "zip_with", "random"], default-features = false } +polars-io = { version = "0.27.1", path = "../../polars-io", default-features = false, features = ["ipc"] } +polars-ops = { version = "0.27.1", path = "../../polars-ops", features = ["search_sorted"] } +polars-plan = { version = "0.27.1", path = "../polars-plan", default-features = false, features = ["compile"] } +polars-utils = { version = "0.27.1", path = "../../polars-utils", features = ["sysinfo"] } rayon.workspace = true smartstring = { version = "1" } diff --git a/polars/polars-lazy/polars-plan/Cargo.toml b/polars/polars-lazy/polars-plan/Cargo.toml index 7fce47528ebf..d471a5eed390 100644 --- a/polars/polars-lazy/polars-plan/Cargo.toml +++ b/polars/polars-lazy/polars-plan/Cargo.toml @@ -12,12 +12,12 @@ description = "Lazy query engine for the Polars DataFrame library" ahash.workspace = true futures = { version = "0.3.25", optional = true } once_cell.workspace = true -polars-arrow = { version = "0.26.1", path = "../../polars-arrow" } -polars-core = { version = "0.26.1", path = "../../polars-core", features = ["lazy", "private", "zip_with", "random"], default-features = false } -polars-io = { version = "0.26.1", path = "../../polars-io", features = ["lazy", "csv-file", "private"], default-features = false } -polars-ops = { version = "0.26.1", path = "../../polars-ops", default-features = false } -polars-time = { version = "0.26.1", path = "../../polars-time", optional = true } -polars-utils = { version = "0.26.1", path = "../../polars-utils" } +polars-arrow = { version = "0.27.1", path = "../../polars-arrow" } +polars-core = { version = "0.27.1", path = "../../polars-core", features = ["lazy", "private", "zip_with", "random"], default-features = false } +polars-io = { version = "0.27.1", path = "../../polars-io", features = ["lazy", "csv-file", "private"], default-features = false } +polars-ops = { version = "0.27.1", path = "../../polars-ops", default-features = false } +polars-time = { version = "0.27.1", path = "../../polars-time", optional = true } +polars-utils = { version = "0.27.1", path = "../../polars-utils" } pyo3 = { version = "0.18", optional = true } rayon.workspace = true regex = { version = "1.6", optional = true } diff --git a/polars/polars-ops/Cargo.toml b/polars/polars-ops/Cargo.toml index b20c8cf9faed..3e0c91dde599 100644 --- a/polars/polars-ops/Cargo.toml +++ b/polars/polars-ops/Cargo.toml @@ -15,9 +15,9 @@ base64 = { version = "0.21", optional = true } hex = { version = "0.4", optional = true } jsonpath_lib = { version = "0.3.0", optional = true, git = "https://github.com/ritchie46/jsonpath", branch = "improve_compiled" } memchr = { version = "2", optional = true } -polars-arrow = { version = "0.26.1", path = "../polars-arrow", default-features = false } -polars-core = { version = "0.26.1", path = "../polars-core", features = ["private"], default-features = false } -polars-utils = { version = "0.26.1", path = "../polars-utils", default-features = false } +polars-arrow = { version = "0.27.1", path = "../polars-arrow", default-features = false } +polars-core = { version = "0.27.1", path = "../polars-core", features = ["private"], default-features = false } +polars-utils = { version = "0.27.1", path = "../polars-utils", default-features = false } serde = { version = "1", features = ["derive"], optional = true } serde_json = { version = "1", optional = true } diff --git a/polars/polars-sql/Cargo.toml b/polars/polars-sql/Cargo.toml index 19dcfb6f0984..727d0ca4d7da 100644 --- a/polars/polars-sql/Cargo.toml +++ b/polars/polars-sql/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polars-sql" -version = "0.2.2" +version = "0.2.3" edition = "2021" license = "MIT" repository = "https://github.com/pola-rs/polars" @@ -16,10 +16,10 @@ ipc = ["polars-lazy/ipc"] [dependencies] atty = { version = "0.2", optional = true } -polars-arrow = { version = "0.26.1", path = "../polars-arrow", features = ["like"] } -polars-core = { version = "0.26.1", path = "../polars-core", features = [] } -polars-lazy = { version = "0.26.1", path = "../polars-lazy", features = ["compile", "strings", "cross_join"] } -polars-plan = { version = "0.26.1", path = "../polars-lazy/polars-plan", features = ["compile"] } +polars-arrow = { version = "0.27.1", path = "../polars-arrow", features = ["like"] } +polars-core = { version = "0.27.1", path = "../polars-core", features = [] } +polars-lazy = { version = "0.27.1", path = "../polars-lazy", features = ["compile", "strings", "cross_join"] } +polars-plan = { version = "0.27.1", path = "../polars-lazy/polars-plan", features = ["compile"] } rustyline = { version = "10.0.0", optional = true } serde = "1" serde_json = { version = "1" } diff --git a/polars/polars-time/Cargo.toml b/polars/polars-time/Cargo.toml index d7f226dfd6ff..0004d9dd1c62 100644 --- a/polars/polars-time/Cargo.toml +++ b/polars/polars-time/Cargo.toml @@ -14,10 +14,10 @@ chrono-tz = { version = "0.8", optional = true } lexical = { version = "6", default-features = false, features = ["std", "parse-floats", "parse-integers"] } now = "0.1" once_cell.workspace = true -polars-arrow = { version = "0.26.1", path = "../polars-arrow", features = ["compute", "temporal"] } -polars-core = { version = "0.26.1", path = "../polars-core", default-features = false, features = ["private", "dtype-datetime", "dtype-duration", "dtype-time", "dtype-date"] } -polars-ops = { version = "0.26.1", path = "../polars-ops" } -polars-utils = { version = "0.26.1", path = "../polars-utils" } +polars-arrow = { version = "0.27.1", path = "../polars-arrow", features = ["compute", "temporal"] } +polars-core = { version = "0.27.1", path = "../polars-core", default-features = false, features = ["private", "dtype-datetime", "dtype-duration", "dtype-time", "dtype-date"] } +polars-ops = { version = "0.27.1", path = "../polars-ops" } +polars-utils = { version = "0.27.1", path = "../polars-utils" } regex = "1.7.1" serde = { version = "1", features = ["derive"], optional = true }