Merge pull request #211683 from lilyinstarlight/fix/ibis-framework

python3Packages.ibis-framework: 3.2.0 -> 4.0.0

authored by Nick Cao and committed by GitHub d46d6f5d 54854104

+58 -129
-78
pkgs/development/python-modules/datafusion/Cargo.lock.patch
··· 1 - diff --git a/Cargo.lock b/Cargo.lock 2 - index fa84a54c..3d790e1c 100644 3 - --- a/Cargo.lock 4 - +++ b/Cargo.lock 5 - @@ -57,9 +57,9 @@ checksum = "be4dc07131ffa69b8072d35f5007352af944213cde02545e2103680baed38fcd" 6 - 7 - [[package]] 8 - name = "arrow" 9 - -version = "6.0.0" 10 - +version = "6.5.0" 11 - source = "registry+https://github.com/rust-lang/crates.io-index" 12 - -checksum = "337e668497751234149fd607f5cb41a6ae7b286b6329589126fe67f0ac55d637" 13 - +checksum = "216c6846a292bdd93c2b93c1baab58c32ff50e2ab5e8d50db333ab518535dd8b" 14 - dependencies = [ 15 - "bitflags", 16 - "chrono", 17 - @@ -212,9 +212,9 @@ dependencies = [ 18 - 19 - [[package]] 20 - name = "comfy-table" 21 - -version = "4.1.1" 22 - +version = "5.0.0" 23 - source = "registry+https://github.com/rust-lang/crates.io-index" 24 - -checksum = "11e95a3e867422fd8d04049041f5671f94d53c32a9dcd82e2be268714942f3f3" 25 - +checksum = "c42350b81f044f576ff88ac750419f914abb46a03831bb1747134344ee7a4e64" 26 - dependencies = [ 27 - "strum", 28 - "strum_macros", 29 - @@ -279,7 +279,7 @@ dependencies = [ 30 - 31 - [[package]] 32 - name = "datafusion" 33 - -version = "5.1.0" 34 - +version = "6.0.0" 35 - dependencies = [ 36 - "ahash", 37 - "arrow", 38 - @@ -310,7 +310,7 @@ dependencies = [ 39 - 40 - [[package]] 41 - name = "datafusion-python" 42 - -version = "0.3.0" 43 - +version = "0.4.0" 44 - dependencies = [ 45 - "datafusion", 46 - "pyo3", 47 - @@ -877,9 +877,9 @@ dependencies = [ 48 - 49 - [[package]] 50 - name = "parquet" 51 - -version = "6.0.0" 52 - +version = "6.5.0" 53 - source = "registry+https://github.com/rust-lang/crates.io-index" 54 - -checksum = "d263b9b59ba260518de9e57bd65931c3f765fea0fabacfe84f40d6fde38e841a" 55 - +checksum = "788d9953f4cfbe9db1beff7bebd54299d105e34680d78b82b1ddc85d432cac9d" 56 - dependencies = [ 57 - "arrow", 58 - "base64", 59 - @@ -1228,15 +1228,15 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" 60 - 61 - [[package]] 62 - name = "strum" 63 - -version = "0.21.0" 64 - +version = "0.22.0" 65 - source = "registry+https://github.com/rust-lang/crates.io-index" 66 - -checksum = "aaf86bbcfd1fa9670b7a129f64fc0c9fcbbfe4f1bc4210e9e98fe71ffc12cde2" 67 - +checksum = "f7ac893c7d471c8a21f31cfe213ec4f6d9afeed25537c772e08ef3f005f8729e" 68 - 69 - [[package]] 70 - name = "strum_macros" 71 - -version = "0.21.1" 72 - +version = "0.22.0" 73 - source = "registry+https://github.com/rust-lang/crates.io-index" 74 - -checksum = "d06aaeeee809dbc59eb4556183dd927df67db1540de5be8d3ec0b6636358a5ec" 75 - +checksum = "339f799d8b549e3744c7ac7feb216383e4005d94bdb22561b3ab8f3b808ae9fb" 76 - dependencies = [ 77 - "heck", 78 - "proc-macro2",
+27 -34
pkgs/development/python-modules/datafusion/default.nix
··· 5 5 , fetchPypi 6 6 , fetchFromGitHub 7 7 , rustPlatform 8 - , maturin 9 8 , pytestCheckHook 10 9 , libiconv 11 10 , numpy 12 11 , pandas 13 12 , pyarrow 14 - , pytest 15 13 }: 14 + 16 15 let 17 - # le sigh, the perils of unrelated versions of software living in the same 18 - # repo: there's no obvious way to map the top level source repo 19 - # (arrow-datafusion) version to the version of contained repo 20 - # (arrow-datafusion/python) 21 - # 22 - # A commit hash will do in a pinch, and ultimately the sha256 has the final 23 - # say of what the content is when building 24 - cargoLock = fetchurl { 25 - url = "https://raw.githubusercontent.com/apache/arrow-datafusion/6.0.0/python/Cargo.lock"; 26 - sha256 = "sha256-xiv3drEU5jOGsEIh0U01ZQ1NBKobxO2ctp4mxy9iigw="; 16 + arrow-testing = fetchFromGitHub { 17 + owner = "apache"; 18 + repo = "arrow-testing"; 19 + rev = "5bab2f264a23f5af68f69ea93d24ef1e8e77fc88"; 20 + hash = "sha256-Pxx8ohUpXb5u1995IvXmxQMqWiDJ+7LAll/AjQP7ph8="; 27 21 }; 28 22 29 - postUnpack = '' 30 - cp "${cargoLock}" $sourceRoot/Cargo.lock 31 - chmod u+w $sourceRoot/Cargo.lock 32 - ''; 23 + parquet-testing = fetchFromGitHub { 24 + owner = "apache"; 25 + repo = "parquet-testing"; 26 + rev = "5b82793ef7196f7b3583e85669ced211cd8b5ff2"; 27 + hash = "sha256-gcOvk7qFHZgJWE9CpucC8zwayYw47VbC3lmSRu4JQFg="; 28 + }; 33 29 in 30 + 34 31 buildPythonPackage rec { 35 32 pname = "datafusion"; 36 - version = "0.4.0"; 33 + version = "0.7.0"; 37 34 format = "pyproject"; 38 35 39 36 src = fetchPypi { 40 37 inherit pname version; 41 - sha256 = "sha256-+YqogteKfNhtI2QbVXv/5CIWm3PcOH653dwONm5ZcL8="; 38 + sha256 = "sha256-XYXZMorPs2Ue7E38DASd4rmxvX0wlx8A6sCpAbYUh4I="; 42 39 }; 43 40 44 - inherit postUnpack; 45 - 46 - # TODO: remove the patch hacking and postUnpack hooks after 47 - # https://github.com/apache/arrow-datafusion/pull/1508 is merged 48 - # 49 - # the lock file isn't up to date as of 6.0.0 so we need to patch the source 50 - # lockfile and the vendored cargo deps lockfile 51 - patches = [ ./Cargo.lock.patch ]; 52 41 cargoDeps = rustPlatform.fetchCargoTarball { 53 - inherit src pname version postUnpack; 54 - sha256 = "sha256-JGyDxpfBXzduJaMF1sbmRm7KJajHYdVSj+WbiSETiY0="; 55 - patches = [ ./Cargo.lock.patch ]; 42 + inherit src pname version; 43 + sha256 = "sha256-6mPdKwsEN09Gf4eNsd/v3EBHVezHmff/KYB2lsXgzcA="; 56 44 }; 57 45 58 46 nativeBuildInputs = with rustPlatform; [ ··· 68 56 pyarrow 69 57 ]; 70 58 71 - nativeCheckInputs = [ pytest ]; 59 + nativeCheckInputs = [ pytestCheckHook ]; 72 60 pythonImportsCheck = [ "datafusion" ]; 61 + pytestFlagsArray = [ "--pyargs" pname ]; 73 62 74 - checkPhase = '' 75 - runHook preCheck 76 - pytest --pyargs "${pname}" 77 - runHook postCheck 63 + preCheck = '' 64 + pushd $TMPDIR 65 + ln -s ${arrow-testing} ./testing 66 + ln -s ${parquet-testing} ./parquet 67 + ''; 68 + 69 + postCheck = '' 70 + popd 78 71 ''; 79 72 80 73 meta = with lib; {
+20 -14
pkgs/development/python-modules/ibis-framework/default.nix
··· 16 16 , geoalchemy2 17 17 , geopandas 18 18 , graphviz-nox 19 + , hypothesis 19 20 , lz4 20 21 , multipledispatch 21 22 , numpy ··· 30 31 , pymysql 31 32 , pyspark 32 33 , pytest-benchmark 34 + , pytest-mock 33 35 , pytest-randomly 34 - , pytest-mock 36 + , pytest-snapshot 35 37 , pytest-xdist 36 38 , python 37 39 , pytz ··· 62 64 63 65 buildPythonPackage rec { 64 66 pname = "ibis-framework"; 65 - version = "3.2.0"; 67 + version = "4.0.0"; 66 68 format = "pyproject"; 67 69 68 70 disabled = pythonOlder "3.8"; ··· 71 73 repo = "ibis"; 72 74 owner = "ibis-project"; 73 75 rev = version; 74 - hash = "sha256-YRP1nGJs4btqXQirm0GfEDKNPCVXexVrwQ6sE8JtD2o="; 76 + hash = "sha256-G3kMd6Jyib7ZXHFP6t2CEPlDD5n5zHE2jq/0he3U4Nk="; 75 77 }; 76 78 77 - nativeBuildInputs = [ poetry-core ]; 79 + nativeBuildInputs = [ 80 + poetry-core 81 + ]; 78 82 79 83 propagatedBuildInputs = [ 80 84 atpublic ··· 95 99 pytestCheckHook 96 100 click 97 101 filelock 102 + hypothesis 98 103 pytest-benchmark 99 104 pytest-mock 100 105 pytest-randomly 106 + pytest-snapshot 101 107 pytest-xdist 102 108 rsync 103 109 ] ++ lib.concatMap (name: passthru.optional-dependencies.${name}) testBackends; 104 110 105 - preBuild = '' 106 - # setup.py exists only for developer convenience and is automatically generated 107 - # it gets in the way in nixpkgs so we remove it 108 - rm setup.py 109 - ''; 110 - 111 111 pytestFlagsArray = [ 112 112 "--dist=loadgroup" 113 113 "-m" 114 114 "'${lib.concatStringsSep " or " testBackends} or core'" 115 - # this test fails on nixpkgs datafusion version (0.4.0), but works on 116 - # datafusion 0.6.0 117 - "-k" 118 - "'not datafusion-no_op'" 119 115 ]; 116 + 117 + # remove when sqlalchemy backend no longer uses deprecated methods 118 + SQLALCHEMY_SILENCE_UBER_WARNING = 1; 119 + 120 + # patch out tests that check formatting with black 121 + postPatch = '' 122 + find ibis/tests -type f -name '*.py' -exec sed -i \ 123 + -e '/^ *assert_decompile_roundtrip/d' \ 124 + -e 's/^\( *\)code = ibis.decompile(expr, format=True)/\1code = ibis.decompile(expr)/g' {} + 125 + ''; 120 126 121 127 preCheck = '' 122 128 set -eo pipefail
+4
pkgs/development/python-modules/pyarrow/default.nix
··· 2 2 , stdenv 3 3 , buildPythonPackage 4 4 , python 5 + , pythonAtLeast 5 6 , pythonOlder 6 7 , arrow-cpp 7 8 , cffi ··· 109 110 "--deselect=pyarrow/tests/test_flight.py::test_large_descriptor" 110 111 "--deselect=pyarrow/tests/test_flight.py::test_large_metadata_client" 111 112 "--deselect=pyarrow/tests/test_flight.py::test_none_action_side_effect" 113 + ] ++ lib.optionals (pythonAtLeast "3.11") [ 114 + # Repr output is printing number instead of enum name so these tests fail 115 + "--deselect=pyarrow/tests/test_fs.py::test_get_file_info" 112 116 ]; 113 117 114 118 dontUseSetuptoolsCheck = true;
+7 -3
pkgs/development/python-modules/sqlglot/default.nix
··· 5 5 , pytestCheckHook 6 6 , python-dateutil 7 7 , duckdb 8 + , pyspark 8 9 }: 9 10 buildPythonPackage rec { 10 11 pname = "sqlglot"; 11 - version = "6.0.7"; 12 + version = "10.5.2"; 12 13 13 14 disabled = pythonOlder "3.8"; 14 15 ··· 16 17 repo = "sqlglot"; 17 18 owner = "tobymao"; 18 19 rev = "v${version}"; 19 - hash = "sha256-7PBhf9NN/mCi92xSkB9ygfmfxTyOYaEyrNvL309sG5Y="; 20 + hash = "sha256-ZFc2aOhCTRFlrzgnYDSdIZxRqKZ8FvkYSZRU0OMHI34="; 20 21 }; 21 22 22 23 propagatedBuildInputs = [ python-dateutil ]; 23 24 24 - nativeCheckInputs = [ pytestCheckHook duckdb ]; 25 + nativeCheckInputs = [ pytestCheckHook duckdb pyspark ]; 26 + 27 + # these integration tests assume a running Spark instance 28 + disabledTestPaths = [ "tests/dataframe/integration" ]; 25 29 26 30 pythonImportsCheck = [ "sqlglot" ]; 27 31