public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/python-flask-caching] rawhide: add patch to work with fedora's redis-py
Date: Fri, 11 Sep 2026 22:20:33 GMT [thread overview]
Message-ID: <178916523386.1.477889955377599270.rpms-python-flask-caching-77fa57dfc040@fedoraproject.org> (raw)
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
reply other threads:[~2026-09-11 22:20 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=178916523386.1.477889955377599270.rpms-python-flask-caching-77fa57dfc040@fedoraproject.org \
--to=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