public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-valkey] f43: Fix python-valkey build (broken tests) rhbz#2460577
@ 2026-10-14 16:10 Matteo Centenaro
  0 siblings, 0 replies; only message in thread
From: Matteo Centenaro @ 2026-10-14 16:10 UTC (permalink / raw)
  To: git-commits

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-14 16:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-14 16:10 [rpms/python-valkey] f43: Fix python-valkey build (broken tests) rhbz#2460577 Matteo Centenaro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox