public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Matteo Centenaro <matteo.centenaro@aiven.io>
To: git-commits@fedoraproject.org
Subject: [rpms/python-valkey] f43: Fix python-valkey build (broken tests) rhbz#2460577
Date: Wed, 14 Oct 2026 16:10:14 GMT	[thread overview]
Message-ID: <179199421418.1.10205151491620280093.rpms-python-valkey-81a14fe3c493@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/python-valkey
Branch : f43
Commit : 81a14fe3c493df5ef082868d5a2113ef027a9961
Author : Matteo Centenaro <matteo.centenaro@aiven.io>
Date   : 2026-04-23T09:39:05+02:00
Stats  : +62/-0 in 3 file(s)
URL    : https://src.fedoraproject.org/rpms/python-valkey/c/81a14fe3c493df5ef082868d5a2113ef027a9961?branch=f43

Log:
Fix python-valkey build (broken tests) rhbz#2460577

---
diff --git a/pr-302.patch b/pr-302.patch
new file mode 100644
index 0000000..9734475
--- /dev/null
+++ b/pr-302.patch
@@ -0,0 +1,13 @@
+diff --git a/tests/conftest.py b/tests/conftest.py
+index b9a87e5..b4de77d 100644
+--- a/tests/conftest.py
++++ b/tests/conftest.py
+@@ -200,7 +200,7 @@ def skip_ifmodversion_lt(min_version: str, module_name: str):
+             check = version < mv
+             return pytest.mark.skipif(check, reason="Valkey module version")
+ 
+-    raise AttributeError(f"No valkey module named {module_name}")
++    return pytest.mark.skipif(True, reason=f"No valkey module named {module_name}")
+ 
+ 
+ def skip_if_nocryptography() -> _TestDecorator:

diff --git a/pr-303.patch b/pr-303.patch
new file mode 100644
index 0000000..47d4259
--- /dev/null
+++ b/pr-303.patch
@@ -0,0 +1,41 @@
+From 688bde7cbee73705769898e1c8a8134b5af8128a Mon Sep 17 00:00:00 2001
+From: Matteo Centenaro <matteo.centenaro@aiven.io>
+Date: Wed, 22 Apr 2026 18:14:36 +0200
+Subject: [PATCH] Fix test_acl_getuser_setuser for newer Valkey versions with
+ databases field
+
+Newer Valkey versions return additional 'databases'/'alldbs' fields in ACL
+selector responses. Use assert_resp_response_in to accept both the old format
+(without databases) and the new format (with databases: alldbs).
+---
+ tests/test_commands.py | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/tests/test_commands.py b/tests/test_commands.py
+index f6981ac..16ebbcd 100644
+--- a/tests/test_commands.py
++++ b/tests/test_commands.py
+@@ -331,11 +331,17 @@ class TestValkeyCommands:
+         assert set(acl["keys"]) == {"~cache:*", "~objects:*"}
+         assert len(acl["passwords"]) == 2
+         assert set(acl["channels"]) == {"&message:*"}
+-        assert_resp_response(
++        assert_resp_response_in(
+             r,
+             acl["selectors"],
+-            [["commands", "-@all +set", "keys", "%W~app*", "channels", ""]],
+-            [{"commands": "-@all +set", "keys": "%W~app*", "channels": ""}],
++            [
++                [["commands", "-@all +set", "keys", "%W~app*", "channels", ""]],
++                [["commands", "-@all +set", "keys", "%W~app*", "channels", "", "databases", "alldbs"]],
++            ],
++            [
++                [{"commands": "-@all +set", "keys": "%W~app*", "channels": ""}],
++                [{"commands": "-@all +set", "keys": "%W~app*", "channels": "", "databases": "alldbs"}],
++            ],
+         )
+ 
+     @skip_if_server_version_lt("6.0.0")
+-- 
+2.53.0
+

diff --git a/python-valkey.spec b/python-valkey.spec
index 83920a1..47faff8 100644
--- a/python-valkey.spec
+++ b/python-valkey.spec
@@ -9,6 +9,14 @@ Source:         %{url}/archive/v%{version}/python-valkey-%{version}.tar.gz
 # Upstream issue (merged but not released yet)
 # https://github.com/valkey-io/valkey-py/pull/239
 Patch0:         fix-tests-with-version-lower-than-9.patch
+# Make skip_ifmodversion_lt skip not installed modules
+# Upstream issue:
+# https://github.com/valkey-io/valkey-py/pull/302
+Patch1:         pr-302.patch
+# Fix test_acl_getuser_setuser for newer Valkey versions
+# Upstream issue:
+# https://github.com/valkey-io/valkey-py/pull/303
+Patch2:         pr-303.patch
 BuildArch:      noarch
 
 BuildRequires:  python3-devel

                 reply	other threads:[~2026-10-14 16:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179199421418.1.10205151491620280093.rpms-python-valkey-81a14fe3c493@fedoraproject.org \
    --to=matteo.centenaro@aiven.io \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox