public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-valkey] f43: bump to 6.2.0 (rhbz#2549618)
@ 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 : b0a3bec95cc9bf0cf0fa26330405509048ce231a
Author : Matteo Centenaro <matteo.centenaro@aiven.io>
Date   : 2026-10-14T09:04:24+02:00
Stats  : +28/-213 in 7 file(s)
URL    : https://src.fedoraproject.org/rpms/python-valkey/c/b0a3bec95cc9bf0cf0fa26330405509048ce231a?branch=f43

Log:
bump to 6.2.0 (rhbz#2549618)

---
diff --git a/.gitignore b/.gitignore
index 4f134c4..150f15f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@
 /python-valkey-6.1.0b2.tar.gz
 /python-valkey-6.1.0.tar.gz
 /python-valkey-6.1.1.tar.gz
+/python-valkey-6.2.0.tar.gz

diff --git a/pr-174-do-not-use-forkserver.patch b/pr-174-do-not-use-forkserver.patch
deleted file mode 100644
index 3f2683b..0000000
--- a/pr-174-do-not-use-forkserver.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-From 76de3d15697d9c2d31cf8528f397f4292dc96c2f Mon Sep 17 00:00:00 2001
-From: Matteo Centenaro <matteo.centenaro@aiven.io>
-Date: Mon, 18 Nov 2024 17:42:12 +0100
-Subject: [PATCH] tests: Use fork instead of forkserver
-
-Make sure test can be successfully run on pyton 3.14.
-
-According to
-https://docs.python.org/dev/whatsnew/3.14.html#multiprocessing
-
-The default start method (see Contexts and start methods) changed from
-fork to forkserver on platforms other than macOS & Windows where it was
-already spawn. If you require the threading incompatible fork start
-method you must explicitly request it using a context from
-multiprocessing.get_context() (preferred) or change the default via
-multiprocessing.set_start_method().
-
-See also https://bugzilla.redhat.com/show_bug.cgi?id=2326934 for
-reference on the reported bug for the Fedora package.
-
-Signed-off-by: Matteo Centenaro <matteo.centenaro@aiven.io>
----
- tests/test_multiprocessing.py | 29 +++++++++++++++++++----------
- 1 file changed, 19 insertions(+), 10 deletions(-)
-
-diff --git a/tests/test_multiprocessing.py b/tests/test_multiprocessing.py
-index a749246c..f0cdd6c2 100644
---- a/tests/test_multiprocessing.py
-+++ b/tests/test_multiprocessing.py
-@@ -29,7 +29,14 @@ def r(self, request):
-             valkey.Valkey, request=request, single_connection_client=False
-         )
- 
--    def test_close_connection_in_child(self, master_host):
-+    @pytest.fixture()
-+    def multiprocessing_ctx(self):
-+        curr_start_method = multiprocessing.get_start_method(allow_none=False)
-+        if curr_start_method == "forkserver":
-+            return multiprocessing.get_context("fork")
-+        return multiprocessing.get_context(curr_start_method)
-+
-+    def test_close_connection_in_child(self, master_host, multiprocessing_ctx):
-         """
-         A connection owned by a parent and closed by a child doesn't
-         destroy the file descriptors so a parent can still use it.
-@@ -43,7 +50,7 @@ def target(conn):
-             assert conn.read_response() == b"PONG"
-             conn.disconnect()
- 
--        proc = multiprocessing.Process(target=target, args=(conn,))
-+        proc = multiprocessing_ctx.Process(target=target, args=(conn,))
-         proc.start()
-         proc.join(3)
-         assert proc.exitcode == 0
-@@ -55,7 +62,7 @@ def target(conn):
-         conn.send_command("ping")
-         assert conn.read_response() == b"PONG"
- 
--    def test_close_connection_in_parent(self, master_host):
-+    def test_close_connection_in_parent(self, master_host, multiprocessing_ctx):
-         """
-         A connection owned by a parent is unusable by a child if the parent
-         (the owning process) closes the connection.
-@@ -73,7 +80,7 @@ def target(conn, ev):
-                 conn.send_command("ping")
- 
-         ev = multiprocessing.Event()
--        proc = multiprocessing.Process(target=target, args=(conn, ev))
-+        proc = multiprocessing_ctx.Process(target=target, args=(conn, ev))
-         proc.start()
- 
-         conn.disconnect()
-@@ -83,7 +90,7 @@ def target(conn, ev):
-         assert proc.exitcode == 0
- 
-     @pytest.mark.parametrize("max_connections", [1, 2, None])
--    def test_pool(self, max_connections, master_host):
-+    def test_pool(self, max_connections, master_host, multiprocessing_ctx):
-         """
-         A child will create its own connections when using a pool created
-         by a parent.
-@@ -107,7 +114,7 @@ def target(pool):
-                     assert conn.send_command("ping") is None
-                     assert conn.read_response() == b"PONG"
- 
--        proc = multiprocessing.Process(target=target, args=(pool,))
-+        proc = multiprocessing_ctx.Process(target=target, args=(pool,))
-         proc.start()
-         proc.join(3)
-         assert proc.exitcode == 0
-@@ -120,7 +127,9 @@ def target(pool):
-             assert conn.read_response() == b"PONG"
- 
-     @pytest.mark.parametrize("max_connections", [1, 2, None])
--    def test_close_pool_in_main(self, max_connections, master_host):
-+    def test_close_pool_in_main(
-+        self, max_connections, master_host, multiprocessing_ctx
-+    ):
-         """
-         A child process that uses the same pool as its parent isn't affected
-         when the parent disconnects all connections within the pool.
-@@ -145,7 +154,7 @@ def target(pool, disconnect_event):
- 
-         ev = multiprocessing.Event()
- 
--        proc = multiprocessing.Process(target=target, args=(pool, ev))
-+        proc = multiprocessing_ctx.Process(target=target, args=(pool, ev))
-         proc.start()
- 
-         pool.disconnect()
-@@ -153,7 +162,7 @@ def target(pool, disconnect_event):
-         proc.join(3)
-         assert proc.exitcode == 0
- 
--    def test_valkey_client(self, r):
-+    def test_valkey_client(self, r, multiprocessing_ctx):
-         "A valkey client created in a parent can also be used in a child"
-         assert r.ping() is True
- 
-@@ -161,7 +170,7 @@ def target(client):
-             assert client.ping() is True
-             del client
- 
--        proc = multiprocessing.Process(target=target, args=(r,))
-+        proc = multiprocessing_ctx.Process(target=target, args=(r,))
-         proc.start()
-         proc.join(3)
-         assert proc.exitcode == 0

diff --git a/pr-302.patch b/pr-302.patch
deleted file mode 100644
index 9734475..0000000
--- a/pr-302.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-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
deleted file mode 100644
index 47d4259..0000000
--- a/pr-303.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-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/pr-360.patch b/pr-360.patch
new file mode 100644
index 0000000..b87ff23
--- /dev/null
+++ b/pr-360.patch
@@ -0,0 +1,20 @@
+diff --git a/valkey/_parsers/base.py b/valkey/_parsers/base.py
+index f3af7ec..21ede81 100644
+--- a/valkey/_parsers/base.py
++++ b/valkey/_parsers/base.py
+@@ -27,6 +27,7 @@ from .encoders import Encoder
+ from .socket import SERVER_CLOSED_CONNECTION_ERROR, SocketBuffer
+ 
+ MODULE_LOAD_ERROR = "Error loading the extension. " "Please check the server logs."
++MODULE_LOAD_ERROR_9_2 = "Error loading module: failed to open the module library. Check the server logs for more info"
+ NO_SUCH_MODULE_ERROR = "Error unloading module: no such module with that name"
+ MODULE_UNLOAD_NOT_POSSIBLE_ERROR = "Error unloading module: operation not " "possible."
+ MODULE_EXPORTS_DATA_TYPES_ERROR = (
+@@ -59,6 +60,7 @@ class BaseParser(ABC):
+             "wrong number of arguments "
+             "for 'AUTH' command": AuthenticationWrongNumberOfArgsError,
+             MODULE_LOAD_ERROR: ModuleError,
++            MODULE_LOAD_ERROR_9_2: ModuleError,
+             MODULE_EXPORTS_DATA_TYPES_ERROR: ModuleError,
+             NO_SUCH_MODULE_ERROR: ModuleError,
+             MODULE_UNLOAD_NOT_POSSIBLE_ERROR: ModuleError,

diff --git a/python-valkey.spec b/python-valkey.spec
index 47faff8..8382094 100644
--- a/python-valkey.spec
+++ b/python-valkey.spec
@@ -1,22 +1,15 @@
 Name:           python-valkey
-Version:        6.1.1
+Version:        6.2.0
 Release:        %autorelease
 Summary:        The Python interface to the Valkey key-value store
 License:        MIT
 URL:            https://github.com/valkey-io/valkey-py
 Source:         %{url}/archive/v%{version}/python-valkey-%{version}.tar.gz
-# Fix test to work with Valkey versions lower than 9
-# 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
+# Fix: correctly parse module load error for
+# Valkey server >= 9.2 
 # 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
+# https://github.com/valkey-io/valkey-py/pull/360
+Patch0:         pr-360.patch
 BuildArch:      noarch
 
 BuildRequires:  python3-devel
@@ -42,20 +35,10 @@ This is a Python 3 interface to the Valkey key-value store.
 
 %prep
 %autosetup -p1 -n valkey-py-%{version}
-# Upstream pins this dependency, but we need to be more flexible.
-sed -e '/ocsp/ s/pyopenssl==/pyopenssl>=/' \
-    -i setup.py
 
 
 %generate_buildrequires
-# pyOpenSSL version on Fedora prior to 41 is 23.2.0
-# while ocsp extra requires >= 23.2.1
-%if 0%{?fedora} >= 41
 %pyproject_buildrequires -x ocsp
-%endif
-%if 0%{?fedora} < 41
-%pyproject_buildrequires
-%endif
 
 
 %build
@@ -68,16 +51,9 @@ sed -e '/ocsp/ s/pyopenssl==/pyopenssl>=/' \
 
 
 %check
-# pyOpenSSL version on Fedora prior to 41 is 23.2.0
-# while ocsp extra requires >= 23.2.1
-%if 0%{?fedora} >= 41
 %pyproject_check_import
-%endif
-%if 0%{?fedora} < 41
-%pyproject_check_import -e valkey.ocsp
-%endif
 
-echo 'enable-module-command yes' | valkey-server --port 6379 --enable-debug-command yes - &
+valkey-server --port 6379 --enable-debug-command yes --enable-module-command yes --daemonize yes --logfile ""
 %pytest -m 'not onlycluster and not redismod and not ssl' -k 'not get_from_cache and not test_cache_decode_response[sentinel_setup0] and not psync and not test_geopos and not geosearch and not georadius'
 kill %1
 

diff --git a/sources b/sources
index 8a2252c..d77d3c8 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (python-valkey-6.1.1.tar.gz) = 94b3d74e9f51919acff7c6e3aa005265353bdc06b5c97a87cf409ddd48967b8d79982afea8753f0a621ac7a2b697d82a57a2ff0b0f2bb2e75bb25bd1577c703b
+SHA512 (python-valkey-6.2.0.tar.gz) = 1850757c0bf7bbbe46b22151b46779f2dbc3b53364246459be760f0f8bd61563ed577ee85dab57e7b7fc71cf465975d81ddf45abf41077776cf288734b789b2a

^ 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: bump to 6.2.0 (rhbz#2549618) Matteo Centenaro

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