14
0
forked from pool/python-redis

Accepting request 1119606 from home:dgarcia:branches:devel:languages:python

- Add pytest.ini source needed to run tests
- Remove/disable broken tests because of suse environment

- drop tox.ini. seems it does no longer exist in 5.0.1
- add support to easily disable the testsuite at build time

- update to 5.0.1
  - 🚀 New Features
    - Provide aclose() / close() for classes requiring lifetime
      management (#2898)
    - Add support for ModuleCommands in cluster (#2951)
    - Add support for multiple values in RPUSHX (#2949)
    - Add Redis.from_pool() class method, for explicitly owning and
      closing a ConnectionPool (#2913)
  - 🐛 Bug Fixes
    - Fixing monitor parsing for messages containing specific
      substrings (#2950)
    - Cluster determine slot command name need to be upper (#2919)
    - Support timeout = 0 in search query (#2934)
    - Fix async sentinel: add push_request keyword argument to
      read_response (#2922)
    - Fix protocol checking for search commands (#2923)
    - Fix: SentinelManagedConnection.read_response() got an
      unexpected keyword argument 'push_request' (#2894)
    - Fix: automatically close connection pool for async Sentinel
      (#2900)
    - Save a reference to created async tasks, to avoid tasks
      potentially disappearing (#2816)
    - Avoid reference cycling by the garbage collector during
      response reading (#2932)

OBS-URL: https://build.opensuse.org/request/show/1119606
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-redis?expand=0&rev=76
This commit is contained in:
2023-10-24 06:29:34 +00:00
committed by Git OBS Bridge
parent e02d989c64
commit d21e817fae
6 changed files with 155 additions and 390 deletions

View File

@@ -16,15 +16,17 @@
#
%bcond_without testing
%{?sle15_python_module_pythons}
Name: python-redis
Version: 4.5.5
Version: 5.0.1
Release: 0
Summary: Python client for Redis key-value store
License: MIT
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
Source1: https://raw.githubusercontent.com/redis/redis-py/5.0/pytest.ini
BuildRequires: %{python_module async-timeout >= 4.0.2}
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module packaging}
@@ -35,10 +37,12 @@ BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: psmisc
BuildRequires: python-rpm-macros
%if %{with testing}
BuildRequires: redis
%endif
Requires: python-async-timeout >= 4.0.2
Requires: redis
Recommends: python-hiredis >= 1.0.0
Recommends: redis
BuildArch: noarch
%python_subpackages
@@ -47,8 +51,15 @@ The Python interface to the Redis key-value store.
%prep
%autosetup -p1 -n redis-%{version}
# tox.ini for pytest markers
cp %{SOURCE1} .
# pytest.ini for pytest markers
cp %SOURCE1 .
# The openSUSE redis json, bloom, ts and
# graph are missing in the repos
rm tests/test_bloom.py
rm tests/test_graph.py
rm tests/test_json.py
rm tests/test_timeseries.py
%build
%python_build
@@ -57,6 +68,7 @@ cp %{SOURCE1} .
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with testing}
%check
# upstream's tox testsuite starts several servers in docker containers listening on different ports.
# We just start two of them locally
@@ -80,9 +92,12 @@ if [ $(getconf LONG_BIT) -ne 64 ]; then
# reference precision issues on 32-bit
donttest=" or test_geopos"
fi
# gh#redis/redis-py#2554 and gh#redis/redis-py#2679
donttest="$donttest or test_xautoclaim or test_acl_list"
%pytest -m 'not (onlycluster or redismod)' -k "not (dummyprefix $donttest)" --ignore tests/test_ssl.py --ignore tests/test_asyncio/test_cluster.py --redis-url=redis://localhost:6379/
# gh#redis/redis-py#2554
donttest="$donttest or test_xautoclaim"
# gh#redis/redis-py#2679
donttest+=" or test_acl_getuser_setuser or test_acl_log"
%pytest -m 'not (onlycluster or redismod or ssl)' -k "not (dummyprefix $donttest)" --ignore tests/test_ssl.py --ignore tests/test_asyncio/test_cluster.py --redis-url=redis://localhost:6379/
%endif
%files %{python_files}
%license LICENSE