public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-flask-caching] rawhide: add patch to work with fedora's redis-py
@ 2026-09-11 22:20
0 siblings, 0 replies; only message in thread
From: @ 2026-09-11 22:20 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-flask-caching
Branch : rawhide
Commit : 77fa57dfc0401da36d0920b762a2e70d40d0e9c5
Author : Miroslav Suchý <msuchy@redhat.com>
Date : 2026-09-11T23:36:59+02:00
Stats : +62/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-flask-caching/c/77fa57dfc0401da36d0920b762a2e70d40d0e9c5?branch=rawhide
Log:
add patch to work with fedora's redis-py
redis-py <= 5.2.x requires command_name as positional argument to ConnectionPool.get_connection(). Pass "PING" in 3 Redis URL tests that only inspect .db on the returned connection.
See https://github.com/pallets-eco/flask-caching/pull/685
---
diff --git a/fix-redis-get-connection.patch b/fix-redis-get-connection.patch
new file mode 100644
index 0000000..b73d685
--- /dev/null
+++ b/fix-redis-get-connection.patch
@@ -0,0 +1,61 @@
+From 1446f15ab7b27b72cc357ca980bdee8e43d96e0b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Miroslav=20Such=C3=BD?= <msuchy@redhat.com>
+Date: Fri, 11 Sep 2026 23:08:54 +0200
+Subject: [PATCH] Fix ConnectionPool.get_connection() calls for redis-py
+ compatibility
+
+redis-py <= 5.2.x requires command_name as positional argument to
+ConnectionPool.get_connection(). Pass "PING" in 3 Redis URL tests
+that only inspect .db on the returned connection.
+
+Assisted-By: Claude Opus 4.6 <noreply@anthropic.com>
+---
+ tests/test_basic_app.py | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/tests/test_basic_app.py b/tests/test_basic_app.py
+index 90bd81a..3346188 100644
+--- a/tests/test_basic_app.py
++++ b/tests/test_basic_app.py
+@@ -96,9 +96,9 @@ def test_app_redis_cache_backend_url_default_db(app, redis_server):
+ from flask_caching.backends.rediscache import RedisCache
+
+ assert isinstance(app.extensions["cache"][cache], RedisCache)
+- rconn = app.extensions["cache"][
+- cache
+- ]._write_client.connection_pool.get_connection()
++ rconn = app.extensions["cache"][cache]._write_client.connection_pool.get_connection(
++ "PING"
++ )
+ assert rconn.db == 0
+
+
+@@ -110,9 +110,9 @@ def test_app_redis_cache_backend_url_custom_db(app, redis_server):
+ }
+ cache = Cache()
+ cache.init_app(app, config=config)
+- rconn = app.extensions["cache"][
+- cache
+- ]._write_client.connection_pool.get_connection()
++ rconn = app.extensions["cache"][cache]._write_client.connection_pool.get_connection(
++ "PING"
++ )
+ assert rconn.db == 2
+
+
+@@ -125,9 +125,9 @@ def test_app_redis_cache_backend_url_explicit_db_arg(app, redis_server):
+ }
+ cache = Cache()
+ cache.init_app(app, config=config)
+- rconn = app.extensions["cache"][
+- cache
+- ]._write_client.connection_pool.get_connection()
++ rconn = app.extensions["cache"][cache]._write_client.connection_pool.get_connection(
++ "PING"
++ )
+ assert rconn.db == 1
+
+
+--
+2.55.0
+
diff --git a/python-flask-caching.spec b/python-flask-caching.spec
index 89b9090..c78f6cf 100644
--- a/python-flask-caching.spec
+++ b/python-flask-caching.spec
@@ -10,6 +10,7 @@ Summary: Adds caching support to your Flask application
License: BSD-3-Clause
URL: https://github.com/sh4nks/flask-caching
Source0: https://github.com/sh4nks/%{srcname}/archive/v%{version}/%{srcname}-v%{version}.tar.gz
+Patch0: fix-redis-get-connection.patch
BuildArch: noarch
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-11 22:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 22:20 [rpms/python-flask-caching] rawhide: add patch to work with fedora's redis-py
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox