forked from pool/python-redis
Compare commits
105 Commits
Author | SHA256 | Date | |
---|---|---|---|
ddd5a43f6b | |||
af3f271c65 | |||
7437248b67 | |||
956291d98c | |||
1e31050b26 | |||
227526a1e2 | |||
6a2af8ebb7 | |||
2c3fb9a318 | |||
509395d6b0 | |||
307a5bd9d1 | |||
1b7e8b8a28 | |||
ac0cdf7a12 | |||
d7a0465d3a | |||
140ec5d80b | |||
cbe88a520e | |||
fac67c4e78 | |||
2d0859fe95 | |||
de9943fd2e | |||
0f0cfe95a3 | |||
bdeeb6a122 | |||
9a6fdc230d | |||
b8b623114d | |||
c59339c353 | |||
9cebbddd64 | |||
b5d57eaade | |||
62082908f4 | |||
49aaaad2c8 | |||
70420d4dd9 | |||
d21e817fae | |||
e02d989c64 | |||
c0dbe5ea8c | |||
fe8b50ab1b | |||
96483c6333 | |||
43960ccb1d | |||
389e533630 | |||
a5d3339759 | |||
3c4e486ff3 | |||
5884f3b76f | |||
bf1ee5d359 | |||
6bf3e78d6d | |||
4274d7b8f5 | |||
8ed8f54ea4 | |||
d313db8f3b | |||
c16bda0221 | |||
fcf76796ee | |||
d3a53b0bd3 | |||
82b2960908 | |||
8d1c0f81d0 | |||
a4d1d21383 | |||
23791a97f7 | |||
b44324c9c5 | |||
f7f9310cbe | |||
a57f319083 | |||
|
f9b4e360ab | ||
5db7336bc7 | |||
|
bf0bba0abf | ||
a470530172 | |||
|
2da24d42c3 | ||
181bbbd515 | |||
|
1da35b2ecd | ||
c3a82728cb | |||
|
bda3abda55 | ||
6df822ed3f | |||
|
d46cedc7b6 | ||
b0631d4be4 | |||
|
1e04efcf63 | ||
6374af49a2 | |||
|
392532f780 | ||
86cf3a1c1c | |||
|
2df149d0c1 | ||
|
a7a56ab3ae | ||
a80a8d0650 | |||
|
f62398c5be | ||
|
901058bff2 | ||
38b1bbe888 | |||
|
b5f7a3b1e7 | ||
eaf5c3d575 | |||
|
b4b0ff3dc1 | ||
a4d887c569 | |||
|
61b20cdbcc | ||
90aedef6d8 | |||
|
6985d50ffe | ||
89a24cc35d | |||
d13562cd38 | |||
|
e97c29c8f3 | ||
|
2788fb2d31 | ||
|
ac5671162c | ||
|
8ea62ebe80 | ||
|
b927205009 | ||
|
a1fa41d610 | ||
|
fa4355b4f4 | ||
|
7e9b94deb5 | ||
|
6a38f13732 | ||
|
fc87e0da70 | ||
|
5abcd06fb5 | ||
|
d922addafa | ||
|
de9d4b6eb7 | ||
|
3afb975b0f | ||
|
5193e22ec0 | ||
|
effae7ad7b | ||
|
b36c4ca773 | ||
|
6f633441cb | ||
|
1d68b7ad56 | ||
|
69a8b70908 | ||
|
d56c30fba0 |
@@ -1,149 +0,0 @@
|
|||||||
From 29d867899ab7abfb0ec2ef73d5bd3a810f8ab432 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Kristj=C3=A1n=20Valur=20J=C3=B3nsson?= <sweskman@gmail.com>
|
|
||||||
Date: Fri, 13 Oct 2023 15:54:23 +0000
|
|
||||||
Subject: [PATCH] Close various objects created during asyncio tests
|
|
||||||
|
|
||||||
---
|
|
||||||
tests/test_asyncio/test_commands.py | 2 ++
|
|
||||||
tests/test_asyncio/test_connect.py | 2 ++
|
|
||||||
tests/test_asyncio/test_connection.py | 4 ++++
|
|
||||||
tests/test_asyncio/test_retry.py | 3 +++
|
|
||||||
tests/test_asyncio/test_sentinel.py | 22 +++++++++----------
|
|
||||||
.../test_sentinel_managed_connection.py | 1 +
|
|
||||||
6 files changed, 23 insertions(+), 11 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/tests/test_asyncio/test_commands.py b/tests/test_asyncio/test_commands.py
|
|
||||||
index 9b9852e9ef..35b9f2a29f 100644
|
|
||||||
--- a/tests/test_asyncio/test_commands.py
|
|
||||||
+++ b/tests/test_asyncio/test_commands.py
|
|
||||||
@@ -370,10 +370,12 @@ async def test_client_setinfo(self, r: redis.Redis):
|
|
||||||
info = await r2.client_info()
|
|
||||||
assert info["lib-name"] == "test2"
|
|
||||||
assert info["lib-ver"] == "1234"
|
|
||||||
+ await r2.aclose()
|
|
||||||
r3 = redis.asyncio.Redis(lib_name=None, lib_version=None)
|
|
||||||
info = await r3.client_info()
|
|
||||||
assert info["lib-name"] == ""
|
|
||||||
assert info["lib-ver"] == ""
|
|
||||||
+ await r3.aclose()
|
|
||||||
|
|
||||||
@skip_if_server_version_lt("2.6.9")
|
|
||||||
@pytest.mark.onlynoncluster
|
|
||||||
diff --git a/tests/test_asyncio/test_connect.py b/tests/test_asyncio/test_connect.py
|
|
||||||
index 0b2d7c2afa..5e6b120fb3 100644
|
|
||||||
--- a/tests/test_asyncio/test_connect.py
|
|
||||||
+++ b/tests/test_asyncio/test_connect.py
|
|
||||||
@@ -73,6 +73,8 @@ async def _handler(reader, writer):
|
|
||||||
try:
|
|
||||||
return await _redis_request_handler(reader, writer, stop_event)
|
|
||||||
finally:
|
|
||||||
+ writer.close()
|
|
||||||
+ await writer.wait_closed()
|
|
||||||
finished.set()
|
|
||||||
|
|
||||||
if isinstance(server_address, str):
|
|
||||||
diff --git a/tests/test_asyncio/test_connection.py b/tests/test_asyncio/test_connection.py
|
|
||||||
index 28e6b0d9c3..9c7f25bf87 100644
|
|
||||||
--- a/tests/test_asyncio/test_connection.py
|
|
||||||
+++ b/tests/test_asyncio/test_connection.py
|
|
||||||
@@ -85,6 +85,8 @@ async def get_conn(_):
|
|
||||||
|
|
||||||
assert init_call_count == 1
|
|
||||||
assert command_call_count == 2
|
|
||||||
+ r.connection = None # it was a Mock
|
|
||||||
+ await r.aclose()
|
|
||||||
|
|
||||||
|
|
||||||
@skip_if_server_version_lt("4.0.0")
|
|
||||||
@@ -143,6 +145,7 @@ async def mock_connect():
|
|
||||||
conn._connect.side_effect = mock_connect
|
|
||||||
await conn.connect()
|
|
||||||
assert conn._connect.call_count == 3
|
|
||||||
+ await conn.disconnect()
|
|
||||||
|
|
||||||
|
|
||||||
async def test_connect_without_retry_on_os_error():
|
|
||||||
@@ -194,6 +197,7 @@ async def test_connection_parse_response_resume(r: redis.Redis):
|
|
||||||
pytest.fail("didn't receive a response")
|
|
||||||
assert response
|
|
||||||
assert i > 0
|
|
||||||
+ await conn.disconnect()
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.onlynoncluster
|
|
||||||
diff --git a/tests/test_asyncio/test_retry.py b/tests/test_asyncio/test_retry.py
|
|
||||||
index 2912ca786c..8bc71c1479 100644
|
|
||||||
--- a/tests/test_asyncio/test_retry.py
|
|
||||||
+++ b/tests/test_asyncio/test_retry.py
|
|
||||||
@@ -131,5 +131,8 @@ async def test_get_set_retry_object(self, request):
|
|
||||||
assert r.get_retry()._retries == new_retry_policy._retries
|
|
||||||
assert isinstance(r.get_retry()._backoff, ExponentialBackoff)
|
|
||||||
assert exiting_conn.retry._retries == new_retry_policy._retries
|
|
||||||
+ await r.connection_pool.release(exiting_conn)
|
|
||||||
new_conn = await r.connection_pool.get_connection("_")
|
|
||||||
assert new_conn.retry._retries == new_retry_policy._retries
|
|
||||||
+ await r.connection_pool.release(new_conn)
|
|
||||||
+ await r.aclose()
|
|
||||||
diff --git a/tests/test_asyncio/test_sentinel.py b/tests/test_asyncio/test_sentinel.py
|
|
||||||
index 25bd7730da..51e59d69d0 100644
|
|
||||||
--- a/tests/test_asyncio/test_sentinel.py
|
|
||||||
+++ b/tests/test_asyncio/test_sentinel.py
|
|
||||||
@@ -183,13 +183,13 @@ async def test_discover_slaves(cluster, sentinel):
|
|
||||||
|
|
||||||
@pytest.mark.onlynoncluster
|
|
||||||
async def test_master_for(cluster, sentinel, master_ip):
|
|
||||||
- master = sentinel.master_for("mymaster", db=9)
|
|
||||||
- assert await master.ping()
|
|
||||||
- assert master.connection_pool.master_address == (master_ip, 6379)
|
|
||||||
+ async with sentinel.master_for("mymaster", db=9) as master:
|
|
||||||
+ assert await master.ping()
|
|
||||||
+ assert master.connection_pool.master_address == (master_ip, 6379)
|
|
||||||
|
|
||||||
# Use internal connection check
|
|
||||||
- master = sentinel.master_for("mymaster", db=9, check_connection=True)
|
|
||||||
- assert await master.ping()
|
|
||||||
+ async with sentinel.master_for("mymaster", db=9, check_connection=True) as master:
|
|
||||||
+ assert await master.ping()
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.onlynoncluster
|
|
||||||
@@ -197,16 +197,16 @@ async def test_slave_for(cluster, sentinel):
|
|
||||||
cluster.slaves = [
|
|
||||||
{"ip": "127.0.0.1", "port": 6379, "is_odown": False, "is_sdown": False}
|
|
||||||
]
|
|
||||||
- slave = sentinel.slave_for("mymaster", db=9)
|
|
||||||
- assert await slave.ping()
|
|
||||||
+ async with sentinel.slave_for("mymaster", db=9) as slave:
|
|
||||||
+ assert await slave.ping()
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.onlynoncluster
|
|
||||||
async def test_slave_for_slave_not_found_error(cluster, sentinel):
|
|
||||||
cluster.master["is_odown"] = True
|
|
||||||
- slave = sentinel.slave_for("mymaster", db=9)
|
|
||||||
- with pytest.raises(SlaveNotFoundError):
|
|
||||||
- await slave.ping()
|
|
||||||
+ async with sentinel.slave_for("mymaster", db=9) as slave:
|
|
||||||
+ with pytest.raises(SlaveNotFoundError):
|
|
||||||
+ await slave.ping()
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.onlynoncluster
|
|
||||||
@@ -260,7 +260,7 @@ async def mock_disconnect():
|
|
||||||
calls += 1
|
|
||||||
|
|
||||||
with mock.patch.object(pool, "disconnect", mock_disconnect):
|
|
||||||
- await client.close()
|
|
||||||
+ await client.aclose()
|
|
||||||
|
|
||||||
assert calls == 1
|
|
||||||
await pool.disconnect()
|
|
||||||
diff --git a/tests/test_asyncio/test_sentinel_managed_connection.py b/tests/test_asyncio/test_sentinel_managed_connection.py
|
|
||||||
index 711b3ee733..cae4b9581f 100644
|
|
||||||
--- a/tests/test_asyncio/test_sentinel_managed_connection.py
|
|
||||||
+++ b/tests/test_asyncio/test_sentinel_managed_connection.py
|
|
||||||
@@ -34,3 +34,4 @@ async def mock_connect():
|
|
||||||
conn._connect.side_effect = mock_connect
|
|
||||||
await conn.connect()
|
|
||||||
assert conn._connect.call_count == 3
|
|
||||||
+ await conn.disconnect()
|
|
4
_multibuild
Normal file
4
_multibuild
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>test</package>
|
||||||
|
</multibuild>
|
||||||
|
|
13
pytest.ini
13
pytest.ini
@@ -1,13 +0,0 @@
|
|||||||
[pytest]
|
|
||||||
addopts = -s
|
|
||||||
markers =
|
|
||||||
redismod: run only the redis module tests
|
|
||||||
pipeline: pipeline tests
|
|
||||||
onlycluster: marks tests to be run only with cluster mode redis
|
|
||||||
onlynoncluster: marks tests to be run only with standalone redis
|
|
||||||
ssl: marker for only the ssl tests
|
|
||||||
asyncio: marker for async tests
|
|
||||||
replica: replica tests
|
|
||||||
experimental: run only experimental tests
|
|
||||||
asyncio_mode = auto
|
|
||||||
timeout = 30
|
|
@@ -1,3 +1,73 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jun 30 16:54:24 UTC 2025 - Илья Индиго <ilya@ilya.top>
|
||||||
|
|
||||||
|
- Added test_add_elem_no_quant.patch to fix test on 32 bit archs.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jun 12 10:24:11 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com>
|
||||||
|
|
||||||
|
- Remove not needed pytest.ini source file.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jun 10 16:44:41 UTC 2025 - Antonio Teixeira <antonio.teixeira@suse.com>
|
||||||
|
|
||||||
|
- Update to 6.2.0:
|
||||||
|
* https://github.com/redis/redis-py/releases/tag/v6.2.0
|
||||||
|
* https://github.com/redis/redis-py/releases/tag/v6.1.0
|
||||||
|
* https://github.com/redis/redis-py/releases/tag/v6.0.0
|
||||||
|
* https://github.com/redis/redis-py/releases/tag/v5.3.0
|
||||||
|
- Drop pytest-asyncio-045.patch
|
||||||
|
* Fixed upstream
|
||||||
|
- Add remove-mock.patch
|
||||||
|
* Use built-in unittest.mock
|
||||||
|
- Don't remove test_graph.py
|
||||||
|
* The test was dropped upstream
|
||||||
|
- Add new python-redis-entraid and pytest-mock dependencies for tests
|
||||||
|
- Add new hatchling build requirement
|
||||||
|
* Remove setuptools which is no longer needed
|
||||||
|
- Move test suite to separate flavor to avoid dependency cycle with
|
||||||
|
python-redis-entraid
|
||||||
|
* Add _multibuild
|
||||||
|
* Move some dependencies that were only needed for tests to the new
|
||||||
|
flavor
|
||||||
|
- Update skipped test list due to gh#python/cpython#70654
|
||||||
|
* Skip test_re_auth_pub_sub_in_resp3
|
||||||
|
* Skip test_do_not_re_auth_pub_sub_in_resp2
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Feb 13 10:59:14 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com>
|
||||||
|
|
||||||
|
- Add pytest-asyncio-045.patch to make tests compatible with latest
|
||||||
|
python-pytest-asyncio
|
||||||
|
- Update to 5.2.1:
|
||||||
|
* Fixed unsecured tempfile.mktemp() command usage (#3446)
|
||||||
|
* Fixed bug with SLOWLOG GET response parsing on Redis Software (#3441)
|
||||||
|
* Fixed issue with invoking _close() on closed event loop (#3438)
|
||||||
|
* Migrate test infrastructure to new custom docker images (#3415)
|
||||||
|
* Fixed flacky test with HEXPIREAT command (#3437)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Nov 28 10:52:11 UTC 2024 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Pin tests to pytest-asyncio < 0.24
|
||||||
|
- Only require async-timeout for older pythons
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Nov 20 17:54:16 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- update to 5.2.0:
|
||||||
|
* Extend AggregateRequest with scorer argument
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Oct 7 21:56:28 UTC 2024 - Antonio Teixeira <antonio.teixeira@suse.com>
|
||||||
|
|
||||||
|
- Update to 5.1.1
|
||||||
|
https://github.com/redis/redis-py/releases/tag/v5.1.1
|
||||||
|
https://github.com/redis/redis-py/releases/tag/v5.1.0
|
||||||
|
https://github.com/redis/redis-py/releases/tag/v5.0.9
|
||||||
|
- Skip test_asyncio/test_commands.py, fails in OBS but passes locally
|
||||||
|
- Use --enable-debug-command and --enable-module-command for valkey 8.x.x
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jul 30 15:22:51 UTC 2024 - Marcus Rueckert <mrueckert@suse.de>
|
Tue Jul 30 15:22:51 UTC 2024 - Marcus Rueckert <mrueckert@suse.de>
|
||||||
|
|
||||||
@@ -1393,4 +1463,3 @@ Fri Apr 15 12:43:07 UTC 2011 - saschpe@suse.de
|
|||||||
Sun Mar 7 22:27:15 UTC 2010 - prusnak@suse.cz
|
Sun Mar 7 22:27:15 UTC 2010 - prusnak@suse.cz
|
||||||
|
|
||||||
- Created package
|
- Created package
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-redis
|
# spec file for package python-redis
|
||||||
#
|
#
|
||||||
# Copyright (c) 2024 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -16,35 +16,48 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%bcond_without testing
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
|
%if "%{flavor}" == "test"
|
||||||
|
%define psuffix -test
|
||||||
|
%bcond_without test
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if "%{flavor}" == ""
|
||||||
|
%define psuffix %{nil}
|
||||||
|
%bcond_with test
|
||||||
|
%endif
|
||||||
|
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-redis
|
Name: python-redis%{psuffix}
|
||||||
Version: 5.0.8
|
Version: 6.2.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Python client for Redis key-value store
|
Summary: Python client for Redis key-value store
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/redis/redis-py
|
URL: https://github.com/redis/redis-py
|
||||||
Source0: https://files.pythonhosted.org/packages/source/r/redis/redis-%{version}.tar.gz
|
Source0: https://files.pythonhosted.org/packages/source/r/redis/redis-%{version}.tar.gz
|
||||||
Source1: https://raw.githubusercontent.com/redis/redis-py/5.0/pytest.ini
|
|
||||||
Patch0: increase-test-timeout.patch
|
Patch0: increase-test-timeout.patch
|
||||||
BuildRequires: %{python_module async-timeout >= 4.0.2}
|
Patch1: remove-mock.patch
|
||||||
|
Patch2: test_add_elem_no_quant.patch
|
||||||
|
BuildRequires: %{python_module async-timeout >= 4.0.2 if %python-base < 3.11.3}
|
||||||
BuildRequires: %{python_module base >= 3.7}
|
BuildRequires: %{python_module base >= 3.7}
|
||||||
|
BuildRequires: %{python_module hatchling}
|
||||||
BuildRequires: %{python_module numpy}
|
BuildRequires: %{python_module numpy}
|
||||||
BuildRequires: %{python_module packaging}
|
BuildRequires: %{python_module packaging}
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module pytest-asyncio}
|
|
||||||
BuildRequires: %{python_module pytest-timeout}
|
|
||||||
BuildRequires: %{python_module pytest}
|
|
||||||
BuildRequires: %{python_module setuptools}
|
|
||||||
BuildRequires: %{python_module wheel}
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: psmisc
|
BuildRequires: psmisc
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
%if %{with testing}
|
%if %{with test}
|
||||||
|
BuildRequires: %{python_module pytest-asyncio}
|
||||||
|
BuildRequires: %{python_module pytest-cov}
|
||||||
|
BuildRequires: %{python_module pytest-mock}
|
||||||
|
BuildRequires: %{python_module pytest-timeout}
|
||||||
|
BuildRequires: %{python_module redis = %{version}}
|
||||||
|
BuildRequires: %{python_module redis-entraid}
|
||||||
BuildRequires: redis
|
BuildRequires: redis
|
||||||
%endif
|
%endif
|
||||||
Requires: python-async-timeout >= 4.0.2
|
Requires: (python-async-timeout >= 4.0.2 if python-base < 3.11.3)
|
||||||
Recommends: python-hiredis >= 1.0.0
|
Recommends: python-hiredis >= 1.0.0
|
||||||
Recommends: redis
|
Recommends: redis
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@@ -55,36 +68,40 @@ The Python interface to the Redis key-value store.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -N -n redis-%{version}
|
%autosetup -N -n redis-%{version}
|
||||||
# pytest.ini for pytest markers
|
|
||||||
cp %SOURCE1 .
|
|
||||||
%ifarch s390x
|
%ifarch s390x
|
||||||
%patch -P 0 -p1
|
%patch -P 0 -p1
|
||||||
%endif
|
%endif
|
||||||
|
%patch -P 1 -p1
|
||||||
|
%patch -P 2 -p1
|
||||||
|
|
||||||
# This test passes locally but fails in obs with different
|
# These tests pass locally but fail in obs with different
|
||||||
# environment, like ALP build...
|
# environment, like ALP build...
|
||||||
rm tests/test_commands.py*
|
rm tests/test_commands.py*
|
||||||
# The openSUSE redis json, bloom, ts and
|
rm tests/test_asyncio/test_commands.py
|
||||||
# graph are missing in the repos
|
# The openSUSE redis json, bloom, ts
|
||||||
|
# are missing in the repos
|
||||||
rm tests/test_bloom.py
|
rm tests/test_bloom.py
|
||||||
rm tests/test_graph.py
|
|
||||||
rm tests/test_json.py
|
rm tests/test_json.py
|
||||||
rm tests/test_timeseries.py
|
rm tests/test_timeseries.py
|
||||||
|
|
||||||
|
%if %{without test}
|
||||||
%build
|
%build
|
||||||
%pyproject_wheel
|
%pyproject_wheel
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{without test}
|
||||||
%install
|
%install
|
||||||
%pyproject_install
|
%pyproject_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
%endif
|
||||||
|
|
||||||
%if %{with testing}
|
%if %{with test}
|
||||||
%check
|
%check
|
||||||
# upstream's tox testsuite starts several servers in docker containers listening on different ports.
|
# upstream's tox testsuite starts several servers in docker containers listening on different ports.
|
||||||
# We just start two of them locally
|
# We just start two of them locally
|
||||||
# master
|
# master
|
||||||
# https://github.com/redis/redis/pull/9920
|
# https://github.com/redis/redis/pull/9920
|
||||||
%{_sbindir}/redis-server --version | grep ' v=7\.' && redis7args="--enable-debug-command yes --enable-module-command yes"
|
%{_sbindir}/redis-server --version | grep ' v=[78]\.' && redis7args="--enable-debug-command yes --enable-module-command yes"
|
||||||
%{_sbindir}/redis-server --port 6379 --save "" $redis7args &
|
%{_sbindir}/redis-server --port 6379 --save "" $redis7args &
|
||||||
victims="$!"
|
victims="$!"
|
||||||
trap "kill $victims || true" EXIT
|
trap "kill $victims || true" EXIT
|
||||||
@@ -102,15 +119,19 @@ sleep 2
|
|||||||
donttest="test_geopos or test_georadius"
|
donttest="test_geopos or test_georadius"
|
||||||
# gh#redis/redis-py#2554
|
# gh#redis/redis-py#2554
|
||||||
donttest="$donttest or test_xautoclaim"
|
donttest="$donttest or test_xautoclaim"
|
||||||
|
# gh#python/cpython#70654 -- Fix only present in python313 so disable the tests
|
||||||
|
donttest+=" or test_re_auth_pub_sub_in_resp3 or test_do_not_re_auth_pub_sub_in_resp2"
|
||||||
# gh#redis/redis-py#2679
|
# gh#redis/redis-py#2679
|
||||||
donttest+=" or test_acl_getuser_setuser or test_acl_log"
|
donttest+=" or test_acl_getuser_setuser or test_acl_log"
|
||||||
%pytest -m 'not (onlycluster or redismod or ssl)' -k "not ($donttest)" --ignore tests/test_ssl.py --ignore tests/test_asyncio/test_cluster.py --redis-url=redis://localhost:6379/
|
%pytest -m 'not (onlycluster or redismod or ssl or graph)' -k "not ($donttest)" --ignore tests/test_ssl.py --ignore tests/test_asyncio/test_cluster.py --redis-url=redis://localhost:6379/
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{without test}
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%{python_sitelib}/redis/
|
%{python_sitelib}/redis/
|
||||||
%{python_sitelib}/redis-%{version}*-info
|
%{python_sitelib}/redis-%{version}.dist-info
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
BIN
redis-5.0.1.tar.gz
(Stored with Git LFS)
BIN
redis-5.0.1.tar.gz
(Stored with Git LFS)
Binary file not shown.
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:0c5b10d387568dfe0698c6fad6615750c24170e548ca2deac10c649d463e9870
|
|
||||||
size 4595651
|
|
3
redis-6.2.0.tar.gz
Normal file
3
redis-6.2.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:e821f129b75dde6cb99dd35e5c76e8c49512a5a0d8dfdc560b2fbd44b85ca977
|
||||||
|
size 4639129
|
26
remove-mock.patch
Normal file
26
remove-mock.patch
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
Index: b/tests/test_asyncio/test_credentials.py
|
||||||
|
===================================================================
|
||||||
|
--- a/tests/test_asyncio/test_credentials.py
|
||||||
|
+++ b/tests/test_asyncio/test_credentials.py
|
||||||
|
@@ -8,7 +8,7 @@ from typing import Optional, Tuple, Unio
|
||||||
|
import pytest
|
||||||
|
import pytest_asyncio
|
||||||
|
import redis
|
||||||
|
-from mock.mock import Mock, call
|
||||||
|
+from unittest.mock import Mock, call
|
||||||
|
from redis import AuthenticationError, DataError, RedisError, ResponseError
|
||||||
|
from redis.asyncio import Connection, ConnectionPool, Redis
|
||||||
|
from redis.asyncio.retry import Retry
|
||||||
|
Index: b/tests/test_credentials.py
|
||||||
|
===================================================================
|
||||||
|
--- a/tests/test_credentials.py
|
||||||
|
+++ b/tests/test_credentials.py
|
||||||
|
@@ -7,7 +7,7 @@ from typing import Optional, Tuple, Unio
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
import redis
|
||||||
|
-from mock.mock import Mock, call
|
||||||
|
+from unittest.mock import Mock, call
|
||||||
|
from redis import AuthenticationError, DataError, Redis, ResponseError
|
||||||
|
from redis.auth.err import RequestTokenErr
|
||||||
|
from redis.backoff import NoBackoff
|
24
test_add_elem_no_quant.patch
Normal file
24
test_add_elem_no_quant.patch
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
diff -Pdpru redis-py-6.2.0.orig/tests/test_asyncio/test_vsets.py redis-py-6.2.0/tests/test_asyncio/test_vsets.py
|
||||||
|
--- redis-py-6.2.0.orig/tests/test_asyncio/test_vsets.py 2025-05-27 19:21:45.000000000 +0300
|
||||||
|
+++ redis-py-6.2.0/tests/test_asyncio/test_vsets.py 2025-06-30 18:35:24.108629200 +0300
|
||||||
|
@@ -83,7 +83,7 @@ async def test_add_elem_no_quant(d_clien
|
||||||
|
assert resp == 1
|
||||||
|
|
||||||
|
emb = await d_client.vset().vemb("myset", "elem1")
|
||||||
|
- assert _validate_quantization(float_array, emb, tolerance=0.0)
|
||||||
|
+ assert _validate_quantization(float_array, emb, tolerance=0.00001)
|
||||||
|
|
||||||
|
|
||||||
|
@skip_if_server_version_lt("7.9.0")
|
||||||
|
diff -Pdpru redis-py-6.2.0.orig/tests/test_vsets.py redis-py-6.2.0/tests/test_vsets.py
|
||||||
|
--- redis-py-6.2.0.orig/tests/test_vsets.py 2025-05-27 19:21:45.000000000 +0300
|
||||||
|
+++ redis-py-6.2.0/tests/test_vsets.py 2025-06-30 18:35:03.140295444 +0300
|
||||||
|
@@ -87,7 +87,7 @@ def test_add_elem_no_quant(d_client):
|
||||||
|
assert resp == 1
|
||||||
|
|
||||||
|
emb = d_client.vset().vemb("myset", "elem1")
|
||||||
|
- assert _validate_quantization(float_array, emb, tolerance=0.0)
|
||||||
|
+ assert _validate_quantization(float_array, emb, tolerance=0.00001)
|
||||||
|
|
||||||
|
|
||||||
|
@skip_if_server_version_lt("7.9.0")
|
Reference in New Issue
Block a user