guix_mirror_bot pushed a commit to branch python-team
in repository guix.

commit 60a4443859168134c5b94de204618176b9509e06
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Tue Jun 16 01:51:08 2026 +0100

    gnu: python-pandas: Update to 3.0.3.
    
    This update includes releases since 2.3.3 (2025-09-29):
    - 3.0.3 (2026-05-11):
      <https://pandas.pydata.org/docs/whatsnew/v3.0.3.html>
    - 3.0.2 (2026-03-30):
      <https://pandas.pydata.org/docs/whatsnew/v3.0.2.html>
    - 3.0.1 (2026-02-17):
      <https://pandas.pydata.org/docs/whatsnew/v3.0.1.html>
    - 3.0.0 (2026-01-21):
      <https://pandas.pydata.org/docs/whatsnew/v3.0.0.html>
    
    * gnu/packages/python-science.scm (python-pandas): Update to 3.0.3.
    [source] <patches>: Drop all.
    [arguments] <test-flags>: Run more tests and provide extra options.
    <phases>: Fix custom 'check phase.
    [propagated-inputs]: Remove python-pytz and python-tzdata; add
    python-bottleneck, python-lxml, python-numba, and python-numexpr.
    [native-inputs]: Remove python-lxml and python-pytest-asyncio; add
    python-hypothesis, python-pytest-localserver, and python-pytz.
    
    Fixes: guix/guix#9244
    Change-Id: I59a51ef1ba264905fc5fee44e894f1963cbd866d
---
 gnu/packages/python-science.scm | 60 ++++++++++++++++++-----------------------
 1 file changed, 26 insertions(+), 34 deletions(-)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 4898fde840..f5de68b0eb 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -4306,7 +4306,7 @@ tissue-specificity metrics for gene expression.")
 (define-public python-pandas
   (package
     (name "python-pandas")
-    (version "2.3.3")
+    (version "3.0.3")
     (source
      (origin
        (method git-fetch)
@@ -4315,35 +4315,25 @@ tissue-specificity metrics for gene expression.")
               (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0qf4frgj31kd9i544n8v03a0bv9mgml3f7n9n1rik187q3r8ygfg"))
-       (patches (search-patches "python-pandas-2-no-pytz_datetime.patch"))))
+        (base32 "1qagfjf4rrpx4xdw0bwg3q9g4k5vjplvifnx6k2frm8z2ws9hgds"))))
     (build-system pyproject-build-system)
     (arguments
      (list
-      ;; tests: 173093 passed, 24265 skipped, 990 xfailed, 77 xpassed, 110 
warnings
+      ;; tests: 185854 passed, 12827 skipped, 776 xfailed, 86 xpassed
       #:test-flags
       #~(list "-m" (string-join
                     (list "not db" "network" "single_cpu" "slow" "slow_arm")
                     " and not ")
+              "-vv"
+              ;; See: <https://github.com/pandas-dev/pandas/issues/54907>.
+              "--no-strict-data-files"
               "--numprocesses" (number->string (min 4 (parallel-job-count)))
               "-k" (string-join
                     (list "not test_git_version"
-                          "test_parsing_tzlocal_deprecated"
                           "test_show_versions_console"
-                          ;; XXX: Introduced by NumPy 2.4.6 and Cython 3.2.5:
-                          ;;    NotImplementedError
-                          ;; See:
-                          ;; 
<https://github.com/pandas-dev/pandas/issues/62820>,
-                          ;; 
<https://github.com/pandas-dev/pandas/issues/63078>.
-                          "test_categorical_block_pickle"
-                          "test_pickle"
-                          "test_pickle_freq"
-                          "test_pickle_preserves_block_ndim"
-                          "test_pickle_preserves_name"
-                          "test_pickle_round_trip"
-                          "test_pickle_roundtrip"
-                          "test_pickle_roundtrip_containers"
-                          "test_round_trip_current"
+                          ;; DeprecationWarning: Bitwise inversion '~' on bool
+                          ;; is deprecated and will be removed in Python 3.16.
+                          "test_scalar_unary[numexpr-pandas]"
                           ;; AssertionError: Series are different.
                           #$@(if (target-64bit?)
                                  '()
@@ -4360,18 +4350,20 @@ tissue-specificity metrics for gene expression.")
                 (("git_version =.*")
                  (format #f "git_version = ~s~%" #$version)))))
           (replace 'check
-            (lambda* (#:key inputs outputs test-flags tests? 
#:allow-other-keys)
+            (lambda* (#:key test-flags tests? #:allow-other-keys)
               (when tests?
+                ;; Tests don't work with "--pyargs pandas" or changing
+                ;; directory to output, script is taken from pyproject.toml
+                ;; file.
                 (setenv "HOME" "/tmp")
-                (with-directory-excursion
-                    (string-append (string-append (site-packages inputs 
outputs)
-                                                  "/pandas"))
-                  (apply invoke "pytest" "-vv" test-flags))))))))
+                (delete-file-recursively "pandas")
+                (invoke "python" "-c" (format #f "~a; ~a=[~{'~a', ~}]);"
+                                              "import pandas as pd"
+                                              "pd.test(extra_args"
+                                              test-flags))))))))
     (propagated-inputs
      (list python-numpy
            python-dateutil
-           python-pytz
-           python-tzdata
            ;; XXX: Pandas lists a lot of optional dependencies which are not
            ;; hard requirements, leave them listed here and commented out for
            ;; the reference purpose. Try to keep closure as bare minimal as
@@ -4381,17 +4373,17 @@ tissue-specificity metrics for gene expression.")
            ;; python-adbc-driver-postgresql
            ;; python-adbc-driver-sqlite
            ;; python-beautifulsoup4
-           ;; python-bottleneck
+           python-bottleneck
            ;; python-fastparquet
            ;; python-fsspec
            ;; python-gcsfs
            ;; python-html5lib
            ;; python-hypothesis
            ;; python-jinja2
-           ;; python-lxml
+           python-lxml
            ;; python-matplotlib
-           ;; python-numba
-           ;; python-numexpr
+           python-numba
+           python-numexpr
            ;; python-odfpy
            ;; python-openpyxl
            ;; python-psycopg2
@@ -4401,7 +4393,6 @@ tissue-specificity metrics for gene expression.")
            ;; python-pyqt5
            ;; python-pyreadstat
            ;; python-python-calamine
-           ;; python-pytz
            ;; python-pyxlsb
            ;; python-qtpy
            ;; python-s3fs
@@ -4416,11 +4407,12 @@ tissue-specificity metrics for gene expression.")
     (inputs
      (list xclip xsel))
     (native-inputs
-     (list python-meson
-           python-lxml
+     (list python-hypothesis
+           python-meson
            python-pytest
-           python-pytest-asyncio
+           python-pytest-localserver
            python-pytest-xdist
+           python-pytz
            python-versioneer
            tzdata-for-tests))
     (home-page "https://pandas.pydata.org";)

Reply via email to