GNU bug report logs - #74652
[PATCH] gnu: python-redis: Update to 5.2.0.

Previous Next

Package: guix-patches;

Reported by: Ricardo Wurmus <rekado <at> elephly.net>

Date: Mon, 2 Dec 2024 15:37:01 UTC

Severity: normal

Tags: patch

Done: Hilton Chain <hako <at> ultrarare.space>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 74652 in the body.
You can then email your comments to 74652 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to sharlatanus <at> gmail.com, guix-patches <at> gnu.org:
bug#74652; Package guix-patches. (Mon, 02 Dec 2024 15:37:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ricardo Wurmus <rekado <at> elephly.net>:
New bug report received and forwarded. Copy sent to sharlatanus <at> gmail.com, guix-patches <at> gnu.org. (Mon, 02 Dec 2024 15:37:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: guix-patches <at> gnu.org
Cc: Ricardo Wurmus <rekado <at> elephly.net>
Subject: [PATCH] gnu: python-redis: Update to 5.2.0.
Date: Mon,  2 Dec 2024 16:36:02 +0100
* gnu/packages/databases.scm (python-redis): Update to 5.2.0.
[arguments]: Update list of tests to skip; add phase 'relax-requirements.
[native-inputs]: Add python-numpy.

Change-Id: I789c511fb4a516e6cdad06dba695af9bb89f562d
---
 gnu/packages/databases.scm | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 94cb5bbd877..c7edada862c 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -4377,7 +4377,7 @@ (define-public python-fakeredis
 (define-public python-redis
   (package
     (name "python-redis")
-    (version "4.5.4")
+    (version "5.2.0")
     (source (origin
               ;; The PyPI archive lacks some test resources such as the TLS
               ;; certificates under docker/stunnel/keys.
@@ -4388,7 +4388,7 @@ (define-public python-redis
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0s5pswykjcyqbx471ib3gwy29xxa5ckgch9hy476x2s4pvhkbgmr"))))
+                "0f38s704gpm8ra6vdrqhicfq7m77in60kbgcmhvmviq9qj6v3505"))))
     (build-system pyproject-build-system)
     (arguments
      (list
@@ -4399,7 +4399,8 @@ (define-public python-redis
               ;; .github/workflows/install_and_test.sh).
               (string-append "not onlycluster "
                              "and not redismod "
-                             "and not ssl")
+                             "and not ssl "
+                             "and not graph")
               "-k" (string-append
                     ;; The autoclaim test fails with "AssertionError: assert
                     ;; [b'0-0', [], []] == [b'0-0', []]".
@@ -4408,9 +4409,21 @@ (define-public python-redis
                     ;; connecting to localhost:6380. Connection refused."
                     ;; (see: https://github.com/redis/redis-py/issues/2109).
                     "and not test_sync "
-                    "and not test_psync"))
+                    "and not test_psync "
+                    ;; Same with: "Error 111 connecting to
+                    ;; localhost:6479. Connection refused."
+                    "and not test_tfcall "
+                    "and not test_tfunction_load_delete "
+                    "and not test_tfunction_list"))
       #:phases
       #~(modify-phases %standard-phases
+          (add-after 'unpack 'relax-requirements
+            (lambda _
+              ;; FIXME Our version of python-async-timeout is just a little
+              ;; too old, but upgrading it would cause close to 1000 rebuilds.
+              (substitute* '("requirements.txt" "setup.py")
+                (("async-timeout>=4.0.3")
+                 "async-timeout>=4.0.2"))))
           ;; Tests require a running Redis server.
           (add-before 'check 'start-redis
             (lambda* (#:key tests? #:allow-other-keys)
@@ -4419,7 +4432,8 @@ (define-public python-redis
                         "--enable-debug-command" "yes"
                         "--enable-module-command" "local")))))))
     (native-inputs
-     (list python-pytest
+     (list python-numpy
+           python-pytest
            python-pytest-asyncio
            python-pytest-timeout
            redis))

base-commit: d97a67d41de142c0fbdba55e96bfc147482bfae2
-- 
2.46.0





Information forwarded to sharlatanus <at> gmail.com, guix-patches <at> gnu.org:
bug#74652; Package guix-patches. (Mon, 02 Dec 2024 17:03:02 GMT) Full text and rfc822 format available.

Message #8 received at 74652 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 74652 <at> debbugs.gnu.org
Cc: Ricardo Wurmus <rekado <at> elephly.net>
Subject: [PATCH v2 1/3] gnu: python-redis: Update to 5.2.0.
Date: Mon,  2 Dec 2024 18:01:40 +0100
* gnu/packages/databases.scm (python-redis): Update to 5.2.0.
[arguments]: Update list of tests to skip; add phase 'relax-requirements.
[native-inputs]: Add python-numpy.

Change-Id: I789c511fb4a516e6cdad06dba695af9bb89f562d
---
 gnu/packages/databases.scm | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 94cb5bbd877..c7edada862c 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -4377,7 +4377,7 @@ (define-public python-fakeredis
 (define-public python-redis
   (package
     (name "python-redis")
-    (version "4.5.4")
+    (version "5.2.0")
     (source (origin
               ;; The PyPI archive lacks some test resources such as the TLS
               ;; certificates under docker/stunnel/keys.
@@ -4388,7 +4388,7 @@ (define-public python-redis
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0s5pswykjcyqbx471ib3gwy29xxa5ckgch9hy476x2s4pvhkbgmr"))))
+                "0f38s704gpm8ra6vdrqhicfq7m77in60kbgcmhvmviq9qj6v3505"))))
     (build-system pyproject-build-system)
     (arguments
      (list
@@ -4399,7 +4399,8 @@ (define-public python-redis
               ;; .github/workflows/install_and_test.sh).
               (string-append "not onlycluster "
                              "and not redismod "
-                             "and not ssl")
+                             "and not ssl "
+                             "and not graph")
               "-k" (string-append
                     ;; The autoclaim test fails with "AssertionError: assert
                     ;; [b'0-0', [], []] == [b'0-0', []]".
@@ -4408,9 +4409,21 @@ (define-public python-redis
                     ;; connecting to localhost:6380. Connection refused."
                     ;; (see: https://github.com/redis/redis-py/issues/2109).
                     "and not test_sync "
-                    "and not test_psync"))
+                    "and not test_psync "
+                    ;; Same with: "Error 111 connecting to
+                    ;; localhost:6479. Connection refused."
+                    "and not test_tfcall "
+                    "and not test_tfunction_load_delete "
+                    "and not test_tfunction_list"))
       #:phases
       #~(modify-phases %standard-phases
+          (add-after 'unpack 'relax-requirements
+            (lambda _
+              ;; FIXME Our version of python-async-timeout is just a little
+              ;; too old, but upgrading it would cause close to 1000 rebuilds.
+              (substitute* '("requirements.txt" "setup.py")
+                (("async-timeout>=4.0.3")
+                 "async-timeout>=4.0.2"))))
           ;; Tests require a running Redis server.
           (add-before 'check 'start-redis
             (lambda* (#:key tests? #:allow-other-keys)
@@ -4419,7 +4432,8 @@ (define-public python-redis
                         "--enable-debug-command" "yes"
                         "--enable-module-command" "local")))))))
     (native-inputs
-     (list python-pytest
+     (list python-numpy
+           python-pytest
            python-pytest-asyncio
            python-pytest-timeout
            redis))

base-commit: d97a67d41de142c0fbdba55e96bfc147482bfae2
-- 
2.46.0





Information forwarded to sharlatanus <at> gmail.com, guix-patches <at> gnu.org:
bug#74652; Package guix-patches. (Mon, 02 Dec 2024 17:03:03 GMT) Full text and rfc822 format available.

Message #11 received at 74652 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 74652 <at> debbugs.gnu.org
Cc: Ricardo Wurmus <rekado <at> elephly.net>
Subject: [PATCH v2 2/3] gnu: python-fakeredis: Update to 2.26.1.
Date: Mon,  2 Dec 2024 18:01:41 +0100
* gnu/packages/databases.scm (python-fakeredis): Update to 2.26.1.
[arguments]: Do not run slow tests; add phases 'poetry-compatibility and
'start-redis.
[propagated-inputs]: Add python-typing-extensions.
[native-inputs]: Add redis.

Change-Id: I18ed122d9e5307d3d723cfc9ef0d51f120b4ccb5
---
 gnu/packages/databases.scm | 38 ++++++++++++++++++++++++++++----------
 1 file changed, 28 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index c7edada862c..996d61e486d 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -4341,7 +4341,7 @@ (define-public python-hiredis
 (define-public python-fakeredis
   (package
     (name "python-fakeredis")
-    (version "2.10.1")
+    (version "2.26.1")
     (source (origin
               (method git-fetch)        ;for tests
               (uri (git-reference
@@ -4350,18 +4350,36 @@ (define-public python-fakeredis
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "1imsi9dswvkda894sm53lfzdsna0qlrgxszczlq2sam68zn4hfz6"))))
+                "10f9qwpc9vlcd2411c398n9kwjsk399vk1pjd9dbczlhvsn9s5bq"))))
     (build-system pyproject-build-system)
     (arguments
-     (list #:phases #~(modify-phases %standard-phases
-                        (add-after 'unpack 'relax-requirements
-                          (lambda _
-                            (substitute* "pyproject.toml"
-                              (("sortedcontainers = \"\\^2\\.4\"")
-                               "sortedcontainers = \"^2.1\"")))))))
+     (list
+      #:test-flags '(list "-m" "not slow")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'poetry-compatibility
+            (lambda _
+              ;; Our version of poetry does not understand "to".
+              (substitute* "pyproject.toml"
+                ((", to = \"fakeredis\" ") ""))))
+          (add-after 'unpack 'relax-requirements
+            (lambda _
+              (substitute* "pyproject.toml"
+                (("sortedcontainers = \"\\^2\\.4\"")
+                 "sortedcontainers = \"^2.1\""))))
+          ;; Tests require a running Redis server.
+          (add-before 'check 'start-redis
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                (invoke "redis-server" "--daemonize" "yes"
+                        "--port" "6390")))))))
     (native-inputs (list python-poetry-core python-pytest
-                         python-pytest-asyncio python-pytest-mock))
-    (propagated-inputs (list python-redis python-sortedcontainers))
+                         python-pytest-asyncio python-pytest-mock
+                         redis))
+    (propagated-inputs
+     (list python-redis
+           python-sortedcontainers
+           python-typing-extensions))
     (home-page "https://github.com/cunla/fakeredis-py")
     (synopsis "Fake implementation of redis API for testing purposes")
     (description
-- 
2.46.0





Information forwarded to lars <at> 6xq.net, marius <at> gnu.org, me <at> bonfacemunyoki.com, sharlatanus <at> gmail.com, tanguy <at> bioneland.org, jgart <at> dismail.de, guix-patches <at> gnu.org:
bug#74652; Package guix-patches. (Mon, 02 Dec 2024 17:03:04 GMT) Full text and rfc822 format available.

Message #14 received at 74652 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 74652 <at> debbugs.gnu.org
Cc: Ricardo Wurmus <rekado <at> elephly.net>
Subject: [PATCH v2 3/3] gnu: python-falcon: Fix tests.
Date: Mon,  2 Dec 2024 18:01:42 +0100
* gnu/packages/python-web.scm (python-falcon)[native-inputs]: Add
python-orjson.
[arguments]: Do not patch test file; respect test-flags in custom 'check
phase; provide test-flags to ignore examples and benchmarks.
[build-system]: Use pyproject-build-system.

Change-Id: Ic173e2d940a2bb9c7f81ea3e70475f8bfff36dfb
---
 gnu/packages/python-web.scm | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 2137cc42536..fb43c9b0a06 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -1176,17 +1176,19 @@ (define-public python-falcon
        (sha256
         (base32
          "17k31d8avl63xsr6fzvmkxcsm7gnz5dqpgsz65psm1lpc38c79k3"))))
-    (build-system python-build-system)
+    (build-system pyproject-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
+     (list
+      #:test-flags
+      '(list "--ignore-glob=examples/*" "--ignore-glob=bench/*" "tests")
+      #:phases
+      '(modify-phases %standard-phases
+         (add-before 'check 'set-HOME
+           (lambda _ (setenv "HOME" "/tmp")))
          (replace 'check
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             ;; Skip orjson, which requires rust to build.
-             (substitute* "tests/test_media_handlers.py"
-               (("== 'CPython") "!= 'CPython"))
-             (setenv "HOME" "/tmp")
-             (invoke "pytest" "-vv" "tests"))))))
+           (lambda* (#:key tests? test-flags #:allow-other-keys)
+             (when tests?
+               (apply invoke "pytest" "-vv" test-flags)))))))
     (propagated-inputs
      (list python-mimeparse))
     (native-inputs
@@ -1197,6 +1199,7 @@ (define-public python-falcon
            python-httpx
            python-mujson
            python-msgpack
+           python-orjson
            python-pecan
            python-pillow
            python-pytest
-- 
2.46.0





Reply sent to Hilton Chain <hako <at> ultrarare.space>:
You have taken responsibility. (Tue, 03 Dec 2024 02:37:01 GMT) Full text and rfc822 format available.

Notification sent to Ricardo Wurmus <rekado <at> elephly.net>:
bug acknowledged by developer. (Tue, 03 Dec 2024 02:37:02 GMT) Full text and rfc822 format available.

Message #19 received at 74652-done <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>, 74652-done <at> debbugs.gnu.org
Subject: Re: [bug#74652] [PATCH] gnu: python-redis: Update to 5.2.0.
Date: Tue, 03 Dec 2024 10:36:18 +0800
Hi Ricardo,

On Mon, 02 Dec 2024 23:36:02 +0800,
Ricardo Wurmus wrote:
>
> * gnu/packages/databases.scm (python-redis): Update to 5.2.0.
> [arguments]: Update list of tests to skip; add phase 'relax-requirements.
> [native-inputs]: Add python-numpy.
>
> Change-Id: I789c511fb4a516e6cdad06dba695af9bb89f562d
> ---
>  gnu/packages/databases.scm | 24 +++++++++++++++++++-----
>  1 file changed, 19 insertions(+), 5 deletions(-)

‘guix build --dependents’ looks good, applied v2 to master.

Applogies for the breakage, thank you very much for fixing it!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 31 Dec 2024 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 168 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.