forked from pool/python-redis
Accepting request 982133 from home:bnavigator:branches:devel:languages:python
- Update to version 4.3.3 * Fix Lock crash, and versioning 4.3.3 (#2210) * Async cluster: improve docs (#2208) - Release 4.3.2 * SHUTDOWN - add support for the new NOW, FORCE and ABORT modifiers (#2150) * Adding pipeline support for async cluster (#2199) * Support CF.MEXISTS + Clean bf/commands.py (#2184) * Extending query_params for FT.PROFILE (#2198) * Implementing ClusterPipeline Lock (#2190) * Set default response_callbacks to redis.asyncio.cluster.ClusterNode (#2201) * Add default None for maxlen at xtrim command (#2188) * Async cluster: add/update typing (#2195) * Changed list type to single element type (#2203) * Made sync lock consistent and added types to it (#2137) * Async cluster: optimisations (#2205) * Fix typos in README (#2206) * Fix modules links to https://redis.io/commands/ (#2185) - Update to version 4.3.1 * Allow negative `retries` for `Retry` class to retry forever * Add `items` parameter to `hset` signature * Create codeql-analysis.yml (#1988). Thanks @chayim * Add limited support for Lua scripting with RedisCluster * Implement `.lock()` method on RedisCluster * Fix cursor returned by SCAN for RedisCluster & change default target to PRIMARIES * Fix scan_iter for RedisCluster * Remove verbose logging when initializing ClusterPubSub, ClusterPipeline or RedisCluster * Fix broken connection writer lock-up for asyncio (#2065) OBS-URL: https://build.opensuse.org/request/show/982133 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-redis?expand=0&rev=59
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-redis
|
||||
#
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -16,27 +16,42 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%{?!python_module:%define python_module() python3-%{**}}
|
||||
%define skip_python2 1
|
||||
Name: python-redis
|
||||
Version: 3.5.3
|
||||
Version: 4.3.3
|
||||
Release: 0
|
||||
Summary: Python client for Redis key-value store
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/andymccurdy/redis-py
|
||||
Source: https://files.pythonhosted.org/packages/source/r/redis/redis-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM account-defaults-redis.patch gh#andymccurdy/redis-py#1499 mcepl@suse.com
|
||||
# changing unit tests to account for defaults in redis
|
||||
Patch0: account-defaults-redis.patch
|
||||
BuildRequires: %{python_module mock}
|
||||
BuildRequires: %{python_module pytest >= 2.7.0}
|
||||
URL: https://github.com/redis/redis-py
|
||||
Source0: https://files.pythonhosted.org/packages/source/r/redis/redis-%{version}.tar.gz
|
||||
Source1: https://github.com/redis/redis-py/raw/v%{version}/tox.ini
|
||||
BuildRequires: %{python_module Deprecated >= 1.2.3}
|
||||
BuildRequires: %{python_module async-timeout >= 4.0.2}
|
||||
BuildRequires: %{python_module base >= 3.6}
|
||||
BuildRequires: %{python_module importlib-metadata >= 1.0 if %python-base < 3.8}
|
||||
# requires mock.AsyncMock
|
||||
BuildRequires: %{python_module mock if %python-base < 3.8}
|
||||
BuildRequires: %{python_module packaging >= 20.4}
|
||||
BuildRequires: %{python_module pytest-asyncio}
|
||||
BuildRequires: %{python_module pytest-timeout}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module typing-extensions if %python-base < 3.8}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: psmisc
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: redis
|
||||
Requires: python-Deprecated >= 1.2.3
|
||||
Requires: python-async-timeout >= 4.0.2
|
||||
Requires: python-packaging >= 20.4
|
||||
Requires: redis
|
||||
Recommends: python-hiredis >= 0.1.3
|
||||
%if 0%{?python_version_nodots} < 38
|
||||
Requires: python-importlib-metadata >= 1.0
|
||||
Requires: python-typing-extensions
|
||||
%endif
|
||||
Recommends: python-hiredis >= 1.0.0
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
@@ -45,6 +60,8 @@ The Python interface to the Redis key-value store.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n redis-%{version}
|
||||
# tox.ini for pytest markers
|
||||
cp %{SOURCE1} .
|
||||
|
||||
%build
|
||||
%python_build
|
||||
@@ -54,15 +71,34 @@ The Python interface to the Redis key-value store.
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
%{_sbindir}/redis-server --port 6379 &
|
||||
%pytest
|
||||
|
||||
killall redis-server
|
||||
# upstream's tox testsuite starts several servers in docker containers listening on different ports.
|
||||
# We just start two of them locally
|
||||
# master
|
||||
# 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 --port 6379 --save "" $redis7args &
|
||||
victims="$!"
|
||||
trap "kill $victims || true" EXIT
|
||||
sleep 2
|
||||
# replica
|
||||
%{_sbindir}/redis-server --port 6380 --save "" --replicaof localhost 6379 &
|
||||
victims="$victims $!"
|
||||
trap "kill $victims || true" EXIT
|
||||
sleep 2
|
||||
# onlycluster: skip tests which require a full cluster
|
||||
# redismod: Not available (https://github.com/RedisLabsModules/redismod)
|
||||
# ssl: no stunnel with certs from docker container, fails at test collection
|
||||
#
|
||||
if [ $(getconf LONG_BIT) -ne 64 ]; then
|
||||
# reference precision issues on 32-bit
|
||||
donttest=" or test_geopos"
|
||||
fi
|
||||
%pytest -m 'not (onlycluster or redismod)' -k "not (dummyprefix $donttest)" --ignore tests/test_ssl.py
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%doc CHANGES README.rst
|
||||
%doc README.md
|
||||
%{python_sitelib}/redis/
|
||||
%{python_sitelib}/redis-%{version}-py*.egg-info
|
||||
%{python_sitelib}/redis-%{version}*-info
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user