Skip to content

Commit

Permalink
build: Update Rust nightly toolchain version (#16222)
Browse files Browse the repository at this point in the history
  • Loading branch information
stinodego authored May 15, 2024
1 parent 79a2cf1 commit 15f6b36
Show file tree
Hide file tree
Showing 54 changed files with 195 additions and 460 deletions.
21 changes: 21 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ crossbeam-queue = "0.3"
either = "1.11"
ethnum = "1.3.2"
fallible-streaming-iterator = "0.1.9"
flate2 = { version = "1", default-features = false }
futures = "0.3.25"
hashbrown = { version = "0.14", features = ["rayon", "ahash", "serde"] }
hex = "0.4.3"
Expand All @@ -55,7 +56,6 @@ ndarray = { version = "0.15", default-features = false }
num-traits = "0.2"
object_store = { version = "0.9", default-features = false }
once_cell = "1"
parquet2 = { version = "0.17.2", features = ["async"], default-features = false }
percent-encoding = "2.3"
pyo3 = "0.21"
rand = "0.8"
Expand All @@ -66,7 +66,7 @@ regex = "1.9"
reqwest = { version = "0.11", default-features = false }
ryu = "1.0.13"
recursive = "0.1"
serde = "1.0.188"
serde = { version = "1.0.188", features = ["derive"] }
serde_json = "1"
simd-json = { version = "0.13", features = ["known-key"] }
simdutf8 = "0.1.4"
Expand Down
8 changes: 5 additions & 3 deletions crates/polars-arrow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ hashbrown = { workspace = true }
num-traits = { workspace = true }
polars-error = { workspace = true }
polars-utils = { workspace = true }
serde = { workspace = true, features = ["derive"], optional = true }
serde = { workspace = true, optional = true }
simdutf8 = { workspace = true }

ethnum = { workspace = true }
Expand Down Expand Up @@ -79,9 +79,9 @@ arrow-schema = { workspace = true, optional = true }
criterion = "0.5"
crossbeam-channel = { workspace = true }
doc-comment = "0.3"
flate2 = "1"
flate2 = { workspace = true, default-features = true }
# used to run formal property testing
proptest = { version = "1", default_features = false, features = ["std"] }
proptest = { version = "1", default-features = false, features = ["std"] }
# use for flaky testing
rand = { workspace = true }
# use for generating and testing random data samples
Expand Down Expand Up @@ -112,6 +112,7 @@ full = [
"io_avro_async",
"regex-syntax",
"compute",
"serde",
# parses timezones used in timestamp conversions
"chrono-tz",
]
Expand Down Expand Up @@ -152,6 +153,7 @@ compute = [
"compute_take",
"compute_temporal",
]
serde = ["dep:serde"]
simd = []

# polars-arrow
Expand Down
2 changes: 1 addition & 1 deletion crates/polars-arrow/src/compute/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//! Some dynamically-typed operators have an auxiliary function, `can_*`, that returns
//! true if the operator can be applied to the particular `DataType`.

#[cfg(any(feature = "compute_aggregate", feature = "io_parquet"))]
#[cfg(feature = "compute_aggregate")]
#[cfg_attr(docsrs, doc(cfg(feature = "compute_aggregate")))]
pub mod aggregate;
pub mod arity;
Expand Down
2 changes: 1 addition & 1 deletion crates/polars-arrow/src/datatypes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ impl From<arrow_schema::DataType> for ArrowDataType {

/// Mode of [`ArrowDataType::Union`]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "serde_types", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub enum UnionMode {
/// Dense union
Dense,
Expand Down
2 changes: 1 addition & 1 deletion crates/polars-arrow/src/datatypes/physical_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub use crate::types::PrimitiveType;
/// A physical type has a one-to-many relationship with a [`crate::datatypes::ArrowDataType`] and
/// a one-to-one mapping to each struct in this crate that implements [`crate::array::Array`].
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "serde_types", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub enum PhysicalType {
/// A Null with no allocation.
Null,
Expand Down
5 changes: 0 additions & 5 deletions crates/polars-arrow/src/doc/lib.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,7 @@ functionality, such as:

- `io_ipc`: to interact with the Arrow IPC format
- `io_ipc_compression`: to read and write compressed Arrow IPC (v2)
- `io_csv` to read and write CSV
- `io_json` to read and write JSON
- `io_flight` to read and write to Arrow's Flight protocol
- `io_parquet` to read and write parquet
- `io_parquet_compression` to read and write compressed parquet
- `io_print` to write batches to formatted ASCII tables
- `compute` to operate on arrays (addition, sum, sort, etc.)

The feature `simd` (not part of `full`) produces more explicit SIMD instructions
Expand Down
2 changes: 1 addition & 1 deletion crates/polars-arrow/src/temporal_conversions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ fn utf8view_to_timestamp_impl<T: chrono::TimeZone>(
/// Parses `value` to a [`chrono_tz::Tz`] with the Arrow's definition of timestamp with a timezone.
#[cfg(feature = "chrono-tz")]
#[cfg_attr(docsrs, doc(cfg(feature = "chrono-tz")))]
pub(crate) fn parse_offset_tz(timezone: &str) -> PolarsResult<chrono_tz::Tz> {
pub fn parse_offset_tz(timezone: &str) -> PolarsResult<chrono_tz::Tz> {
timezone
.parse::<chrono_tz::Tz>()
.map_err(|_| polars_err!(InvalidOperation: "timezone \"{timezone}\" cannot be parsed"))
Expand Down
6 changes: 3 additions & 3 deletions crates/polars-arrow/src/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ mod native;
pub use native::*;
mod offset;
pub use offset::*;
#[cfg(feature = "serde_types")]
use serde_derive::{Deserialize, Serialize};
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};

/// The set of all implementations of the sealed trait [`NativeType`].
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "serde_types", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub enum PrimitiveType {
/// A signed 8-bit integer.
Int8,
Expand Down
99 changes: 0 additions & 99 deletions crates/polars-arrow/src/util/bench_util.rs

This file was deleted.

5 changes: 0 additions & 5 deletions crates/polars-arrow/src/util/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
//! Misc utilities used in different places in the crate.

#[cfg(feature = "benchmarks")]
#[cfg_attr(docsrs, doc(cfg(feature = "benchmarks")))]
pub mod bench_util;

pub mod macros;
4 changes: 2 additions & 2 deletions crates/polars-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ bitflags = { workspace = true }
bytemuck = { workspace = true }
chrono = { workspace = true, optional = true }
chrono-tz = { workspace = true, optional = true }
comfy-table = { version = "7.0.1", default_features = false, optional = true }
comfy-table = { version = "7.0.1", default-features = false, optional = true }
either = { workspace = true }
hashbrown = { workspace = true }
indexmap = { workspace = true }
Expand All @@ -33,7 +33,7 @@ rand_distr = { workspace = true, optional = true }
rayon = { workspace = true }
regex = { workspace = true, optional = true }
# activate if you want serde support for Series and DataFrames
serde = { workspace = true, features = ["derive"], optional = true }
serde = { workspace = true, optional = true }
serde_json = { workspace = true, optional = true }
smartstring = { workspace = true }
thiserror = { workspace = true }
Expand Down
1 change: 0 additions & 1 deletion crates/polars-core/src/chunked_array/ops/interpolate.rs

This file was deleted.

10 changes: 0 additions & 10 deletions crates/polars-core/src/chunked_array/ops/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ pub mod float_sorted_arg_max;
mod for_each;
pub mod full;
pub mod gather;
#[cfg(feature = "interpolate")]
mod interpolate;
#[cfg(feature = "zip_with")]
pub(crate) mod min_max_binary;
pub(crate) mod nulls;
Expand All @@ -45,14 +43,6 @@ use serde::{Deserialize, Serialize};
pub use sort::options::*;

use crate::series::IsSorted;

#[cfg(feature = "to_list")]
pub trait ToList<T: PolarsDataType> {
fn to_list(&self) -> PolarsResult<ListChunked> {
polars_bail!(opq = to_list, T::get_dtype());
}
}

#[cfg(feature = "reinterpret")]
pub trait Reinterpret {
fn reinterpret_signed(&self) -> Series {
Expand Down
2 changes: 0 additions & 2 deletions crates/polars-core/src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ pub use std::sync::Arc;
pub use arrow::array::ArrayRef;
pub(crate) use arrow::array::*;
pub use arrow::datatypes::{ArrowSchema, Field as ArrowField};
#[cfg(feature = "ewma")]
pub use arrow::legacy::kernels::ewm::EWMOptions;
pub use arrow::legacy::prelude::*;
pub(crate) use arrow::trusted_len::TrustedLen;
pub use polars_utils::index::{ChunkId, IdxSize, NullableChunkId, NullableIdxSize};
Expand Down
2 changes: 0 additions & 2 deletions crates/polars-core/src/series/implementations/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ use crate::chunked_array::{AsSinglePtr, Settings};
use crate::frame::group_by::*;
use crate::prelude::*;
use crate::series::implementations::SeriesWrap;
#[cfg(feature = "chunked_ids")]
use crate::series::IsSorted;

impl private::PrivateSeries for SeriesWrap<ArrayChunked> {
fn compute_len(&mut self) {
Expand Down
2 changes: 0 additions & 2 deletions crates/polars-core/src/series/implementations/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ use crate::chunked_array::Settings;
use crate::prelude::*;
use crate::series::implementations::SeriesWrap;
use crate::series::private::{PrivateSeries, PrivateSeriesNumeric};
#[cfg(feature = "chunked_ids")]
use crate::series::IsSorted;

impl<T: PolarsObject> PrivateSeriesNumeric for SeriesWrap<ObjectChunked<T>> {}

Expand Down
4 changes: 0 additions & 4 deletions crates/polars-core/src/series/implementations/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,6 @@ impl SeriesTrait for SeriesWrap<StringChunked> {
Arc::new(SeriesWrap(Clone::clone(&self.0)))
}

#[cfg(feature = "concat_str")]
fn str_concat(&self, delimiter: &str) -> StringChunked {
self.0.str_concat(delimiter)
}
fn as_any(&self) -> &dyn Any {
&self.0
}
Expand Down
2 changes: 1 addition & 1 deletion crates/polars-core/src/utils/supertype.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ pub fn get_supertype(l: &DataType, r: &DataType) -> Option<DataType> {
(Datetime(_, _), Float32) => Some(Float64),
#[cfg(feature = "dtype-datetime")]
(Datetime(_, _), Float64) => Some(Float64),
#[cfg(all(feature = "dtype-datetime", feature = "dtype=date"))]
#[cfg(all(feature = "dtype-datetime", feature = "dtype-date"))]
(Datetime(tu, tz), Date) => Some(Datetime(*tu, tz.clone())),

(Boolean, Float32) => Some(Float32),
Expand Down
8 changes: 0 additions & 8 deletions crates/polars-error/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,6 @@ impl From<avro_schema::error::Error> for PolarsError {
}
}

#[cfg(feature = "parquet2")]
impl From<PolarsError> for parquet2::error::Error {
fn from(value: PolarsError) -> Self {
// catch all needed :(.
parquet2::error::Error::OutOfSpec(format!("error: {value}"))
}
}

impl From<simdutf8::basic::Utf8Error> for PolarsError {
fn from(value: simdutf8::basic::Utf8Error) -> Self {
polars_err!(ComputeError: "invalid utf8: {}", value)
Expand Down
Loading

0 comments on commit 15f6b36

Please sign in to comment.