From ae1897cce572ecb4a1e692acce6651baef902800 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 3 Dec 2023 00:01:46 +0100 Subject: [PATCH] python3Packages.pandas: 2.1.1 -> 2.1.3 https://pandas.pydata.org/docs/whatsnew/index.html Pandas now requires lots of optional dependencies during tests, which makes the build time closure annoyingly large and prone to breakage. As a consequence we move tests into passthru.tests. --- .../python-modules/pandas/default.nix | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/pandas/default.nix b/pkgs/development/python-modules/pandas/default.nix index 588dae7b7840..818cb783dd2a 100644 --- a/pkgs/development/python-modules/pandas/default.nix +++ b/pkgs/development/python-modules/pandas/default.nix @@ -23,7 +23,6 @@ , beautifulsoup4 , bottleneck , blosc2 -, brotlipy , fsspec , gcsfs , html5lib @@ -39,7 +38,6 @@ , pymysql , pyqt5 , pyreadstat -, python-snappy , qtpy , s3fs , scipy @@ -63,9 +61,9 @@ , runtimeShell }: -buildPythonPackage rec { +let pandas = buildPythonPackage rec { pname = "pandas"; - version = "2.1.1"; + version = "2.1.3"; pyproject = true; disabled = pythonOlder "3.9"; @@ -74,7 +72,7 @@ buildPythonPackage rec { owner = "pandas-dev"; repo = "pandas"; rev = "refs/tags/v${version}"; - hash = "sha256-6SgW4BtO7EFnS8P8LL4AGk5EdPwOQ0+is0wXgqsm9w0="; + hash = "sha256-okGYzPJC3mpG+Sq4atjWwLlocUDnpjgGRPmQ+4ehQX0="; }; postPatch = '' @@ -116,8 +114,6 @@ buildPythonPackage rec { qtpy ]; compression = [ - brotlipy - python-snappy zstandard ]; computation = [ @@ -187,16 +183,23 @@ buildPythonPackage rec { all = lib.concatLists (lib.attrValues extras); }; + doCheck = false; # various infinite recursions + + passthru.tests.pytest = pandas.overridePythonAttrs (_: { doCheck = true; }); + nativeCheckInputs = [ glibcLocales hypothesis pytest-asyncio pytest-xdist pytestCheckHook - ] ++ lib.optionals (stdenv.isLinux) [ + ] + ++ lib.flatten (lib.attrValues passthru.optional-dependencies) + ++ lib.optionals (stdenv.isLinux) [ # for locale executable glibc - ] ++ lib.optionals (stdenv.isDarwin) [ + ] + ++ lib.optionals (stdenv.isDarwin) [ # for locale executable adv_cmds ]; @@ -263,4 +266,5 @@ buildPythonPackage rec { ''; maintainers = with maintainers; [ raskin fridh knedlsepp ]; }; -} +}; +in pandas