Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-redis for openSUSE:Factory 
checked in at 2025-11-07 18:20:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-redis (Old)
 and      /work/SRC/openSUSE:Factory/.python-redis.new.1980 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-redis"

Fri Nov  7 18:20:54 2025 rev:48 rq:1315971 version:7.0.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-redis/python-redis.changes        
2025-11-05 16:19:31.285146418 +0100
+++ /work/SRC/openSUSE:Factory/.python-redis.new.1980/python-redis.changes      
2025-11-07 18:21:32.685139282 +0100
@@ -1,0 +2,14 @@
+Tue Nov  4 21:43:15 UTC 2025 - Antonio Teixeira <[email protected]>
+
+- Rewrite logic for skipping tests
+  * Add skipped_tests
+  * Move list of skipped tests from spec to skipped_tests
+  * Add list of tests that need to be skipped exclusively for valkey
+- Update valkey skipped test list to fix test suite with valkey >= 9.0.0
+  (bsc#1252957)
+- Update general skipped test list with tests that fail in aarch64 and i586
+- Add redis_opts rpm macro
+  * Allows us to properly check for redis/valkey >= 7.0.0, instead of
+    grepping for known major versions when adding the needed cli options
+
+-------------------------------------------------------------------

New:
----
  skipped_tests

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-redis.spec ++++++
--- /var/tmp/diff_new_pack.PKQQuX/_old  2025-11-07 18:21:34.409211821 +0100
+++ /var/tmp/diff_new_pack.PKQQuX/_new  2025-11-07 18:21:34.409211821 +0100
@@ -27,6 +27,9 @@
 %bcond_with test
 %endif
 
+# Add needed cli opts when running redis-server if redis/valkey version >= 
7.0.0
+%define redis_opts %[v"%(%{_sbindir}/redis-server --version | cut -d " " -f 
"3" | tr -d "v=")" >= v"7.0.0" ? "--enable-debug-command yes 
--enable-module-command yes" : ""]
+
 %{?sle15_python_module_pythons}
 Name:           python-redis%{psuffix}
 Version:        7.0.1
@@ -37,6 +40,7 @@
 Source0:        
https://files.pythonhosted.org/packages/source/r/redis/redis-%{version}.tar.gz
 # Based on https://github.com/redis/redis-py/blob/master/dockers/sentinel.conf
 Source1:        sentinel.conf
+Source2:        skipped_tests
 Patch0:         increase-test-timeout.patch
 # PATCH-FIX-UPSTREAM Based on gh#redis/redis-py#3830
 Patch1:         remove-mock.patch
@@ -78,16 +82,6 @@
 %patch -P 1 -p1
 %patch -P 2 -p1
 
-# These tests pass locally but fail in obs with different
-# environment, like ALP build...
-rm tests/test_commands.py*
-rm tests/test_asyncio/test_commands.py
-# The openSUSE redis json, bloom, ts
-# are missing in the repos
-rm tests/test_bloom.py
-rm tests/test_json.py
-rm tests/test_timeseries.py
-
 %if %{without test}
 %build
 %pyproject_wheel
@@ -105,8 +99,7 @@
 # We just start two of them locally
 # master
 # https://github.com/redis/redis/pull/9920
-%{_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 "" %redis_opts &
 victims="$!"
 # replica
 %{_sbindir}/redis-server --port 6380 --save "" --replicaof localhost 6379  &
@@ -117,23 +110,11 @@
 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
-#
-# broken tests in ppc64le
-donttest="test_geopos or test_georadius"
-# gh#redis/redis-py#2554
-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
-donttest+=" or test_acl_getuser_setuser or test_acl_log"
-# Requires more set up of an endpoint
-donttest+=" or TestPushNotifications"
-# Requires more sentinel services running
-donttest+=" or test_get_sentinels or test_get_master_addr_by_name"
-%pytest -m 'not (onlycluster or redismod or ssl or graph)' -k "not 
($donttest)" --ignore tests/test_ssl.py --ignore 
tests/test_asyncio/test_scenario --ignore 
tests/test_scenario/test_active_active.py --redis-url=redis://localhost:6379/
+
+# load list of tests to skip from skipped_tests
+source %{SOURCE2}
+
+%pytest "${skipped_tests[@]}" $(%{_sbindir}/redis-server --version | grep -q 
'Valkey' && echo "${valkey_skipped_tests[@]}") 
--redis-url=redis://localhost:6379/
 %endif
 
 %if %{without test}

++++++ skipped_tests ++++++
skipped_tests=(
    # 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
    -m='not (onlycluster or redismod or ssl)'

    # broken tests in ppc64le
    --deselect=tests/test_commands.py::TestRedisCommands::test_geopos
    --deselect=tests/test_commands.py::TestRedisCommands::test_georadius

    # broken in aarch64 and i586
    
--deselect=tests/test_asyncio/test_commands.py::TestRedisCommands::test_geopos

    # broken tests in aarch64
    
--deselect=tests/test_asyncio/test_commands.py::TestRedisCommands::test_georadius_with
    
--deselect=tests/test_asyncio/test_commands.py::TestRedisCommands::test_georadius_store_dist
    
--deselect=tests/test_asyncio/test_commands.py::TestRedisCommands::test_georadiusmember
    --deselect=tests/test_commands.py::TestRedisCommands::test_geosearch_member
    --deselect=tests/test_commands.py::TestRedisCommands::test_geosearch_with
    
--deselect=tests/test_commands.py::TestRedisCommands::test_geosearchstore_dist

    # gh#redis/redis-py#2554
    --deselect=tests/test_commands.py::TestRedisCommands::test_xautoclaim

    # gh#python/cpython#70654 -- Fix only present in python313 so disable the 
tests
    
--deselect=tests/test_asyncio/test_credentials.py::TestStreamingCredentialProvider::test_re_auth_pub_sub_in_resp3
    
--deselect=tests/test_asyncio/test_credentials.py::TestStreamingCredentialProvider::test_do_not_re_auth_pub_sub_in_resp2

    # gh#redis/redis-py#2679
    --deselect=tests/test_commands.py::TestRedisCommands::test_acl_list

    # Requires more sentinel services running
    --deselect=tests/test_sentinel.py::test_get_sentinels
    --deselect=tests/test_sentinel.py::test_get_master_addr_by_name
    --deselect=tests/test_asyncio/test_sentinel.py::test_get_sentinels
    --deselect=tests/test_asyncio/test_sentinel.py::test_get_master_addr_by_name

    # The openSUSE redis json, bloom, ts are missing in the repos
    --ignore=tests/test_bloom.py
    --ignore=tests/test_json.py
    --ignore=tests/test_timeseries.py

    # Tests that may require more set up and are ignored in upstream CI 
pipelines
    --ignore=tests/test_scenario
    --ignore=tests/test_asyncio/test_scenario
)

valkey_skipped_tests=(
    # Tests that pass with redis but fail with valkey for various reasons
    
--deselect=tests/test_asyncio/test_commands.py::TestRedisCommands::test_readonly_invalid_cluster_state
    
--deselect=tests/test_asyncio/test_commands.py::TestRedisCommands::test_readonly_invalid_cluster_state
    --deselect=tests/test_commands.py::TestRedisCommands::test_lolwut
    
--deselect=tests/test_commands.py::TestRedisCommands::test_readonly_invalid_cluster_state
    
--deselect=tests/test_commands.py::TestRedisCommands::test_xgroup_create_entriesread
)

Reply via email to