Skip to content

Commit

Permalink
chore: update to rustc nightly-2022-11-24 (#5616)
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Nov 24, 2022
1 parent 931ec8e commit 80fa8c4
Show file tree
Hide file tree
Showing 16 changed files with 30 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/deploy_manylinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ls -la
rm py-polars/README.md
cp README.md py-polars/README.md
cd py-polars
rustup override set nightly-2022-11-03
rustup override set nightly-2022-11-24
export RUSTFLAGS='-C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma'

# first the default release
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2022-11-03
toolchain: nightly-2022-11-24

- name: Cache Rust
uses: Swatinem/rust-cache@v2
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-test-rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2022-11-03
toolchain: nightly-2022-11-24

- name: Cache Rust
uses: Swatinem/rust-cache@v2
Expand All @@ -58,7 +58,7 @@ jobs:
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2022-11-03
toolchain: nightly-2022-11-24
components: rustfmt, clippy, miri

- name: Cache Rust
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2022-11-03
toolchain: nightly-2022-11-24

- name: Cache Rust
uses: Swatinem/rust-cache@v2
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/create-python-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
MATURIN_PASSWORD: ${{ secrets.PYPI_PASS }}
RUSTFLAGS: -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma
with:
rust-toolchain: nightly-2022-11-03
rust-toolchain: nightly-2022-11-24
maturin-version: '0.13.5'
command: publish
args: -m py-polars/Cargo.toml --skip-existing -o wheels -u ritchie46
Expand All @@ -53,7 +53,7 @@ jobs:
env:
MATURIN_PASSWORD: ${{ secrets.PYPI_PASS }}
with:
rust-toolchain: nightly-2022-11-03
rust-toolchain: nightly-2022-11-24
target: aarch64-unknown-linux-gnu
maturin-version: '0.13.5'
command: publish
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
MATURIN_PASSWORD: ${{ secrets.PYPI_PASS }}
RUSTFLAGS: -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma
with:
rust-toolchain: nightly-2022-11-03
rust-toolchain: nightly-2022-11-24
maturin-version: '0.13.5'
command: publish
args: -m py-polars/Cargo.toml --skip-existing -o wheels -u ritchie46
Expand All @@ -111,7 +111,7 @@ jobs:
MATURIN_PASSWORD: ${{ secrets.PYPI_PASS }}
RUSTFLAGS: -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt --cfg use_mimalloc
with:
rust-toolchain: nightly-2022-11-03
rust-toolchain: nightly-2022-11-24
maturin-version: '0.13.5'
command: publish
args: -m py-polars/Cargo.toml --skip-existing -o wheels -u ritchie46
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
MATURIN_PASSWORD: ${{ secrets.PYPI_PASS }}
RUSTFLAGS: -C target-feature=+fxsr,+sse,+sse2,+sse3,+sse4.1,+sse4.2
with:
rust-toolchain: nightly-2022-11-03
rust-toolchain: nightly-2022-11-24
maturin-version: '0.13.5'
command: publish
args: -m py-polars/Cargo.toml --no-sdist --skip-existing -o wheels -i python -u ritchie46
Expand All @@ -161,7 +161,7 @@ jobs:
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2022-11-03
toolchain: nightly-2022-11-24

- name: Set up Rust targets
run: rustup target add aarch64-apple-darwin
Expand Down Expand Up @@ -193,7 +193,7 @@ jobs:
# - name: Set up Rust
# uses: dtolnay/rust-toolchain@master
# with:
# toolchain: nightly-2022-11-03
# toolchain: nightly-2022-11-24

# - name: Set up Rust targets
# run: rustup target add aarch64-apple-darwin
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2022-11-03
toolchain: nightly-2022-11-24
components: rust-docs

- name: Cache Rust
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2022-11-03
toolchain: nightly-2022-11-24
components: rustfmt, clippy
- name: Cache Rust
uses: Swatinem/rust-cache@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2022-11-03
toolchain: nightly-2022-11-24

- name: Cache Rust
uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2022-11-03
toolchain: nightly-2022-11-24

- name: Cache Rust
uses: Swatinem/rust-cache@v2
Expand Down
2 changes: 1 addition & 1 deletion polars/polars-core/src/datatypes/any_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ impl<'a> AnyValue<'a> {
}

#[must_use]
pub fn add<'b>(&self, rhs: &AnyValue<'b>) -> Self {
pub fn add(&self, rhs: &AnyValue) -> Self {
use AnyValue::*;
match (self, rhs) {
(Null, _) => Null,
Expand Down
2 changes: 1 addition & 1 deletion polars/polars-core/src/frame/groupby/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::prelude::*;

pub trait PhysicalAggExpr {
#[allow(clippy::ptr_arg)]
fn evaluate<'a>(&self, df: &DataFrame, groups: &'a GroupsProxy) -> PolarsResult<Series>;
fn evaluate(&self, df: &DataFrame, groups: &GroupsProxy) -> PolarsResult<Series>;

fn root_name(&self) -> PolarsResult<&str>;
}
6 changes: 3 additions & 3 deletions polars/polars-core/src/series/any_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ impl<'a, T: AsRef<[AnyValue<'a>]>> NamedFrom<T, [AnyValue<'a>]> for Series {
}

impl Series {
pub fn from_any_values_and_dtype<'a>(
pub fn from_any_values_and_dtype(
name: &str,
av: &[AnyValue<'a>],
av: &[AnyValue],

This comment has been minimized.

Copy link
@Abolish0098

Abolish0098 Dec 16, 2022

abolfazl

dtype: &DataType,
) -> PolarsResult<Series> {
let mut s = match dtype {
Expand Down Expand Up @@ -166,7 +166,7 @@ impl Series {
Ok(s)
}

pub fn from_any_values<'a>(name: &str, av: &[AnyValue<'a>]) -> PolarsResult<Series> {
pub fn from_any_values(name: &str, av: &[AnyValue]) -> PolarsResult<Series> {
match av.iter().find(|av| !matches!(av, AnyValue::Null)) {
None => Ok(Series::full_null(name, av.len(), &DataType::Int32)),
Some(av_) => {
Expand Down
3 changes: 1 addition & 2 deletions polars/polars-core/src/series/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,7 @@ impl Series {

/// Take by index. This operation is clone.
///
/// # Safety
///
/// # Notes
/// Out of bounds access doesn't Error but will return a Null value
pub fn take_threaded(&self, idx: &IdxCa, rechunk: bool) -> PolarsResult<Series> {
self.threaded_op(rechunk, idx.len(), &|offset, len| {
Expand Down
2 changes: 1 addition & 1 deletion polars/polars-io/src/ndjson_core/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ fn value_to_dtype(val: &Value) -> DataType {
}
}

fn deserialize_all<'a, 'b>(json: &'b Value) -> AnyValue<'a> {
fn deserialize_all<'a>(json: &Value) -> AnyValue<'a> {
match json {
Value::Static(StaticNode::Bool(b)) => AnyValue::Boolean(*b),
Value::Static(StaticNode::I64(i)) => AnyValue::Int64(*i),
Expand Down
9 changes: 3 additions & 6 deletions polars/polars-io/src/ndjson_core/ndjson.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,9 @@ impl<'a> CoreJsonReader<'a> {
}

#[inline(always)]
fn parse_impl<'a>(
fn parse_impl(
bytes: &[u8],
buffers: &mut PlIndexMap<BufferKey, Buffer<'a>>,
buffers: &mut PlIndexMap<BufferKey, Buffer>,
line: &mut Vec<u8>,
) -> PolarsResult<usize> {
line.clear();
Expand Down Expand Up @@ -299,10 +299,7 @@ fn parse_impl<'a>(
}
}

fn parse_lines<'a>(
bytes: &[u8],
buffers: &mut PlIndexMap<BufferKey, Buffer<'a>>,
) -> PolarsResult<()> {
fn parse_lines(bytes: &[u8], buffers: &mut PlIndexMap<BufferKey, Buffer>) -> PolarsResult<()> {
let mut buf = vec![];

let total_bytes = bytes.len();
Expand Down
4 changes: 2 additions & 2 deletions polars/polars-lazy/polars-plan/src/logical_plan/builder.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::io::{Read, Seek, SeekFrom};
use std::io::{Read, Seek};
use std::ops::Deref;
use std::path::PathBuf;
use std::sync::Mutex;
Expand Down Expand Up @@ -194,7 +194,7 @@ impl LogicalPlanBuilder {
"cannot scan compressed csv; use read_csv for compressed data".into(),
));
}
file.seek(SeekFrom::Start(0))?;
file.rewind()?;
let reader_bytes = get_reader_bytes(&mut file).expect("could not mmap file");

// TODO! delay inferring schema until absolutely necessary
Expand Down
2 changes: 1 addition & 1 deletion polars/polars-lazy/src/frame/pivot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use crate::prelude::*;
struct PivotExpr(Expr);

impl PhysicalAggExpr for PivotExpr {
fn evaluate<'a>(&self, df: &DataFrame, groups: &'a GroupsProxy) -> PolarsResult<Series> {
fn evaluate(&self, df: &DataFrame, groups: &GroupsProxy) -> PolarsResult<Series> {
let state = ExecutionState::new();
let dtype = df.get_columns()[0].dtype();
let phys_expr = prepare_expression_for_context("", &self.0, dtype, Context::Aggregation)?;
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2022-11-03"
channel = "nightly-2022-11-24"

0 comments on commit 80fa8c4

Please sign in to comment.