python312Packages.polars: 1.12.0 -> 1.21.0 (#380049)
This commit is contained in:
@@ -10,8 +10,6 @@
|
||||
|
||||
# dependencies
|
||||
pyarrow,
|
||||
pythonOlder,
|
||||
typing-extensions,
|
||||
|
||||
# optional-dependencies
|
||||
pandas,
|
||||
@@ -46,13 +44,9 @@ buildPythonPackage rec {
|
||||
rustc
|
||||
];
|
||||
|
||||
dependencies =
|
||||
[
|
||||
pyarrow
|
||||
]
|
||||
++ lib.optionals (pythonOlder "3.9") [
|
||||
typing-extensions
|
||||
];
|
||||
dependencies = [
|
||||
pyarrow
|
||||
];
|
||||
|
||||
optional-dependencies = {
|
||||
pandas = [
|
||||
|
||||
-5222
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,6 @@
|
||||
buildPythonPackage,
|
||||
cargo,
|
||||
cmake,
|
||||
darwin,
|
||||
fetchFromGitHub,
|
||||
pkg-config,
|
||||
pkgs, # zstd hidden by python3Packages.zstd
|
||||
@@ -41,22 +40,22 @@
|
||||
}:
|
||||
|
||||
let
|
||||
version = "1.12.0";
|
||||
version = "1.21.0";
|
||||
|
||||
# Hide symbols to prevent accidental use
|
||||
rust-jemalloc-sys = throw "polars: use polarsMemoryAllocator over rust-jemalloc-sys";
|
||||
jemalloc = throw "polars: use polarsMemoryAllocator over jemalloc";
|
||||
in
|
||||
|
||||
buildPythonPackage {
|
||||
buildPythonPackage rec {
|
||||
pname = "polars";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pola-rs";
|
||||
repo = "polars";
|
||||
rev = "py-${version}";
|
||||
hash = "sha256-q//vt8FvVKY9N/BOIoOwxaSB/F/tNX1Zl/9jd0AzSH4=";
|
||||
tag = "py-${version}";
|
||||
hash = "sha256-/MmuaQG8ozl2yAVBXIibbtKjCQbw98azBFSKiP2PE0A=";
|
||||
};
|
||||
|
||||
# Do not type-check assertions because some of them use unstable features (`is_none_or`)
|
||||
@@ -66,12 +65,9 @@ buildPythonPackage {
|
||||
done < <( find -iname '*.rs' -print0 )
|
||||
'';
|
||||
|
||||
cargoDeps = rustPlatform.importCargoLock {
|
||||
lockFile = ./Cargo.lock;
|
||||
outputHashes = {
|
||||
"numpy-0.21.0" = "sha256-u0Z+6L8pXSPaA3cE1sUpY6sCoaU1clXUcj/avnNzmsw=";
|
||||
"polars-parquet-format-2.10.0" = "sha256-iB3KZ72JSp7tJCLn9moukpDEGf9MUos04rIQ9rDGWfI=";
|
||||
};
|
||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||
inherit pname version src;
|
||||
hash = "sha256-CVKT3x8SkpL7VFw6yc4pGwd0EYwufXtBp4Xl2eD88sM=";
|
||||
};
|
||||
|
||||
requiredSystemFeatures = [ "big-parallel" ];
|
||||
@@ -88,16 +84,10 @@ buildPythonPackage {
|
||||
rustc
|
||||
];
|
||||
|
||||
buildInputs =
|
||||
[
|
||||
polarsMemoryAllocator
|
||||
(pkgs.__splicedPackages.zstd or pkgs.zstd)
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
darwin.apple_sdk.frameworks.AppKit
|
||||
darwin.apple_sdk.frameworks.IOKit
|
||||
darwin.apple_sdk.frameworks.Security
|
||||
];
|
||||
buildInputs = [
|
||||
polarsMemoryAllocator
|
||||
(pkgs.__splicedPackages.zstd or pkgs.zstd)
|
||||
];
|
||||
|
||||
env = {
|
||||
ZSTD_SYS_USE_PKG_CONFIG = true;
|
||||
@@ -210,6 +200,7 @@ buildPythonPackage {
|
||||
ps.altair
|
||||
ps.boto3
|
||||
ps.deltalake
|
||||
ps.fastexcel
|
||||
ps.flask
|
||||
ps.flask-cors
|
||||
ps.fsspec
|
||||
@@ -218,6 +209,7 @@ buildPythonPackage {
|
||||
ps.jax
|
||||
ps.jaxlib
|
||||
(ps.kuzu or null)
|
||||
ps.matplotlib
|
||||
ps.moto
|
||||
ps.nest-asyncio
|
||||
ps.numpy
|
||||
@@ -225,7 +217,7 @@ buildPythonPackage {
|
||||
ps.pandas
|
||||
ps.pyarrow
|
||||
ps.pydantic
|
||||
(ps.pyiceberg or null)
|
||||
ps.pyiceberg
|
||||
ps.sqlalchemy
|
||||
ps.torch
|
||||
ps.xlsx2csv
|
||||
@@ -264,6 +256,25 @@ buildPythonPackage {
|
||||
|
||||
# Internet access:
|
||||
"test_read_web_file"
|
||||
"test_run_python_snippets"
|
||||
|
||||
# AssertionError: Series are different (exact value mismatch)
|
||||
"test_reproducible_hash_with_seeds"
|
||||
|
||||
# AssertionError: assert 'PARTITIONED FORCE SPILLED' in 'OOC sort forced\nOOC sort started\nRUN STREAMING PIPELINE\n[df -> sort -> ordered_sink]\nfinished sinking into OOC so... sort took: 365.662µs\nstarted sort source phase\nsort source phase took: 2.169915ms\nfull ooc sort took: 4.502947ms\n'
|
||||
"test_streaming_sort"
|
||||
|
||||
# AssertionError assert sys.getrefcount(foos[0]) == base_count (3 == 2)
|
||||
# tests/unit/dataframe/test_df.py::test_extension
|
||||
"test_extension"
|
||||
|
||||
# Internet access (https://bucket.s3.amazonaws.com/)
|
||||
"test_scan_credential_provider"
|
||||
"test_scan_credential_provider_serialization"
|
||||
|
||||
# ModuleNotFoundError: ADBC 'adbc_driver_sqlite.dbapi' driver not detected.
|
||||
"test_read_database"
|
||||
"test_read_database_parameterised_uri"
|
||||
|
||||
# Untriaged
|
||||
"test_pickle_lazyframe_nested_function_udf"
|
||||
@@ -274,8 +285,8 @@ buildPythonPackage {
|
||||
"tests/benchmark"
|
||||
"tests/docs"
|
||||
|
||||
"tests/unit/io/test_iceberg.py" # Package pyiceberg
|
||||
"tests/unit/io/test_spreadsheet.py" # Package fastexcel
|
||||
# Internet access
|
||||
"tests/unit/io/cloud/test_credential_provider.py"
|
||||
|
||||
# Wrong altair version
|
||||
"tests/unit/operations/namespaces/test_plot.py"
|
||||
@@ -294,6 +305,7 @@ buildPythonPackage {
|
||||
meta = {
|
||||
description = "Dataframes powered by a multithreaded, vectorized query engine, written in Rust";
|
||||
homepage = "https://github.com/pola-rs/polars";
|
||||
changelog = "https://github.com/pola-rs/polars/releases/tag/py-${version}";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [
|
||||
happysalada
|
||||
|
||||
Reference in New Issue
Block a user