>>> py3-django-redis: Building community/py3-django-redis 5.4.0-r2 (using abuild 3.15.0-r0) started Sun, 12 Oct 2025 16:50:59 +0000 >>> py3-django-redis: Validating /home/udu/aports/community/py3-django-redis/APKBUILD... >>> py3-django-redis: Analyzing dependencies... >>> py3-django-redis: Installing for build: build-base py3-django py3-setuptools py3-wheel py3-gpep517 py3-redis py3-pytest py3-pytest-django py3-pytest-cov py3-pytest-mock py3-msgpack valkey WARNING: opening /home/udu/packages//community: No such file or directory WARNING: opening /home/udu/packages//main: No such file or directory fetch http://dl-cdn.alpinelinux.org/alpine/v3.22/main/x86_64/APKINDEX.tar.gz fetch http://dl-cdn.alpinelinux.org/alpine/v3.22/community/x86_64/APKINDEX.tar.gz (1/46) Installing py3-asgiref (3.8.1-r1) (2/46) Installing py3-asgiref-pyc (3.8.1-r1) (3/46) Installing py3-sqlparse (0.5.1-r0) (4/46) Installing py3-sqlparse-pyc (0.5.1-r0) (5/46) Installing tzdata (2025b-r0) (6/46) Installing py3-django-pyc (4.2.25-r0) (7/46) Installing py3-django (4.2.25-r0) (8/46) Installing py3-parsing (3.2.3-r0) (9/46) Installing py3-parsing-pyc (3.2.3-r0) (10/46) Installing py3-packaging (25.0-r0) (11/46) Installing py3-packaging-pyc (25.0-r0) (12/46) Installing py3-setuptools (80.9.0-r0) (13/46) Installing py3-setuptools-pyc (80.9.0-r0) (14/46) Installing py3-wheel (0.46.1-r0) (15/46) Installing py3-wheel-pyc (0.46.1-r0) (16/46) Installing py3-installer (0.7.0-r2) (17/46) Installing py3-installer-pyc (0.7.0-r2) (18/46) Installing py3-gpep517 (19-r0) (19/46) Installing py3-gpep517-pyc (19-r0) (20/46) Installing hiredis (1.3.0-r0) (21/46) Installing py3-hiredis (3.2.1-r0) (22/46) Installing py3-hiredis-pyc (3.2.1-r0) (23/46) Installing py3-redis (6.1.0-r0) (24/46) Installing py3-redis-pyc (6.1.0-r0) (25/46) Installing py3-iniconfig (2.1.0-r0) (26/46) Installing py3-iniconfig-pyc (2.1.0-r0) (27/46) Installing py3-pluggy (1.5.0-r0) (28/46) Installing py3-pluggy-pyc (1.5.0-r0) (29/46) Installing py3-py (1.11.0-r4) (30/46) Installing py3-py-pyc (1.11.0-r4) (31/46) Installing py3-pytest (8.3.5-r0) (32/46) Installing py3-pytest-pyc (8.3.5-r0) (33/46) Installing py3-pytest-django (4.11.1-r0) (34/46) Installing py3-pytest-django-pyc (4.11.1-r0) (35/46) Installing py3-coverage (7.8.2-r0) (36/46) Installing py3-coverage-pyc (7.8.2-r0) (37/46) Installing py3-pytest-cov (5.0.0-r0) (38/46) Installing py3-pytest-cov-pyc (5.0.0-r0) (39/46) Installing py3-mock (5.2.0-r0) (40/46) Installing py3-mock-pyc (5.2.0-r0) (41/46) Installing py3-pytest-mock (3.10.0-r3) (42/46) Installing py3-pytest-mock-pyc (3.10.0-r3) (43/46) Installing py3-msgpack (1.0.8-r1) (44/46) Installing py3-msgpack-pyc (1.0.8-r1) (45/46) Installing valkey (8.1.1-r2) Executing valkey-8.1.1-r2.pre-install Executing valkey-8.1.1-r2.post-install (46/46) Installing .makedepends-py3-django-redis (20251012.165100) Executing busybox-1.37.0-r19.trigger OK: 346 MiB in 135 packages >>> py3-django-redis: Cleaning up srcdir >>> py3-django-redis: Cleaning up pkgdir >>> py3-django-redis: Cleaning up tmpdir >>> py3-django-redis: Fetching py3-django-redis-5.4.0.tar.gz::https://pypi.io/packages/source/d/django-redis/django-redis-5.4.0.tar.gz >>> py3-django-redis: Fetching py3-django-redis-5.4.0.tar.gz::https://pypi.io/packages/source/d/django-redis/django-redis-5.4.0.tar.gz >>> py3-django-redis: Checking sha512sums... py3-django-redis-5.4.0.tar.gz: OK >>> py3-django-redis: Unpacking /var/cache/distfiles/py3-django-redis-5.4.0.tar.gz... 2025-10-12 16:51:01,142 gpep517 INFO Building wheel via backend setuptools.build_meta:__legacy__ /usr/lib/python3.12/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated. !! ******************************************************************************** Please consider removing the following classifiers in favor of a SPDX license expression: License :: OSI Approved :: BSD License See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! self._finalize_license_expression() 2025-10-12 16:51:01,155 root INFO running bdist_wheel 2025-10-12 16:51:01,164 root INFO running build 2025-10-12 16:51:01,165 root INFO running build_py 2025-10-12 16:51:01,167 root INFO creating build/lib/django_redis 2025-10-12 16:51:01,167 root INFO copying django_redis/pool.py -> build/lib/django_redis 2025-10-12 16:51:01,167 root INFO copying django_redis/util.py -> build/lib/django_redis 2025-10-12 16:51:01,167 root INFO copying django_redis/exceptions.py -> build/lib/django_redis 2025-10-12 16:51:01,167 root INFO copying django_redis/hash_ring.py -> build/lib/django_redis 2025-10-12 16:51:01,167 root INFO copying django_redis/cache.py -> build/lib/django_redis 2025-10-12 16:51:01,167 root INFO copying django_redis/__init__.py -> build/lib/django_redis 2025-10-12 16:51:01,168 root INFO creating build/lib/django_redis/client 2025-10-12 16:51:01,168 root INFO copying django_redis/client/herd.py -> build/lib/django_redis/client 2025-10-12 16:51:01,168 root INFO copying django_redis/client/sentinel.py -> build/lib/django_redis/client 2025-10-12 16:51:01,168 root INFO copying django_redis/client/sharded.py -> build/lib/django_redis/client 2025-10-12 16:51:01,168 root INFO copying django_redis/client/__init__.py -> build/lib/django_redis/client 2025-10-12 16:51:01,168 root INFO copying django_redis/client/default.py -> build/lib/django_redis/client 2025-10-12 16:51:01,168 root INFO creating build/lib/django_redis/serializers 2025-10-12 16:51:01,168 root INFO copying django_redis/serializers/base.py -> build/lib/django_redis/serializers 2025-10-12 16:51:01,168 root INFO copying django_redis/serializers/json.py -> build/lib/django_redis/serializers 2025-10-12 16:51:01,168 root INFO copying django_redis/serializers/pickle.py -> build/lib/django_redis/serializers 2025-10-12 16:51:01,168 root INFO copying django_redis/serializers/msgpack.py -> build/lib/django_redis/serializers 2025-10-12 16:51:01,169 root INFO copying django_redis/serializers/__init__.py -> build/lib/django_redis/serializers 2025-10-12 16:51:01,169 root INFO creating build/lib/django_redis/compressors 2025-10-12 16:51:01,169 root INFO copying django_redis/compressors/base.py -> build/lib/django_redis/compressors 2025-10-12 16:51:01,169 root INFO copying django_redis/compressors/zstd.py -> build/lib/django_redis/compressors 2025-10-12 16:51:01,169 root INFO copying django_redis/compressors/lz4.py -> build/lib/django_redis/compressors 2025-10-12 16:51:01,169 root INFO copying django_redis/compressors/zlib.py -> build/lib/django_redis/compressors 2025-10-12 16:51:01,169 root INFO copying django_redis/compressors/identity.py -> build/lib/django_redis/compressors 2025-10-12 16:51:01,169 root INFO copying django_redis/compressors/__init__.py -> build/lib/django_redis/compressors 2025-10-12 16:51:01,169 root INFO copying django_redis/compressors/lzma.py -> build/lib/django_redis/compressors 2025-10-12 16:51:01,173 root INFO installing to build/bdist.linux-x86_64/wheel 2025-10-12 16:51:01,173 root INFO running install 2025-10-12 16:51:01,178 root INFO running install_lib 2025-10-12 16:51:01,180 root INFO creating build/bdist.linux-x86_64/wheel 2025-10-12 16:51:01,180 root INFO creating build/bdist.linux-x86_64/wheel/django_redis 2025-10-12 16:51:01,180 root INFO creating build/bdist.linux-x86_64/wheel/django_redis/serializers 2025-10-12 16:51:01,180 root INFO copying build/lib/django_redis/serializers/base.py -> build/bdist.linux-x86_64/wheel/./django_redis/serializers 2025-10-12 16:51:01,180 root INFO copying build/lib/django_redis/serializers/json.py -> build/bdist.linux-x86_64/wheel/./django_redis/serializers 2025-10-12 16:51:01,180 root INFO copying build/lib/django_redis/serializers/pickle.py -> build/bdist.linux-x86_64/wheel/./django_redis/serializers 2025-10-12 16:51:01,180 root INFO copying build/lib/django_redis/serializers/msgpack.py -> build/bdist.linux-x86_64/wheel/./django_redis/serializers 2025-10-12 16:51:01,180 root INFO copying build/lib/django_redis/serializers/__init__.py -> build/bdist.linux-x86_64/wheel/./django_redis/serializers 2025-10-12 16:51:01,180 root INFO copying build/lib/django_redis/pool.py -> build/bdist.linux-x86_64/wheel/./django_redis 2025-10-12 16:51:01,180 root INFO copying build/lib/django_redis/util.py -> build/bdist.linux-x86_64/wheel/./django_redis 2025-10-12 16:51:01,180 root INFO copying build/lib/django_redis/exceptions.py -> build/bdist.linux-x86_64/wheel/./django_redis 2025-10-12 16:51:01,181 root INFO copying build/lib/django_redis/hash_ring.py -> build/bdist.linux-x86_64/wheel/./django_redis 2025-10-12 16:51:01,181 root INFO creating build/bdist.linux-x86_64/wheel/django_redis/compressors 2025-10-12 16:51:01,181 root INFO copying build/lib/django_redis/compressors/base.py -> build/bdist.linux-x86_64/wheel/./django_redis/compressors 2025-10-12 16:51:01,181 root INFO copying build/lib/django_redis/compressors/zstd.py -> build/bdist.linux-x86_64/wheel/./django_redis/compressors 2025-10-12 16:51:01,181 root INFO copying build/lib/django_redis/compressors/lz4.py -> build/bdist.linux-x86_64/wheel/./django_redis/compressors 2025-10-12 16:51:01,181 root INFO copying build/lib/django_redis/compressors/zlib.py -> build/bdist.linux-x86_64/wheel/./django_redis/compressors 2025-10-12 16:51:01,181 root INFO copying build/lib/django_redis/compressors/identity.py -> build/bdist.linux-x86_64/wheel/./django_redis/compressors 2025-10-12 16:51:01,181 root INFO copying build/lib/django_redis/compressors/__init__.py -> build/bdist.linux-x86_64/wheel/./django_redis/compressors 2025-10-12 16:51:01,181 root INFO copying build/lib/django_redis/compressors/lzma.py -> build/bdist.linux-x86_64/wheel/./django_redis/compressors 2025-10-12 16:51:01,181 root INFO copying build/lib/django_redis/cache.py -> build/bdist.linux-x86_64/wheel/./django_redis 2025-10-12 16:51:01,181 root INFO copying build/lib/django_redis/__init__.py -> build/bdist.linux-x86_64/wheel/./django_redis 2025-10-12 16:51:01,181 root INFO creating build/bdist.linux-x86_64/wheel/django_redis/client 2025-10-12 16:51:01,181 root INFO copying build/lib/django_redis/client/herd.py -> build/bdist.linux-x86_64/wheel/./django_redis/client 2025-10-12 16:51:01,181 root INFO copying build/lib/django_redis/client/sentinel.py -> build/bdist.linux-x86_64/wheel/./django_redis/client 2025-10-12 16:51:01,181 root INFO copying build/lib/django_redis/client/sharded.py -> build/bdist.linux-x86_64/wheel/./django_redis/client 2025-10-12 16:51:01,181 root INFO copying build/lib/django_redis/client/__init__.py -> build/bdist.linux-x86_64/wheel/./django_redis/client 2025-10-12 16:51:01,181 root INFO copying build/lib/django_redis/client/default.py -> build/bdist.linux-x86_64/wheel/./django_redis/client 2025-10-12 16:51:01,182 root INFO running install_egg_info 2025-10-12 16:51:01,183 root INFO running egg_info 2025-10-12 16:51:01,185 root INFO writing django_redis.egg-info/PKG-INFO 2025-10-12 16:51:01,186 root INFO writing dependency_links to django_redis.egg-info/dependency_links.txt 2025-10-12 16:51:01,186 root INFO writing requirements to django_redis.egg-info/requires.txt 2025-10-12 16:51:01,186 root INFO writing top-level names to django_redis.egg-info/top_level.txt 2025-10-12 16:51:01,188 root INFO reading manifest file 'django_redis.egg-info/SOURCES.txt' 2025-10-12 16:51:01,189 root INFO reading manifest template 'MANIFEST.in' 2025-10-12 16:51:01,189 root WARNING warning: no files found matching 'CHANGES.txt' 2025-10-12 16:51:01,189 root WARNING warning: no files found matching 'README.txt' under directory 'tests' 2025-10-12 16:51:01,189 root WARNING warning: no files found matching 'Makefile' under directory 'doc' 2025-10-12 16:51:01,189 root WARNING warning: no files found matching '*.adoc' under directory 'doc' 2025-10-12 16:51:01,189 root WARNING warning: no files found matching '*.html' under directory 'doc' 2025-10-12 16:51:01,189 root INFO adding license file 'LICENSE' 2025-10-12 16:51:01,189 root INFO adding license file 'AUTHORS.rst' 2025-10-12 16:51:01,190 root INFO writing manifest file 'django_redis.egg-info/SOURCES.txt' 2025-10-12 16:51:01,190 root INFO Copying django_redis.egg-info to build/bdist.linux-x86_64/wheel/./django_redis-5.4.0-py3.12.egg-info 2025-10-12 16:51:01,190 root INFO running install_scripts 2025-10-12 16:51:01,191 root INFO creating build/bdist.linux-x86_64/wheel/django_redis-5.4.0.dist-info/WHEEL 2025-10-12 16:51:01,191 wheel INFO creating '/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/.dist/.tmp-rdbqfxgb/django_redis-5.4.0-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it 2025-10-12 16:51:01,191 wheel INFO adding 'django_redis/__init__.py' 2025-10-12 16:51:01,191 wheel INFO adding 'django_redis/cache.py' 2025-10-12 16:51:01,191 wheel INFO adding 'django_redis/exceptions.py' 2025-10-12 16:51:01,191 wheel INFO adding 'django_redis/hash_ring.py' 2025-10-12 16:51:01,192 wheel INFO adding 'django_redis/pool.py' 2025-10-12 16:51:01,192 wheel INFO adding 'django_redis/util.py' 2025-10-12 16:51:01,192 wheel INFO adding 'django_redis/client/__init__.py' 2025-10-12 16:51:01,192 wheel INFO adding 'django_redis/client/default.py' 2025-10-12 16:51:01,192 wheel INFO adding 'django_redis/client/herd.py' 2025-10-12 16:51:01,192 wheel INFO adding 'django_redis/client/sentinel.py' 2025-10-12 16:51:01,192 wheel INFO adding 'django_redis/client/sharded.py' 2025-10-12 16:51:01,192 wheel INFO adding 'django_redis/compressors/__init__.py' 2025-10-12 16:51:01,192 wheel INFO adding 'django_redis/compressors/base.py' 2025-10-12 16:51:01,192 wheel INFO adding 'django_redis/compressors/identity.py' 2025-10-12 16:51:01,192 wheel INFO adding 'django_redis/compressors/lz4.py' 2025-10-12 16:51:01,192 wheel INFO adding 'django_redis/compressors/lzma.py' 2025-10-12 16:51:01,192 wheel INFO adding 'django_redis/compressors/zlib.py' 2025-10-12 16:51:01,192 wheel INFO adding 'django_redis/compressors/zstd.py' 2025-10-12 16:51:01,193 wheel INFO adding 'django_redis/serializers/__init__.py' 2025-10-12 16:51:01,193 wheel INFO adding 'django_redis/serializers/base.py' 2025-10-12 16:51:01,193 wheel INFO adding 'django_redis/serializers/json.py' 2025-10-12 16:51:01,193 wheel INFO adding 'django_redis/serializers/msgpack.py' 2025-10-12 16:51:01,193 wheel INFO adding 'django_redis/serializers/pickle.py' 2025-10-12 16:51:01,193 wheel INFO adding 'django_redis-5.4.0.dist-info/licenses/AUTHORS.rst' 2025-10-12 16:51:01,193 wheel INFO adding 'django_redis-5.4.0.dist-info/licenses/LICENSE' 2025-10-12 16:51:01,193 wheel INFO adding 'django_redis-5.4.0.dist-info/METADATA' 2025-10-12 16:51:01,193 wheel INFO adding 'django_redis-5.4.0.dist-info/WHEEL' 2025-10-12 16:51:01,193 wheel INFO adding 'django_redis-5.4.0.dist-info/top_level.txt' 2025-10-12 16:51:01,193 wheel INFO adding 'django_redis-5.4.0.dist-info/RECORD' 2025-10-12 16:51:01,193 root INFO removing build/bdist.linux-x86_64/wheel 2025-10-12 16:51:01,194 gpep517 INFO The backend produced .dist/django_redis-5.4.0-py3-none-any.whl django_redis-5.4.0-py3-none-any.whl 4004044:M 12 Oct 2025 16:51:01.211 * oO0OoO0OoO0Oo Valkey is starting oO0OoO0OoO0Oo 4004044:M 12 Oct 2025 16:51:01.211 * Valkey version=8.1.1, bits=64, commit=00000000, modified=1, pid=4004044, just started 4004044:M 12 Oct 2025 16:51:01.211 # Warning: no config file specified, using the default config. In order to specify a config file use valkey-server /path/to/valkey.conf 4004044:M 12 Oct 2025 16:51:01.212 * Increased maximum number of open files to 10032 (it was originally set to 1024). 4004044:M 12 Oct 2025 16:51:01.212 * monotonic clock: POSIX clock_gettime 4004044:M 12 Oct 2025 16:51:01.212 * Running mode=standalone, port=6379. 4004044:M 12 Oct 2025 16:51:01.212 # Warning: Could not create server TCP listening socket *:6379: bind: Address in use 4004044:M 12 Oct 2025 16:51:01.212 # Failed listening on port 6379 (tcp), aborting. ============================= test session starts ============================== platform linux -- Python 3.12.11, pytest-8.3.5, pluggy-1.5.0 -- /home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/.testenv/bin/python3 cachedir: .pytest_cache django: version: 4.2.25, settings: settings.sqlite (from ini) rootdir: /home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0 configfile: setup.cfg testpaths: tests plugins: mock-3.10.0, cov-5.0.0, django-4.11.1 collecting ... collected 128 items tests/test_backend.py::TestDjangoRedisCache::test_setnx PASSED [ 0%] tests/test_backend.py::TestDjangoRedisCache::test_setnx_timeout PASSED [ 1%] tests/test_backend.py::TestDjangoRedisCache::test_unicode_keys PASSED [ 2%] tests/test_backend.py::TestDjangoRedisCache::test_save_and_integer PASSED [ 3%] tests/test_backend.py::TestDjangoRedisCache::test_save_string PASSED [ 3%] tests/test_backend.py::TestDjangoRedisCache::test_save_unicode PASSED [ 4%] tests/test_backend.py::TestDjangoRedisCache::test_save_dict PASSED [ 5%] tests/test_backend.py::TestDjangoRedisCache::test_save_float PASSED [ 6%] tests/test_backend.py::TestDjangoRedisCache::test_timeout PASSED [ 7%] tests/test_backend.py::TestDjangoRedisCache::test_timeout_0 PASSED [ 7%] tests/test_backend.py::TestDjangoRedisCache::test_timeout_parameter_as_positional_argument PASSED [ 8%] tests/test_backend.py::TestDjangoRedisCache::test_timeout_negative PASSED [ 9%] tests/test_backend.py::TestDjangoRedisCache::test_timeout_tiny PASSED [ 10%] tests/test_backend.py::TestDjangoRedisCache::test_set_add PASSED [ 10%] tests/test_backend.py::TestDjangoRedisCache::test_get_many PASSED [ 11%] tests/test_backend.py::TestDjangoRedisCache::test_get_many_unicode PASSED [ 12%] tests/test_backend.py::TestDjangoRedisCache::test_set_many PASSED [ 13%] tests/test_backend.py::TestDjangoRedisCache::test_set_call_empty_pipeline PASSED [ 14%] tests/test_backend.py::TestDjangoRedisCache::test_delete PASSED [ 14%] tests/test_backend.py::TestDjangoRedisCache::test_delete_return_value_type_new31 PASSED [ 15%] tests/test_backend.py::TestDjangoRedisCache::test_delete_return_value_type_before31 PASSED [ 16%] tests/test_backend.py::TestDjangoRedisCache::test_delete_many PASSED [ 17%] tests/test_backend.py::TestDjangoRedisCache::test_delete_many_generator PASSED [ 17%] tests/test_backend.py::TestDjangoRedisCache::test_delete_many_empty_generator PASSED [ 18%] tests/test_backend.py::TestDjangoRedisCache::test_incr PASSED [ 19%] tests/test_backend.py::TestDjangoRedisCache::test_incr_no_timeout PASSED [ 20%] tests/test_backend.py::TestDjangoRedisCache::test_incr_error PASSED [ 21%] tests/test_backend.py::TestDjangoRedisCache::test_incr_ignore_check PASSED [ 21%] tests/test_backend.py::TestDjangoRedisCache::test_get_set_bool PASSED [ 22%] tests/test_backend.py::TestDjangoRedisCache::test_decr PASSED [ 23%] tests/test_backend.py::TestDjangoRedisCache::test_version PASSED [ 24%] tests/test_backend.py::TestDjangoRedisCache::test_incr_version PASSED [ 25%] tests/test_backend.py::TestDjangoRedisCache::test_ttl_incr_version_no_timeout PASSED [ 25%] tests/test_backend.py::TestDjangoRedisCache::test_delete_pattern PASSED [ 26%] tests/test_backend.py::TestDjangoRedisCache::test_delete_pattern_with_custom_count PASSED [ 27%] tests/test_backend.py::TestDjangoRedisCache::test_delete_pattern_with_settings_default_scan_count PASSED [ 28%] tests/test_backend.py::TestDjangoRedisCache::test_close PASSED [ 28%] tests/test_backend.py::TestDjangoRedisCache::test_close_client PASSED [ 29%] tests/test_backend.py::TestDjangoRedisCache::test_ttl PASSED [ 30%] tests/test_backend.py::TestDjangoRedisCache::test_pttl PASSED [ 31%] tests/test_backend.py::TestDjangoRedisCache::test_persist PASSED [ 32%] tests/test_backend.py::TestDjangoRedisCache::test_expire PASSED [ 32%] tests/test_backend.py::TestDjangoRedisCache::test_pexpire PASSED [ 33%] tests/test_backend.py::TestDjangoRedisCache::test_pexpire_at PASSED [ 34%] tests/test_backend.py::TestDjangoRedisCache::test_expire_at PASSED [ 35%] tests/test_backend.py::TestDjangoRedisCache::test_lock PASSED [ 35%] tests/test_backend.py::TestDjangoRedisCache::test_lock_released_by_thread PASSED [ 36%] tests/test_backend.py::TestDjangoRedisCache::test_iter_keys PASSED [ 37%] tests/test_backend.py::TestDjangoRedisCache::test_iter_keys_itersize PASSED [ 38%] tests/test_backend.py::TestDjangoRedisCache::test_iter_keys_generator PASSED [ 39%] tests/test_backend.py::TestDjangoRedisCache::test_primary_replica_switching PASSED [ 39%] tests/test_backend.py::TestDjangoRedisCache::test_touch_zero_timeout FAILED [ 40%] tests/test_backend.py::TestDjangoRedisCache::test_touch_zero_timeout ERROR [ 40%] tests/test_backend.py::TestDjangoRedisCache::test_touch_positive_timeout FAILED [ 41%] tests/test_backend.py::TestDjangoRedisCache::test_touch_positive_timeout ERROR [ 41%] tests/test_backend.py::TestDjangoRedisCache::test_touch_negative_timeout FAILED [ 42%] tests/test_backend.py::TestDjangoRedisCache::test_touch_negative_timeout ERROR [ 42%] tests/test_backend.py::TestDjangoRedisCache::test_touch_missed_key FAILED [ 42%] tests/test_backend.py::TestDjangoRedisCache::test_touch_missed_key ERROR [ 42%] tests/test_backend.py::TestDjangoRedisCache::test_touch_forever FAILED [ 43%] tests/test_backend.py::TestDjangoRedisCache::test_touch_forever ERROR [ 43%] tests/test_backend.py::TestDjangoRedisCache::test_touch_forever_nonexistent FAILED [ 44%] tests/test_backend.py::TestDjangoRedisCache::test_touch_forever_nonexistent ERROR [ 44%] tests/test_backend.py::TestDjangoRedisCache::test_touch_default_timeout FAILED [ 45%] tests/test_backend.py::TestDjangoRedisCache::test_touch_default_timeout ERROR [ 45%] tests/test_backend.py::TestDjangoRedisCache::test_clear FAILED [ 46%] tests/test_backend.py::TestDjangoRedisCache::test_clear ERROR [ 46%] tests/test_cache_options.py::test_get_django_omit_exceptions_many_returns_default_arg PASSED [ 46%] tests/test_cache_options.py::test_get_django_omit_exceptions PASSED [ 47%] tests/test_cache_options.py::test_get_django_omit_exceptions_priority_1 PASSED [ 48%] tests/test_cache_options.py::test_get_django_omit_exceptions_priority_2 PASSED [ 49%] tests/test_cache_options.py::TestDjangoRedisCacheEscapePrefix::test_delete_pattern FAILED [ 50%] tests/test_cache_options.py::TestDjangoRedisCacheEscapePrefix::test_delete_pattern ERROR [ 50%] tests/test_cache_options.py::TestDjangoRedisCacheEscapePrefix::test_iter_keys FAILED [ 50%] tests/test_cache_options.py::TestDjangoRedisCacheEscapePrefix::test_iter_keys ERROR [ 50%] tests/test_cache_options.py::TestDjangoRedisCacheEscapePrefix::test_keys FAILED [ 51%] tests/test_cache_options.py::TestDjangoRedisCacheEscapePrefix::test_keys ERROR [ 51%] tests/test_cache_options.py::test_custom_key_function FAILED [ 52%] tests/test_cache_options.py::test_custom_key_function ERROR [ 52%] tests/test_client.py::TestClientClose::test_close_client_disconnect_default ERROR [ 53%] tests/test_client.py::TestClientClose::test_close_client_disconnect_default ERROR [ 53%] tests/test_client.py::TestClientClose::test_close_disconnect_settings ERROR [ 53%] tests/test_client.py::TestClientClose::test_close_disconnect_settings ERROR [ 53%] tests/test_client.py::TestClientClose::test_close_disconnect_settings_cache ERROR [ 54%] tests/test_client.py::TestClientClose::test_close_disconnect_settings_cache ERROR [ 54%] tests/test_client.py::TestClientClose::test_close_disconnect_client_options ERROR [ 55%] tests/test_client.py::TestClientClose::test_close_disconnect_client_options ERROR [ 55%] tests/test_client.py::TestDefaultClient::test_delete_pattern_calls_get_client_given_no_client PASSED [ 56%] tests/test_client.py::TestDefaultClient::test_delete_pattern_calls_make_pattern PASSED [ 57%] tests/test_client.py::TestDefaultClient::test_delete_pattern_calls_scan_iter_with_count_if_itersize_given PASSED [ 57%] tests/test_client.py::TestDefaultClient::test_delete_pattern_calls_pipeline_delete_and_execute PASSED [ 58%] tests/test_client.py::TestShardClient::test_delete_pattern_calls_scan_iter_with_count_if_itersize_given PASSED [ 59%] tests/test_client.py::TestShardClient::test_delete_pattern_calls_scan_iter PASSED [ 60%] tests/test_client.py::TestShardClient::test_delete_pattern_calls_delete_for_given_keys PASSED [ 60%] tests/test_connection_factory.py::test_connection_factory_redefine_from_opts PASSED [ 61%] tests/test_connection_factory.py::test_connection_factory_opts[django_redis.pool.SentinelConnectionFactory-SentinelConnectionFactory] PASSED [ 62%] tests/test_connection_factory.py::test_connection_factory_opts[django_redis.pool.ConnectionFactory-ConnectionFactory] PASSED [ 63%] tests/test_connection_factory.py::test_connection_factory_path[django_redis.pool.SentinelConnectionFactory-SentinelConnectionFactory] PASSED [ 64%] tests/test_connection_factory.py::test_connection_factory_path[django_redis.pool.ConnectionFactory-ConnectionFactory] PASSED [ 64%] tests/test_connection_factory.py::test_connection_factory_no_sentinels PASSED [ 65%] tests/test_connection_string.py::test_connection_strings[unix://tmp/foo.bar?db=1] PASSED [ 66%] tests/test_connection_string.py::test_connection_strings[redis://localhost/2] PASSED [ 67%] tests/test_connection_string.py::test_connection_strings[rediss://localhost:3333?db=2] PASSED [ 67%] tests/test_hashring.py::test_hashring PASSED [ 68%] tests/test_hashring.py::test_hashring_brute_force PASSED [ 69%] tests/test_serializers.py::TestPickleSerializer::test_invalid_pickle_version_provided PASSED [ 70%] tests/test_serializers.py::TestPickleSerializer::test_setup_pickle_version_not_explicitly_specified PASSED [ 71%] tests/test_serializers.py::TestPickleSerializer::test_setup_pickle_version_too_high PASSED [ 71%] tests/test_session.py::SessionTests::test_actual_expiry SKIPPED (Pic...) [ 72%] tests/test_session.py::SessionTests::test_clear PASSED [ 73%] tests/test_session.py::SessionTests::test_custom_expiry_datetime PASSED [ 74%] tests/test_session.py::SessionTests::test_custom_expiry_reset PASSED [ 75%] tests/test_session.py::SessionTests::test_custom_expiry_seconds PASSED [ 75%] tests/test_session.py::SessionTests::test_custom_expiry_timedelta PASSED [ 76%] tests/test_session.py::SessionTests::test_cycle FAILED [ 77%] tests/test_session.py::SessionTests::test_cycle ERROR [ 77%] tests/test_session.py::SessionTests::test_cycle_with_no_session_cache FAILED [ 78%] tests/test_session.py::SessionTests::test_cycle_with_no_session_cache ERROR [ 78%] tests/test_session.py::SessionTests::test_decode PASSED [ 78%] tests/test_session.py::SessionTests::test_decode_failure_logged_to_security PASSED [ 79%] tests/test_session.py::SessionTests::test_default_expiry PASSED [ 80%] tests/test_session.py::SessionTests::test_delete FAILED [ 81%] tests/test_session.py::SessionTests::test_delete ERROR [ 81%] tests/test_session.py::SessionTests::test_flush FAILED [ 82%] tests/test_session.py::SessionTests::test_flush ERROR [ 82%] tests/test_session.py::SessionTests::test_get_empty PASSED [ 82%] tests/test_session.py::SessionTests::test_get_expire_at_browser_close PASSED [ 83%] tests/test_session.py::SessionTests::test_has_key PASSED [ 84%] tests/test_session.py::SessionTests::test_invalid_key FAILED [ 85%] tests/test_session.py::SessionTests::test_items PASSED [ 85%] tests/test_session.py::SessionTests::test_keys PASSED [ 86%] tests/test_session.py::SessionTests::test_new_session PASSED [ 87%] tests/test_session.py::SessionTests::test_pop PASSED [ 88%] tests/test_session.py::SessionTests::test_pop_default PASSED [ 89%] tests/test_session.py::SessionTests::test_pop_default_named_argument PASSED [ 89%] tests/test_session.py::SessionTests::test_pop_no_default_keyerror_raised PASSED [ 90%] tests/test_session.py::SessionTests::test_save FAILED [ 91%] tests/test_session.py::SessionTests::test_save ERROR [ 91%] tests/test_session.py::SessionTests::test_save_doesnt_clear_data FAILED [ 92%] tests/test_session.py::SessionTests::test_save_doesnt_clear_data ERROR [ 92%] tests/test_session.py::SessionTests::test_session_key_empty_string_invalid PASSED [ 92%] tests/test_session.py::SessionTests::test_session_key_is_read_only PASSED [ 93%] tests/test_session.py::SessionTests::test_session_key_too_short_invalid PASSED [ 94%] tests/test_session.py::SessionTests::test_session_key_valid_string_saved FAILED [ 95%] tests/test_session.py::SessionTests::test_session_load_does_not_create_record PASSED [ 96%] tests/test_session.py::SessionTests::test_session_save_does_not_resurrect_session_logged_out_in_other_context FAILED [ 96%] tests/test_session.py::SessionTests::test_setdefault PASSED [ 97%] tests/test_session.py::SessionTests::test_store PASSED [ 98%] tests/test_session.py::SessionTests::test_update PASSED [ 99%] tests/test_session.py::SessionTests::test_values PASSED [100%] ==================================== ERRORS ==================================== ______ ERROR at teardown of TestDjangoRedisCache.test_touch_zero_timeout _______ self = , args = () kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:118: in clear return self.client.clear() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = client = )>)> def clear(self, client: Optional[Redis] = None) -> None: """ Flush all cache keys. """ if client is None: client = self.get_client(write=True) try: client.flushdb() except _main_exceptions as e: > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:438: ConnectionInterrupted During handling of the above exception, another exception occurred: @pytest.fixture def cache() -> Iterable[BaseCache]: yield default_cache > default_cache.clear() tests/conftest.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:436: in clear client.flushdb() /usr/lib/python3.12/site-packages/redis/commands/core.py:948: in flushdb return self.execute_command("FLUSHDB", *args, **kwargs) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError ____ ERROR at teardown of TestDjangoRedisCache.test_touch_positive_timeout _____ self = , args = () kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:118: in clear return self.client.clear() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = client = )>)> def clear(self, client: Optional[Redis] = None) -> None: """ Flush all cache keys. """ if client is None: client = self.get_client(write=True) try: client.flushdb() except _main_exceptions as e: > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:438: ConnectionInterrupted During handling of the above exception, another exception occurred: @pytest.fixture def cache() -> Iterable[BaseCache]: yield default_cache > default_cache.clear() tests/conftest.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:436: in clear client.flushdb() /usr/lib/python3.12/site-packages/redis/commands/core.py:948: in flushdb return self.execute_command("FLUSHDB", *args, **kwargs) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError ____ ERROR at teardown of TestDjangoRedisCache.test_touch_negative_timeout _____ self = , args = () kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:118: in clear return self.client.clear() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = client = )>)> def clear(self, client: Optional[Redis] = None) -> None: """ Flush all cache keys. """ if client is None: client = self.get_client(write=True) try: client.flushdb() except _main_exceptions as e: > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:438: ConnectionInterrupted During handling of the above exception, another exception occurred: @pytest.fixture def cache() -> Iterable[BaseCache]: yield default_cache > default_cache.clear() tests/conftest.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:436: in clear client.flushdb() /usr/lib/python3.12/site-packages/redis/commands/core.py:948: in flushdb return self.execute_command("FLUSHDB", *args, **kwargs) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError _______ ERROR at teardown of TestDjangoRedisCache.test_touch_missed_key ________ self = , args = () kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:118: in clear return self.client.clear() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = client = )>)> def clear(self, client: Optional[Redis] = None) -> None: """ Flush all cache keys. """ if client is None: client = self.get_client(write=True) try: client.flushdb() except _main_exceptions as e: > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:438: ConnectionInterrupted During handling of the above exception, another exception occurred: @pytest.fixture def cache() -> Iterable[BaseCache]: yield default_cache > default_cache.clear() tests/conftest.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:436: in clear client.flushdb() /usr/lib/python3.12/site-packages/redis/commands/core.py:948: in flushdb return self.execute_command("FLUSHDB", *args, **kwargs) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError _________ ERROR at teardown of TestDjangoRedisCache.test_touch_forever _________ self = , args = () kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:118: in clear return self.client.clear() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = client = )>)> def clear(self, client: Optional[Redis] = None) -> None: """ Flush all cache keys. """ if client is None: client = self.get_client(write=True) try: client.flushdb() except _main_exceptions as e: > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:438: ConnectionInterrupted During handling of the above exception, another exception occurred: @pytest.fixture def cache() -> Iterable[BaseCache]: yield default_cache > default_cache.clear() tests/conftest.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:436: in clear client.flushdb() /usr/lib/python3.12/site-packages/redis/commands/core.py:948: in flushdb return self.execute_command("FLUSHDB", *args, **kwargs) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError ___ ERROR at teardown of TestDjangoRedisCache.test_touch_forever_nonexistent ___ self = , args = () kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:118: in clear return self.client.clear() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = client = )>)> def clear(self, client: Optional[Redis] = None) -> None: """ Flush all cache keys. """ if client is None: client = self.get_client(write=True) try: client.flushdb() except _main_exceptions as e: > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:438: ConnectionInterrupted During handling of the above exception, another exception occurred: @pytest.fixture def cache() -> Iterable[BaseCache]: yield default_cache > default_cache.clear() tests/conftest.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:436: in clear client.flushdb() /usr/lib/python3.12/site-packages/redis/commands/core.py:948: in flushdb return self.execute_command("FLUSHDB", *args, **kwargs) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError _____ ERROR at teardown of TestDjangoRedisCache.test_touch_default_timeout _____ self = , args = () kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:118: in clear return self.client.clear() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = client = )>)> def clear(self, client: Optional[Redis] = None) -> None: """ Flush all cache keys. """ if client is None: client = self.get_client(write=True) try: client.flushdb() except _main_exceptions as e: > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:438: ConnectionInterrupted During handling of the above exception, another exception occurred: @pytest.fixture def cache() -> Iterable[BaseCache]: yield default_cache > default_cache.clear() tests/conftest.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:436: in clear client.flushdb() /usr/lib/python3.12/site-packages/redis/commands/core.py:948: in flushdb return self.execute_command("FLUSHDB", *args, **kwargs) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError _____________ ERROR at teardown of TestDjangoRedisCache.test_clear _____________ self = , args = () kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:118: in clear return self.client.clear() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = client = )>)> def clear(self, client: Optional[Redis] = None) -> None: """ Flush all cache keys. """ if client is None: client = self.get_client(write=True) try: client.flushdb() except _main_exceptions as e: > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:438: ConnectionInterrupted During handling of the above exception, another exception occurred: @pytest.fixture def cache() -> Iterable[BaseCache]: yield default_cache > default_cache.clear() tests/conftest.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:436: in clear client.flushdb() /usr/lib/python3.12/site-packages/redis/commands/core.py:948: in flushdb return self.execute_command("FLUSHDB", *args, **kwargs) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError __ ERROR at teardown of TestDjangoRedisCacheEscapePrefix.test_delete_pattern ___ + Exception Group Traceback (most recent call last): | File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call | result: TResult | None = func() | ^^^^^^ | File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 242, in | lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 513, in __call__ | return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 120, in _hookexec | return self._inner_hookexec(hook_name, methods, kwargs, firstresult) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 139, in _multicall | raise exception.with_traceback(exception.__traceback__) | File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 122, in _multicall | teardown.throw(exception) # type: ignore[union-attr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/_pytest/threadexception.py", line 97, in pytest_runtest_teardown | yield from thread_exception_runtest_hook() | File "/usr/lib/python3.12/site-packages/_pytest/threadexception.py", line 68, in thread_exception_runtest_hook | yield | File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 122, in _multicall | teardown.throw(exception) # type: ignore[union-attr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 100, in pytest_runtest_teardown | yield from unraisable_exception_runtest_hook() | File "/usr/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 70, in unraisable_exception_runtest_hook | yield | File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 122, in _multicall | teardown.throw(exception) # type: ignore[union-attr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/_pytest/logging.py", line 853, in pytest_runtest_teardown | yield from self._runtest_for(item, "teardown") | File "/usr/lib/python3.12/site-packages/_pytest/logging.py", line 829, in _runtest_for | yield | File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 122, in _multicall | teardown.throw(exception) # type: ignore[union-attr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/_pytest/capture.py", line 903, in pytest_runtest_teardown | return (yield) | ^^^^^ | File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 103, in _multicall | res = hook_impl.function(*args) | ^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 189, in pytest_runtest_teardown | item.session._setupstate.teardown_exact(nextitem) | File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 557, in teardown_exact | raise exceptions[0] | ExceptionGroup: errors while tearing down (2 sub-exceptions) +-+---------------- 1 ---------------- | Traceback (most recent call last): | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/django_redis/cache.py", line 29, in _decorator | return method(self, *args, **kwargs) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/django_redis/cache.py", line 118, in clear | return self.client.clear() | ^^^^^^^^^^^^^^^^^^^ | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/django_redis/client/default.py", line 438, in clear | raise ConnectionInterrupted(connection=client) from e | django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. | | During handling of the above exception, another exception occurred: | | Traceback (most recent call last): | File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 546, in teardown_exact | fin() | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 1032, in finish | raise exceptions[0] | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 1021, in finish | fin() | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 907, in _teardown_yield_fixture | next(it) | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/tests/conftest.py", line 12, in cache | default_cache.clear() | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/django_redis/cache.py", line 36, in _decorator | raise e.__cause__ | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/django_redis/client/default.py", line 436, in clear | client.flushdb() | File "/usr/lib/python3.12/site-packages/redis/commands/core.py", line 948, in flushdb | return self.execute_command("FLUSHDB", *args, **kwargs) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/client.py", line 622, in execute_command | return self._execute_command(*args, **options) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/client.py", line 633, in _execute_command | return conn.retry.call_with_retry( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/retry.py", line 87, in call_with_retry | return do() | ^^^^ | File "/usr/lib/python3.12/site-packages/redis/client.py", line 634, in | lambda: self._send_command_parse_response( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/client.py", line 605, in _send_command_parse_response | return self.parse_response(conn, command_name, **options) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/client.py", line 652, in parse_response | response = connection.read_response() | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/connection.py", line 666, in read_response | raise response | redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. +---------------- 2 ---------------- | Traceback (most recent call last): | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/django_redis/cache.py", line 29, in _decorator | return method(self, *args, **kwargs) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/django_redis/cache.py", line 118, in clear | return self.client.clear() | ^^^^^^^^^^^^^^^^^^^ | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/django_redis/client/default.py", line 438, in clear | raise ConnectionInterrupted(connection=client) from e | django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. | | During handling of the above exception, another exception occurred: | | Traceback (most recent call last): | File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 546, in teardown_exact | fin() | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 1032, in finish | raise exceptions[0] | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 1021, in finish | fin() | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 907, in _teardown_yield_fixture | next(it) | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/tests/test_cache_options.py", line 92, in with_prefix_cache | with_prefix.clear() | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/django_redis/cache.py", line 36, in _decorator | raise e.__cause__ | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/django_redis/client/default.py", line 436, in clear | client.flushdb() | File "/usr/lib/python3.12/site-packages/redis/commands/core.py", line 948, in flushdb | return self.execute_command("FLUSHDB", *args, **kwargs) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/client.py", line 622, in execute_command | return self._execute_command(*args, **options) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/client.py", line 633, in _execute_command | return conn.retry.call_with_retry( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/retry.py", line 87, in call_with_retry | return do() | ^^^^ | File "/usr/lib/python3.12/site-packages/redis/client.py", line 634, in | lambda: self._send_command_parse_response( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/client.py", line 605, in _send_command_parse_response | return self.parse_response(conn, command_name, **options) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/client.py", line 652, in parse_response | response = connection.read_response() | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/connection.py", line 666, in read_response | raise response | redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. +------------------------------------ _____ ERROR at teardown of TestDjangoRedisCacheEscapePrefix.test_iter_keys _____ + Exception Group Traceback (most recent call last): | File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call | result: TResult | None = func() | ^^^^^^ | File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 242, in | lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 513, in __call__ | return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 120, in _hookexec | return self._inner_hookexec(hook_name, methods, kwargs, firstresult) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 139, in _multicall | raise exception.with_traceback(exception.__traceback__) | File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 122, in _multicall | teardown.throw(exception) # type: ignore[union-attr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/_pytest/threadexception.py", line 97, in pytest_runtest_teardown | yield from thread_exception_runtest_hook() | File "/usr/lib/python3.12/site-packages/_pytest/threadexception.py", line 68, in thread_exception_runtest_hook | yield | File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 122, in _multicall | teardown.throw(exception) # type: ignore[union-attr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 100, in pytest_runtest_teardown | yield from unraisable_exception_runtest_hook() | File "/usr/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 70, in unraisable_exception_runtest_hook | yield | File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 122, in _multicall | teardown.throw(exception) # type: ignore[union-attr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/_pytest/logging.py", line 853, in pytest_runtest_teardown | yield from self._runtest_for(item, "teardown") | File "/usr/lib/python3.12/site-packages/_pytest/logging.py", line 829, in _runtest_for | yield | File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 122, in _multicall | teardown.throw(exception) # type: ignore[union-attr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/_pytest/capture.py", line 903, in pytest_runtest_teardown | return (yield) | ^^^^^ | File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 103, in _multicall | res = hook_impl.function(*args) | ^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 189, in pytest_runtest_teardown | item.session._setupstate.teardown_exact(nextitem) | File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 557, in teardown_exact | raise exceptions[0] | ExceptionGroup: errors while tearing down (2 sub-exceptions) +-+---------------- 1 ---------------- | Traceback (most recent call last): | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/django_redis/cache.py", line 29, in _decorator | return method(self, *args, **kwargs) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/django_redis/cache.py", line 118, in clear | return self.client.clear() | ^^^^^^^^^^^^^^^^^^^ | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/django_redis/client/default.py", line 438, in clear | raise ConnectionInterrupted(connection=client) from e | django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. | | During handling of the above exception, another exception occurred: | | Traceback (most recent call last): | File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 546, in teardown_exact | fin() | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 1032, in finish | raise exceptions[0] | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 1021, in finish | fin() | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 907, in _teardown_yield_fixture | next(it) | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/tests/conftest.py", line 12, in cache | default_cache.clear() | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/django_redis/cache.py", line 36, in _decorator | raise e.__cause__ | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/django_redis/client/default.py", line 436, in clear | client.flushdb() | File "/usr/lib/python3.12/site-packages/redis/commands/core.py", line 948, in flushdb | return self.execute_command("FLUSHDB", *args, **kwargs) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/client.py", line 622, in execute_command | return self._execute_command(*args, **options) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/client.py", line 633, in _execute_command | return conn.retry.call_with_retry( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/retry.py", line 87, in call_with_retry | return do() | ^^^^ | File "/usr/lib/python3.12/site-packages/redis/client.py", line 634, in | lambda: self._send_command_parse_response( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/client.py", line 605, in _send_command_parse_response | return self.parse_response(conn, command_name, **options) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/client.py", line 652, in parse_response | response = connection.read_response() | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/connection.py", line 666, in read_response | raise response | redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. +---------------- 2 ---------------- | Traceback (most recent call last): | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/django_redis/cache.py", line 29, in _decorator | return method(self, *args, **kwargs) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/django_redis/cache.py", line 118, in clear | return self.client.clear() | ^^^^^^^^^^^^^^^^^^^ | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/django_redis/client/default.py", line 438, in clear | raise ConnectionInterrupted(connection=client) from e | django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. | | During handling of the above exception, another exception occurred: | | Traceback (most recent call last): | File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 546, in teardown_exact | fin() | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 1032, in finish | raise exceptions[0] | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 1021, in finish | fin() | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 907, in _teardown_yield_fixture | next(it) | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/tests/test_cache_options.py", line 92, in with_prefix_cache | with_prefix.clear() | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/django_redis/cache.py", line 36, in _decorator | raise e.__cause__ | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/django_redis/client/default.py", line 436, in clear | client.flushdb() | File "/usr/lib/python3.12/site-packages/redis/commands/core.py", line 948, in flushdb | return self.execute_command("FLUSHDB", *args, **kwargs) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/client.py", line 622, in execute_command | return self._execute_command(*args, **options) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/client.py", line 633, in _execute_command | return conn.retry.call_with_retry( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/retry.py", line 87, in call_with_retry | return do() | ^^^^ | File "/usr/lib/python3.12/site-packages/redis/client.py", line 634, in | lambda: self._send_command_parse_response( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/client.py", line 605, in _send_command_parse_response | return self.parse_response(conn, command_name, **options) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/client.py", line 652, in parse_response | response = connection.read_response() | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/connection.py", line 666, in read_response | raise response | redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. +------------------------------------ _______ ERROR at teardown of TestDjangoRedisCacheEscapePrefix.test_keys ________ + Exception Group Traceback (most recent call last): | File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call | result: TResult | None = func() | ^^^^^^ | File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 242, in | lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 513, in __call__ | return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 120, in _hookexec | return self._inner_hookexec(hook_name, methods, kwargs, firstresult) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 139, in _multicall | raise exception.with_traceback(exception.__traceback__) | File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 122, in _multicall | teardown.throw(exception) # type: ignore[union-attr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/_pytest/threadexception.py", line 97, in pytest_runtest_teardown | yield from thread_exception_runtest_hook() | File "/usr/lib/python3.12/site-packages/_pytest/threadexception.py", line 68, in thread_exception_runtest_hook | yield | File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 122, in _multicall | teardown.throw(exception) # type: ignore[union-attr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 100, in pytest_runtest_teardown | yield from unraisable_exception_runtest_hook() | File "/usr/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 70, in unraisable_exception_runtest_hook | yield | File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 122, in _multicall | teardown.throw(exception) # type: ignore[union-attr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/_pytest/logging.py", line 853, in pytest_runtest_teardown | yield from self._runtest_for(item, "teardown") | File "/usr/lib/python3.12/site-packages/_pytest/logging.py", line 829, in _runtest_for | yield | File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 122, in _multicall | teardown.throw(exception) # type: ignore[union-attr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/_pytest/capture.py", line 903, in pytest_runtest_teardown | return (yield) | ^^^^^ | File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 103, in _multicall | res = hook_impl.function(*args) | ^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 189, in pytest_runtest_teardown | item.session._setupstate.teardown_exact(nextitem) | File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 557, in teardown_exact | raise exceptions[0] | ExceptionGroup: errors while tearing down (2 sub-exceptions) +-+---------------- 1 ---------------- | Traceback (most recent call last): | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/django_redis/cache.py", line 29, in _decorator | return method(self, *args, **kwargs) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/django_redis/cache.py", line 118, in clear | return self.client.clear() | ^^^^^^^^^^^^^^^^^^^ | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/django_redis/client/default.py", line 438, in clear | raise ConnectionInterrupted(connection=client) from e | django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. | | During handling of the above exception, another exception occurred: | | Traceback (most recent call last): | File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 546, in teardown_exact | fin() | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 1032, in finish | raise exceptions[0] | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 1021, in finish | fin() | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 907, in _teardown_yield_fixture | next(it) | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/tests/conftest.py", line 12, in cache | default_cache.clear() | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/django_redis/cache.py", line 36, in _decorator | raise e.__cause__ | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/django_redis/client/default.py", line 436, in clear | client.flushdb() | File "/usr/lib/python3.12/site-packages/redis/commands/core.py", line 948, in flushdb | return self.execute_command("FLUSHDB", *args, **kwargs) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/client.py", line 622, in execute_command | return self._execute_command(*args, **options) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/client.py", line 633, in _execute_command | return conn.retry.call_with_retry( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/retry.py", line 87, in call_with_retry | return do() | ^^^^ | File "/usr/lib/python3.12/site-packages/redis/client.py", line 634, in | lambda: self._send_command_parse_response( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/client.py", line 605, in _send_command_parse_response | return self.parse_response(conn, command_name, **options) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/client.py", line 652, in parse_response | response = connection.read_response() | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/connection.py", line 666, in read_response | raise response | redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. +---------------- 2 ---------------- | Traceback (most recent call last): | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/django_redis/cache.py", line 29, in _decorator | return method(self, *args, **kwargs) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/django_redis/cache.py", line 118, in clear | return self.client.clear() | ^^^^^^^^^^^^^^^^^^^ | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/django_redis/client/default.py", line 438, in clear | raise ConnectionInterrupted(connection=client) from e | django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. | | During handling of the above exception, another exception occurred: | | Traceback (most recent call last): | File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 546, in teardown_exact | fin() | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 1032, in finish | raise exceptions[0] | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 1021, in finish | fin() | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 907, in _teardown_yield_fixture | next(it) | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/tests/test_cache_options.py", line 92, in with_prefix_cache | with_prefix.clear() | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/django_redis/cache.py", line 36, in _decorator | raise e.__cause__ | File "/home/udu/aports/community/py3-django-redis/src/django-redis-5.4.0/django_redis/client/default.py", line 436, in clear | client.flushdb() | File "/usr/lib/python3.12/site-packages/redis/commands/core.py", line 948, in flushdb | return self.execute_command("FLUSHDB", *args, **kwargs) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/client.py", line 622, in execute_command | return self._execute_command(*args, **options) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/client.py", line 633, in _execute_command | return conn.retry.call_with_retry( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/retry.py", line 87, in call_with_retry | return do() | ^^^^ | File "/usr/lib/python3.12/site-packages/redis/client.py", line 634, in | lambda: self._send_command_parse_response( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/client.py", line 605, in _send_command_parse_response | return self.parse_response(conn, command_name, **options) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/client.py", line 652, in parse_response | response = connection.read_response() | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/redis/connection.py", line 666, in read_response | raise response | redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. +------------------------------------ ________________ ERROR at teardown of test_custom_key_function _________________ self = , args = () kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:118: in clear return self.client.clear() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = client = )>)> def clear(self, client: Optional[Redis] = None) -> None: """ Flush all cache keys. """ if client is None: client = self.get_client(write=True) try: client.flushdb() except _main_exceptions as e: > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:438: ConnectionInterrupted During handling of the above exception, another exception occurred: @pytest.fixture def cache() -> Iterable[BaseCache]: yield default_cache > default_cache.clear() tests/conftest.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:436: in clear client.flushdb() /usr/lib/python3.12/site-packages/redis/commands/core.py:948: in flushdb return self.execute_command("FLUSHDB", *args, **kwargs) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError ____ ERROR at setup of TestClientClose.test_close_client_disconnect_default ____ self = key = 'TestClientClose', value = 0, timeout = 300000, version = None client = )>)> nx = False, xx = False def set( self, key: Any, value: Any, timeout: Optional[float] = DEFAULT_TIMEOUT, version: Optional[int] = None, client: Optional[Redis] = None, nx: bool = False, xx: bool = False, ) -> bool: """ Persist a value to the cache, and set an optional expiration time. Also supports optional nx parameter. If set to True - will use redis setnx instead of set. """ nkey = self.make_key(key, version=version) nvalue = self.encode(value) if timeout is DEFAULT_TIMEOUT: timeout = self._backend.default_timeout original_client = client tried: List[int] = [] while True: try: if client is None: client, index = self.get_client( write=True, tried=tried, show_index=True ) if timeout is not None: # Convert to milliseconds timeout = int(timeout * 1000) if timeout <= 0: if nx: # Using negative timeouts when nx is True should # not expire (in our case delete) the value if it exists. # Obviously expire not existent value is noop. return not self.has_key(key, version=version, client=client) else: # redis doesn't support negative timeouts in ex flags # so it seems that it's better to just delete the key # than to set it and than expire in a pipeline return bool( self.delete(key, client=client, version=version) ) > return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) django_redis/client/default.py:175: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/redis/commands/core.py:2305: in set return self.execute_command("SET", *pieces, **options) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError The above exception was the direct cause of the following exception: cache = @pytest.fixture def cache_client(cache: RedisCache) -> Iterable[DefaultClient]: client = cache.client > client.set("TestClientClose", 0) tests/test_client.py:16: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = key = 'TestClientClose', value = 0, timeout = 300000, version = None client = )>)> nx = False, xx = False def set( self, key: Any, value: Any, timeout: Optional[float] = DEFAULT_TIMEOUT, version: Optional[int] = None, client: Optional[Redis] = None, nx: bool = False, xx: bool = False, ) -> bool: """ Persist a value to the cache, and set an optional expiration time. Also supports optional nx parameter. If set to True - will use redis setnx instead of set. """ nkey = self.make_key(key, version=version) nvalue = self.encode(value) if timeout is DEFAULT_TIMEOUT: timeout = self._backend.default_timeout original_client = client tried: List[int] = [] while True: try: if client is None: client, index = self.get_client( write=True, tried=tried, show_index=True ) if timeout is not None: # Convert to milliseconds timeout = int(timeout * 1000) if timeout <= 0: if nx: # Using negative timeouts when nx is True should # not expire (in our case delete) the value if it exists. # Obviously expire not existent value is noop. return not self.has_key(key, version=version, client=client) else: # redis doesn't support negative timeouts in ex flags # so it seems that it's better to just delete the key # than to set it and than expire in a pipeline return bool( self.delete(key, client=client, version=version) ) return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) except _main_exceptions as e: if ( not original_client and not self._replica_read_only and len(tried) < len(self._server) ): tried.append(index) client = None continue > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:185: ConnectionInterrupted __ ERROR at teardown of TestClientClose.test_close_client_disconnect_default ___ self = , args = () kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:118: in clear return self.client.clear() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = client = )>)> def clear(self, client: Optional[Redis] = None) -> None: """ Flush all cache keys. """ if client is None: client = self.get_client(write=True) try: client.flushdb() except _main_exceptions as e: > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:438: ConnectionInterrupted During handling of the above exception, another exception occurred: @pytest.fixture def cache() -> Iterable[BaseCache]: yield default_cache > default_cache.clear() tests/conftest.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:436: in clear client.flushdb() /usr/lib/python3.12/site-packages/redis/commands/core.py:948: in flushdb return self.execute_command("FLUSHDB", *args, **kwargs) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError _______ ERROR at setup of TestClientClose.test_close_disconnect_settings _______ self = key = 'TestClientClose', value = 0, timeout = 300000, version = None client = )>)> nx = False, xx = False def set( self, key: Any, value: Any, timeout: Optional[float] = DEFAULT_TIMEOUT, version: Optional[int] = None, client: Optional[Redis] = None, nx: bool = False, xx: bool = False, ) -> bool: """ Persist a value to the cache, and set an optional expiration time. Also supports optional nx parameter. If set to True - will use redis setnx instead of set. """ nkey = self.make_key(key, version=version) nvalue = self.encode(value) if timeout is DEFAULT_TIMEOUT: timeout = self._backend.default_timeout original_client = client tried: List[int] = [] while True: try: if client is None: client, index = self.get_client( write=True, tried=tried, show_index=True ) if timeout is not None: # Convert to milliseconds timeout = int(timeout * 1000) if timeout <= 0: if nx: # Using negative timeouts when nx is True should # not expire (in our case delete) the value if it exists. # Obviously expire not existent value is noop. return not self.has_key(key, version=version, client=client) else: # redis doesn't support negative timeouts in ex flags # so it seems that it's better to just delete the key # than to set it and than expire in a pipeline return bool( self.delete(key, client=client, version=version) ) > return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) django_redis/client/default.py:175: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/redis/commands/core.py:2305: in set return self.execute_command("SET", *pieces, **options) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError The above exception was the direct cause of the following exception: cache = @pytest.fixture def cache_client(cache: RedisCache) -> Iterable[DefaultClient]: client = cache.client > client.set("TestClientClose", 0) tests/test_client.py:16: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = key = 'TestClientClose', value = 0, timeout = 300000, version = None client = )>)> nx = False, xx = False def set( self, key: Any, value: Any, timeout: Optional[float] = DEFAULT_TIMEOUT, version: Optional[int] = None, client: Optional[Redis] = None, nx: bool = False, xx: bool = False, ) -> bool: """ Persist a value to the cache, and set an optional expiration time. Also supports optional nx parameter. If set to True - will use redis setnx instead of set. """ nkey = self.make_key(key, version=version) nvalue = self.encode(value) if timeout is DEFAULT_TIMEOUT: timeout = self._backend.default_timeout original_client = client tried: List[int] = [] while True: try: if client is None: client, index = self.get_client( write=True, tried=tried, show_index=True ) if timeout is not None: # Convert to milliseconds timeout = int(timeout * 1000) if timeout <= 0: if nx: # Using negative timeouts when nx is True should # not expire (in our case delete) the value if it exists. # Obviously expire not existent value is noop. return not self.has_key(key, version=version, client=client) else: # redis doesn't support negative timeouts in ex flags # so it seems that it's better to just delete the key # than to set it and than expire in a pipeline return bool( self.delete(key, client=client, version=version) ) return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) except _main_exceptions as e: if ( not original_client and not self._replica_read_only and len(tried) < len(self._server) ): tried.append(index) client = None continue > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:185: ConnectionInterrupted _____ ERROR at teardown of TestClientClose.test_close_disconnect_settings ______ self = , args = () kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:118: in clear return self.client.clear() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = client = )>)> def clear(self, client: Optional[Redis] = None) -> None: """ Flush all cache keys. """ if client is None: client = self.get_client(write=True) try: client.flushdb() except _main_exceptions as e: > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:438: ConnectionInterrupted During handling of the above exception, another exception occurred: @pytest.fixture def cache() -> Iterable[BaseCache]: yield default_cache > default_cache.clear() tests/conftest.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:436: in clear client.flushdb() /usr/lib/python3.12/site-packages/redis/commands/core.py:948: in flushdb return self.execute_command("FLUSHDB", *args, **kwargs) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError ____ ERROR at setup of TestClientClose.test_close_disconnect_settings_cache ____ self = key = 'TestClientClose', value = 0, timeout = 300000, version = None client = )>)> nx = False, xx = False def set( self, key: Any, value: Any, timeout: Optional[float] = DEFAULT_TIMEOUT, version: Optional[int] = None, client: Optional[Redis] = None, nx: bool = False, xx: bool = False, ) -> bool: """ Persist a value to the cache, and set an optional expiration time. Also supports optional nx parameter. If set to True - will use redis setnx instead of set. """ nkey = self.make_key(key, version=version) nvalue = self.encode(value) if timeout is DEFAULT_TIMEOUT: timeout = self._backend.default_timeout original_client = client tried: List[int] = [] while True: try: if client is None: client, index = self.get_client( write=True, tried=tried, show_index=True ) if timeout is not None: # Convert to milliseconds timeout = int(timeout * 1000) if timeout <= 0: if nx: # Using negative timeouts when nx is True should # not expire (in our case delete) the value if it exists. # Obviously expire not existent value is noop. return not self.has_key(key, version=version, client=client) else: # redis doesn't support negative timeouts in ex flags # so it seems that it's better to just delete the key # than to set it and than expire in a pipeline return bool( self.delete(key, client=client, version=version) ) > return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) django_redis/client/default.py:175: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/redis/commands/core.py:2305: in set return self.execute_command("SET", *pieces, **options) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError The above exception was the direct cause of the following exception: cache = @pytest.fixture def cache_client(cache: RedisCache) -> Iterable[DefaultClient]: client = cache.client > client.set("TestClientClose", 0) tests/test_client.py:16: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = key = 'TestClientClose', value = 0, timeout = 300000, version = None client = )>)> nx = False, xx = False def set( self, key: Any, value: Any, timeout: Optional[float] = DEFAULT_TIMEOUT, version: Optional[int] = None, client: Optional[Redis] = None, nx: bool = False, xx: bool = False, ) -> bool: """ Persist a value to the cache, and set an optional expiration time. Also supports optional nx parameter. If set to True - will use redis setnx instead of set. """ nkey = self.make_key(key, version=version) nvalue = self.encode(value) if timeout is DEFAULT_TIMEOUT: timeout = self._backend.default_timeout original_client = client tried: List[int] = [] while True: try: if client is None: client, index = self.get_client( write=True, tried=tried, show_index=True ) if timeout is not None: # Convert to milliseconds timeout = int(timeout * 1000) if timeout <= 0: if nx: # Using negative timeouts when nx is True should # not expire (in our case delete) the value if it exists. # Obviously expire not existent value is noop. return not self.has_key(key, version=version, client=client) else: # redis doesn't support negative timeouts in ex flags # so it seems that it's better to just delete the key # than to set it and than expire in a pipeline return bool( self.delete(key, client=client, version=version) ) return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) except _main_exceptions as e: if ( not original_client and not self._replica_read_only and len(tried) < len(self._server) ): tried.append(index) client = None continue > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:185: ConnectionInterrupted __ ERROR at teardown of TestClientClose.test_close_disconnect_settings_cache ___ self = , args = () kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:118: in clear return self.client.clear() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = client = )>)> def clear(self, client: Optional[Redis] = None) -> None: """ Flush all cache keys. """ if client is None: client = self.get_client(write=True) try: client.flushdb() except _main_exceptions as e: > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:438: ConnectionInterrupted During handling of the above exception, another exception occurred: @pytest.fixture def cache() -> Iterable[BaseCache]: yield default_cache > default_cache.clear() tests/conftest.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:436: in clear client.flushdb() /usr/lib/python3.12/site-packages/redis/commands/core.py:948: in flushdb return self.execute_command("FLUSHDB", *args, **kwargs) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError ____ ERROR at setup of TestClientClose.test_close_disconnect_client_options ____ self = key = 'TestClientClose', value = 0, timeout = 300000, version = None client = )>)> nx = False, xx = False def set( self, key: Any, value: Any, timeout: Optional[float] = DEFAULT_TIMEOUT, version: Optional[int] = None, client: Optional[Redis] = None, nx: bool = False, xx: bool = False, ) -> bool: """ Persist a value to the cache, and set an optional expiration time. Also supports optional nx parameter. If set to True - will use redis setnx instead of set. """ nkey = self.make_key(key, version=version) nvalue = self.encode(value) if timeout is DEFAULT_TIMEOUT: timeout = self._backend.default_timeout original_client = client tried: List[int] = [] while True: try: if client is None: client, index = self.get_client( write=True, tried=tried, show_index=True ) if timeout is not None: # Convert to milliseconds timeout = int(timeout * 1000) if timeout <= 0: if nx: # Using negative timeouts when nx is True should # not expire (in our case delete) the value if it exists. # Obviously expire not existent value is noop. return not self.has_key(key, version=version, client=client) else: # redis doesn't support negative timeouts in ex flags # so it seems that it's better to just delete the key # than to set it and than expire in a pipeline return bool( self.delete(key, client=client, version=version) ) > return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) django_redis/client/default.py:175: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/redis/commands/core.py:2305: in set return self.execute_command("SET", *pieces, **options) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError The above exception was the direct cause of the following exception: cache = @pytest.fixture def cache_client(cache: RedisCache) -> Iterable[DefaultClient]: client = cache.client > client.set("TestClientClose", 0) tests/test_client.py:16: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = key = 'TestClientClose', value = 0, timeout = 300000, version = None client = )>)> nx = False, xx = False def set( self, key: Any, value: Any, timeout: Optional[float] = DEFAULT_TIMEOUT, version: Optional[int] = None, client: Optional[Redis] = None, nx: bool = False, xx: bool = False, ) -> bool: """ Persist a value to the cache, and set an optional expiration time. Also supports optional nx parameter. If set to True - will use redis setnx instead of set. """ nkey = self.make_key(key, version=version) nvalue = self.encode(value) if timeout is DEFAULT_TIMEOUT: timeout = self._backend.default_timeout original_client = client tried: List[int] = [] while True: try: if client is None: client, index = self.get_client( write=True, tried=tried, show_index=True ) if timeout is not None: # Convert to milliseconds timeout = int(timeout * 1000) if timeout <= 0: if nx: # Using negative timeouts when nx is True should # not expire (in our case delete) the value if it exists. # Obviously expire not existent value is noop. return not self.has_key(key, version=version, client=client) else: # redis doesn't support negative timeouts in ex flags # so it seems that it's better to just delete the key # than to set it and than expire in a pipeline return bool( self.delete(key, client=client, version=version) ) return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) except _main_exceptions as e: if ( not original_client and not self._replica_read_only and len(tried) < len(self._server) ): tried.append(index) client = None continue > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:185: ConnectionInterrupted __ ERROR at teardown of TestClientClose.test_close_disconnect_client_options ___ self = , args = () kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:118: in clear return self.client.clear() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = client = )>)> def clear(self, client: Optional[Redis] = None) -> None: """ Flush all cache keys. """ if client is None: client = self.get_client(write=True) try: client.flushdb() except _main_exceptions as e: > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:438: ConnectionInterrupted During handling of the above exception, another exception occurred: @pytest.fixture def cache() -> Iterable[BaseCache]: yield default_cache > default_cache.clear() tests/conftest.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:436: in clear client.flushdb() /usr/lib/python3.12/site-packages/redis/commands/core.py:948: in flushdb return self.execute_command("FLUSHDB", *args, **kwargs) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError _________________ ERROR at teardown of SessionTests.test_cycle _________________ self = args = ('django.contrib.sessions.cacheobogf60a42cjeqh1ys7p59n46nllojm6',) kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:104: in delete result = self.client.delete(*args, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = key = 'django.contrib.sessions.cacheobogf60a42cjeqh1ys7p59n46nllojm6' version = None, prefix = None client = )>)> def delete( self, key: Any, version: Optional[int] = None, prefix: Optional[str] = None, client: Optional[Redis] = None, ) -> int: """ Remove a key from the cache. """ if client is None: client = self.get_client(write=True) try: return client.delete(self.make_key(key, version=version, prefix=prefix)) except _main_exceptions as e: > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:375: ConnectionInterrupted During handling of the above exception, another exception occurred: self = def tearDown(self): # NB: be careful to delete any sessions created; stale sessions fill up # the /tmp (with some backends) and eventually overwhelm it after lots # of runs (think buildbots) > self.session.delete() tests/test_session.py:36: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/django/contrib/sessions/backends/cache.py:81: in delete self._cache.delete(self.cache_key_prefix + session_key) django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:373: in delete return client.delete(self.make_key(key, version=version, prefix=prefix)) /usr/lib/python3.12/site-packages/redis/commands/core.py:1712: in delete return self.execute_command("DEL", *names) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError ______ ERROR at teardown of SessionTests.test_cycle_with_no_session_cache ______ self = args = ('django.contrib.sessions.cachelr3gbdmre7fah24g9dt60t1oft8kgrra',) kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:104: in delete result = self.client.delete(*args, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = key = 'django.contrib.sessions.cachelr3gbdmre7fah24g9dt60t1oft8kgrra' version = None, prefix = None client = )>)> def delete( self, key: Any, version: Optional[int] = None, prefix: Optional[str] = None, client: Optional[Redis] = None, ) -> int: """ Remove a key from the cache. """ if client is None: client = self.get_client(write=True) try: return client.delete(self.make_key(key, version=version, prefix=prefix)) except _main_exceptions as e: > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:375: ConnectionInterrupted During handling of the above exception, another exception occurred: self = def tearDown(self): # NB: be careful to delete any sessions created; stale sessions fill up # the /tmp (with some backends) and eventually overwhelm it after lots # of runs (think buildbots) > self.session.delete() tests/test_session.py:36: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/django/contrib/sessions/backends/cache.py:81: in delete self._cache.delete(self.cache_key_prefix + session_key) django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:373: in delete return client.delete(self.make_key(key, version=version, prefix=prefix)) /usr/lib/python3.12/site-packages/redis/commands/core.py:1712: in delete return self.execute_command("DEL", *names) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError ________________ ERROR at teardown of SessionTests.test_delete _________________ self = args = ('django.contrib.sessions.cachecemttwvri20jtrnsow4xqoi0h45kduqs',) kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:104: in delete result = self.client.delete(*args, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = key = 'django.contrib.sessions.cachecemttwvri20jtrnsow4xqoi0h45kduqs' version = None, prefix = None client = )>)> def delete( self, key: Any, version: Optional[int] = None, prefix: Optional[str] = None, client: Optional[Redis] = None, ) -> int: """ Remove a key from the cache. """ if client is None: client = self.get_client(write=True) try: return client.delete(self.make_key(key, version=version, prefix=prefix)) except _main_exceptions as e: > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:375: ConnectionInterrupted During handling of the above exception, another exception occurred: self = def tearDown(self): # NB: be careful to delete any sessions created; stale sessions fill up # the /tmp (with some backends) and eventually overwhelm it after lots # of runs (think buildbots) > self.session.delete() tests/test_session.py:36: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/django/contrib/sessions/backends/cache.py:81: in delete self._cache.delete(self.cache_key_prefix + session_key) django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:373: in delete return client.delete(self.make_key(key, version=version, prefix=prefix)) /usr/lib/python3.12/site-packages/redis/commands/core.py:1712: in delete return self.execute_command("DEL", *names) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError _________________ ERROR at teardown of SessionTests.test_flush _________________ self = args = ('django.contrib.sessions.cachey9a93w1z9yibi5wbxqyfumpx8m252iel',) kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:104: in delete result = self.client.delete(*args, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = key = 'django.contrib.sessions.cachey9a93w1z9yibi5wbxqyfumpx8m252iel' version = None, prefix = None client = )>)> def delete( self, key: Any, version: Optional[int] = None, prefix: Optional[str] = None, client: Optional[Redis] = None, ) -> int: """ Remove a key from the cache. """ if client is None: client = self.get_client(write=True) try: return client.delete(self.make_key(key, version=version, prefix=prefix)) except _main_exceptions as e: > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:375: ConnectionInterrupted During handling of the above exception, another exception occurred: self = def tearDown(self): # NB: be careful to delete any sessions created; stale sessions fill up # the /tmp (with some backends) and eventually overwhelm it after lots # of runs (think buildbots) > self.session.delete() tests/test_session.py:36: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/django/contrib/sessions/backends/cache.py:81: in delete self._cache.delete(self.cache_key_prefix + session_key) django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:373: in delete return client.delete(self.make_key(key, version=version, prefix=prefix)) /usr/lib/python3.12/site-packages/redis/commands/core.py:1712: in delete return self.execute_command("DEL", *names) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError _________________ ERROR at teardown of SessionTests.test_save __________________ self = args = ('django.contrib.sessions.cachek6u33ke08wb3ptx6j36dca5f5swlx227',) kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:104: in delete result = self.client.delete(*args, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = key = 'django.contrib.sessions.cachek6u33ke08wb3ptx6j36dca5f5swlx227' version = None, prefix = None client = )>)> def delete( self, key: Any, version: Optional[int] = None, prefix: Optional[str] = None, client: Optional[Redis] = None, ) -> int: """ Remove a key from the cache. """ if client is None: client = self.get_client(write=True) try: return client.delete(self.make_key(key, version=version, prefix=prefix)) except _main_exceptions as e: > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:375: ConnectionInterrupted During handling of the above exception, another exception occurred: self = def tearDown(self): # NB: be careful to delete any sessions created; stale sessions fill up # the /tmp (with some backends) and eventually overwhelm it after lots # of runs (think buildbots) > self.session.delete() tests/test_session.py:36: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/django/contrib/sessions/backends/cache.py:81: in delete self._cache.delete(self.cache_key_prefix + session_key) django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:373: in delete return client.delete(self.make_key(key, version=version, prefix=prefix)) /usr/lib/python3.12/site-packages/redis/commands/core.py:1712: in delete return self.execute_command("DEL", *names) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError ________ ERROR at teardown of SessionTests.test_save_doesnt_clear_data _________ self = args = ('django.contrib.sessions.cacheux90ng6qqfc8kp3n36iwyt06fyhosq46',) kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:104: in delete result = self.client.delete(*args, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = key = 'django.contrib.sessions.cacheux90ng6qqfc8kp3n36iwyt06fyhosq46' version = None, prefix = None client = )>)> def delete( self, key: Any, version: Optional[int] = None, prefix: Optional[str] = None, client: Optional[Redis] = None, ) -> int: """ Remove a key from the cache. """ if client is None: client = self.get_client(write=True) try: return client.delete(self.make_key(key, version=version, prefix=prefix)) except _main_exceptions as e: > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:375: ConnectionInterrupted During handling of the above exception, another exception occurred: self = def tearDown(self): # NB: be careful to delete any sessions created; stale sessions fill up # the /tmp (with some backends) and eventually overwhelm it after lots # of runs (think buildbots) > self.session.delete() tests/test_session.py:36: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/django/contrib/sessions/backends/cache.py:81: in delete self._cache.delete(self.cache_key_prefix + session_key) django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:373: in delete return client.delete(self.make_key(key, version=version, prefix=prefix)) /usr/lib/python3.12/site-packages/redis/commands/core.py:1712: in delete return self.execute_command("DEL", *names) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError =================================== FAILURES =================================== _________________ TestDjangoRedisCache.test_touch_zero_timeout _________________ self = args = ('test_key', 222), kwargs = {'timeout': 10} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:81: in set return self.client.set(*args, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = key = 'test_key', value = 222, timeout = 10000, version = None client = )>)> nx = False, xx = False def set( self, key: Any, value: Any, timeout: Optional[float] = DEFAULT_TIMEOUT, version: Optional[int] = None, client: Optional[Redis] = None, nx: bool = False, xx: bool = False, ) -> bool: """ Persist a value to the cache, and set an optional expiration time. Also supports optional nx parameter. If set to True - will use redis setnx instead of set. """ nkey = self.make_key(key, version=version) nvalue = self.encode(value) if timeout is DEFAULT_TIMEOUT: timeout = self._backend.default_timeout original_client = client tried: List[int] = [] while True: try: if client is None: client, index = self.get_client( write=True, tried=tried, show_index=True ) if timeout is not None: # Convert to milliseconds timeout = int(timeout * 1000) if timeout <= 0: if nx: # Using negative timeouts when nx is True should # not expire (in our case delete) the value if it exists. # Obviously expire not existent value is noop. return not self.has_key(key, version=version, client=client) else: # redis doesn't support negative timeouts in ex flags # so it seems that it's better to just delete the key # than to set it and than expire in a pipeline return bool( self.delete(key, client=client, version=version) ) return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) except _main_exceptions as e: if ( not original_client and not self._replica_read_only and len(tried) < len(self._server) ): tried.append(index) client = None continue > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:185: ConnectionInterrupted During handling of the above exception, another exception occurred: self = cache = def test_touch_zero_timeout(self, cache: RedisCache): > cache.set("test_key", 222, timeout=10) tests/test_backend.py:738: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:175: in set return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) /usr/lib/python3.12/site-packages/redis/commands/core.py:2305: in set return self.execute_command("SET", *pieces, **options) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError _______________ TestDjangoRedisCache.test_touch_positive_timeout _______________ self = args = ('test_key', 222), kwargs = {'timeout': 10} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:81: in set return self.client.set(*args, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = key = 'test_key', value = 222, timeout = 10000, version = None client = )>)> nx = False, xx = False def set( self, key: Any, value: Any, timeout: Optional[float] = DEFAULT_TIMEOUT, version: Optional[int] = None, client: Optional[Redis] = None, nx: bool = False, xx: bool = False, ) -> bool: """ Persist a value to the cache, and set an optional expiration time. Also supports optional nx parameter. If set to True - will use redis setnx instead of set. """ nkey = self.make_key(key, version=version) nvalue = self.encode(value) if timeout is DEFAULT_TIMEOUT: timeout = self._backend.default_timeout original_client = client tried: List[int] = [] while True: try: if client is None: client, index = self.get_client( write=True, tried=tried, show_index=True ) if timeout is not None: # Convert to milliseconds timeout = int(timeout * 1000) if timeout <= 0: if nx: # Using negative timeouts when nx is True should # not expire (in our case delete) the value if it exists. # Obviously expire not existent value is noop. return not self.has_key(key, version=version, client=client) else: # redis doesn't support negative timeouts in ex flags # so it seems that it's better to just delete the key # than to set it and than expire in a pipeline return bool( self.delete(key, client=client, version=version) ) return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) except _main_exceptions as e: if ( not original_client and not self._replica_read_only and len(tried) < len(self._server) ): tried.append(index) client = None continue > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:185: ConnectionInterrupted During handling of the above exception, another exception occurred: self = cache = def test_touch_positive_timeout(self, cache: RedisCache): > cache.set("test_key", 222, timeout=10) tests/test_backend.py:745: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:175: in set return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) /usr/lib/python3.12/site-packages/redis/commands/core.py:2305: in set return self.execute_command("SET", *pieces, **options) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError _______________ TestDjangoRedisCache.test_touch_negative_timeout _______________ self = args = ('test_key', 222), kwargs = {'timeout': 10} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:81: in set return self.client.set(*args, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = key = 'test_key', value = 222, timeout = 10000, version = None client = )>)> nx = False, xx = False def set( self, key: Any, value: Any, timeout: Optional[float] = DEFAULT_TIMEOUT, version: Optional[int] = None, client: Optional[Redis] = None, nx: bool = False, xx: bool = False, ) -> bool: """ Persist a value to the cache, and set an optional expiration time. Also supports optional nx parameter. If set to True - will use redis setnx instead of set. """ nkey = self.make_key(key, version=version) nvalue = self.encode(value) if timeout is DEFAULT_TIMEOUT: timeout = self._backend.default_timeout original_client = client tried: List[int] = [] while True: try: if client is None: client, index = self.get_client( write=True, tried=tried, show_index=True ) if timeout is not None: # Convert to milliseconds timeout = int(timeout * 1000) if timeout <= 0: if nx: # Using negative timeouts when nx is True should # not expire (in our case delete) the value if it exists. # Obviously expire not existent value is noop. return not self.has_key(key, version=version, client=client) else: # redis doesn't support negative timeouts in ex flags # so it seems that it's better to just delete the key # than to set it and than expire in a pipeline return bool( self.delete(key, client=client, version=version) ) return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) except _main_exceptions as e: if ( not original_client and not self._replica_read_only and len(tried) < len(self._server) ): tried.append(index) client = None continue > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:185: ConnectionInterrupted During handling of the above exception, another exception occurred: self = cache = def test_touch_negative_timeout(self, cache: RedisCache): > cache.set("test_key", 222, timeout=10) tests/test_backend.py:753: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:175: in set return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) /usr/lib/python3.12/site-packages/redis/commands/core.py:2305: in set return self.execute_command("SET", *pieces, **options) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError __________________ TestDjangoRedisCache.test_touch_missed_key __________________ self = cache = def test_touch_missed_key(self, cache: RedisCache): > assert cache.touch("test_key_does_not_exist", 1) is False tests/test_backend.py:760: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:29: in _decorator return method(self, *args, **kwargs) django_redis/cache.py:186: in touch return self.client.touch(*args, **kwargs) django_redis/client/default.py:778: in touch return bool(client.pexpire(key, timeout)) /usr/lib/python3.12/site-packages/redis/commands/core.py:2073: in pexpire return self.execute_command("PEXPIRE", name, time, *exp_option) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError ___________________ TestDjangoRedisCache.test_touch_forever ____________________ self = args = ('test_key', 'foo'), kwargs = {'timeout': 1} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:81: in set return self.client.set(*args, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = key = 'test_key', value = 'foo', timeout = 1000, version = None client = )>)> nx = False, xx = False def set( self, key: Any, value: Any, timeout: Optional[float] = DEFAULT_TIMEOUT, version: Optional[int] = None, client: Optional[Redis] = None, nx: bool = False, xx: bool = False, ) -> bool: """ Persist a value to the cache, and set an optional expiration time. Also supports optional nx parameter. If set to True - will use redis setnx instead of set. """ nkey = self.make_key(key, version=version) nvalue = self.encode(value) if timeout is DEFAULT_TIMEOUT: timeout = self._backend.default_timeout original_client = client tried: List[int] = [] while True: try: if client is None: client, index = self.get_client( write=True, tried=tried, show_index=True ) if timeout is not None: # Convert to milliseconds timeout = int(timeout * 1000) if timeout <= 0: if nx: # Using negative timeouts when nx is True should # not expire (in our case delete) the value if it exists. # Obviously expire not existent value is noop. return not self.has_key(key, version=version, client=client) else: # redis doesn't support negative timeouts in ex flags # so it seems that it's better to just delete the key # than to set it and than expire in a pipeline return bool( self.delete(key, client=client, version=version) ) return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) except _main_exceptions as e: if ( not original_client and not self._replica_read_only and len(tried) < len(self._server) ): tried.append(index) client = None continue > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:185: ConnectionInterrupted During handling of the above exception, another exception occurred: self = cache = def test_touch_forever(self, cache: RedisCache): > cache.set("test_key", "foo", timeout=1) tests/test_backend.py:763: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:175: in set return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) /usr/lib/python3.12/site-packages/redis/commands/core.py:2305: in set return self.execute_command("SET", *pieces, **options) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError _____________ TestDjangoRedisCache.test_touch_forever_nonexistent ______________ self = cache = def test_touch_forever_nonexistent(self, cache: RedisCache): > result = cache.touch("test_key_does_not_exist", None) tests/test_backend.py:771: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:29: in _decorator return method(self, *args, **kwargs) django_redis/cache.py:186: in touch return self.client.touch(*args, **kwargs) django_redis/client/default.py:774: in touch return bool(client.persist(key)) /usr/lib/python3.12/site-packages/redis/commands/core.py:2037: in persist return self.execute_command("PERSIST", name) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError _______________ TestDjangoRedisCache.test_touch_default_timeout ________________ self = args = ('test_key', 'foo'), kwargs = {'timeout': 1} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:81: in set return self.client.set(*args, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = key = 'test_key', value = 'foo', timeout = 1000, version = None client = )>)> nx = False, xx = False def set( self, key: Any, value: Any, timeout: Optional[float] = DEFAULT_TIMEOUT, version: Optional[int] = None, client: Optional[Redis] = None, nx: bool = False, xx: bool = False, ) -> bool: """ Persist a value to the cache, and set an optional expiration time. Also supports optional nx parameter. If set to True - will use redis setnx instead of set. """ nkey = self.make_key(key, version=version) nvalue = self.encode(value) if timeout is DEFAULT_TIMEOUT: timeout = self._backend.default_timeout original_client = client tried: List[int] = [] while True: try: if client is None: client, index = self.get_client( write=True, tried=tried, show_index=True ) if timeout is not None: # Convert to milliseconds timeout = int(timeout * 1000) if timeout <= 0: if nx: # Using negative timeouts when nx is True should # not expire (in our case delete) the value if it exists. # Obviously expire not existent value is noop. return not self.has_key(key, version=version, client=client) else: # redis doesn't support negative timeouts in ex flags # so it seems that it's better to just delete the key # than to set it and than expire in a pipeline return bool( self.delete(key, client=client, version=version) ) return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) except _main_exceptions as e: if ( not original_client and not self._replica_read_only and len(tried) < len(self._server) ): tried.append(index) client = None continue > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:185: ConnectionInterrupted During handling of the above exception, another exception occurred: self = cache = def test_touch_default_timeout(self, cache: RedisCache): > cache.set("test_key", "foo", timeout=1) tests/test_backend.py:775: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:175: in set return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) /usr/lib/python3.12/site-packages/redis/commands/core.py:2305: in set return self.execute_command("SET", *pieces, **options) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError _______________________ TestDjangoRedisCache.test_clear ________________________ self = args = ('foo', 'bar'), kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:81: in set return self.client.set(*args, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = key = 'foo', value = 'bar', timeout = 300000, version = None client = )>)> nx = False, xx = False def set( self, key: Any, value: Any, timeout: Optional[float] = DEFAULT_TIMEOUT, version: Optional[int] = None, client: Optional[Redis] = None, nx: bool = False, xx: bool = False, ) -> bool: """ Persist a value to the cache, and set an optional expiration time. Also supports optional nx parameter. If set to True - will use redis setnx instead of set. """ nkey = self.make_key(key, version=version) nvalue = self.encode(value) if timeout is DEFAULT_TIMEOUT: timeout = self._backend.default_timeout original_client = client tried: List[int] = [] while True: try: if client is None: client, index = self.get_client( write=True, tried=tried, show_index=True ) if timeout is not None: # Convert to milliseconds timeout = int(timeout * 1000) if timeout <= 0: if nx: # Using negative timeouts when nx is True should # not expire (in our case delete) the value if it exists. # Obviously expire not existent value is noop. return not self.has_key(key, version=version, client=client) else: # redis doesn't support negative timeouts in ex flags # so it seems that it's better to just delete the key # than to set it and than expire in a pipeline return bool( self.delete(key, client=client, version=version) ) return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) except _main_exceptions as e: if ( not original_client and not self._replica_read_only and len(tried) < len(self._server) ): tried.append(index) client = None continue > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:185: ConnectionInterrupted During handling of the above exception, another exception occurred: self = cache = def test_clear(self, cache: RedisCache): > cache.set("foo", "bar") tests/test_backend.py:782: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:175: in set return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) /usr/lib/python3.12/site-packages/redis/commands/core.py:2305: in set return self.execute_command("SET", *pieces, **options) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError _____________ TestDjangoRedisCacheEscapePrefix.test_delete_pattern _____________ self = args = ('a', '1'), kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:81: in set return self.client.set(*args, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = key = 'a', value = '1', timeout = 300000, version = None client = )>)> nx = False, xx = False def set( self, key: Any, value: Any, timeout: Optional[float] = DEFAULT_TIMEOUT, version: Optional[int] = None, client: Optional[Redis] = None, nx: bool = False, xx: bool = False, ) -> bool: """ Persist a value to the cache, and set an optional expiration time. Also supports optional nx parameter. If set to True - will use redis setnx instead of set. """ nkey = self.make_key(key, version=version) nvalue = self.encode(value) if timeout is DEFAULT_TIMEOUT: timeout = self._backend.default_timeout original_client = client tried: List[int] = [] while True: try: if client is None: client, index = self.get_client( write=True, tried=tried, show_index=True ) if timeout is not None: # Convert to milliseconds timeout = int(timeout * 1000) if timeout <= 0: if nx: # Using negative timeouts when nx is True should # not expire (in our case delete) the value if it exists. # Obviously expire not existent value is noop. return not self.has_key(key, version=version, client=client) else: # redis doesn't support negative timeouts in ex flags # so it seems that it's better to just delete the key # than to set it and than expire in a pipeline return bool( self.delete(key, client=client, version=version) ) return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) except _main_exceptions as e: if ( not original_client and not self._replica_read_only and len(tried) < len(self._server) ): tried.append(index) client = None continue > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:185: ConnectionInterrupted During handling of the above exception, another exception occurred: self = key_prefix_cache = with_prefix_cache = def test_delete_pattern( self, key_prefix_cache: RedisCache, with_prefix_cache: RedisCache ): > key_prefix_cache.set("a", "1") tests/test_cache_options.py:99: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:175: in set return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) /usr/lib/python3.12/site-packages/redis/commands/core.py:2305: in set return self.execute_command("SET", *pieces, **options) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError _______________ TestDjangoRedisCacheEscapePrefix.test_iter_keys ________________ self = args = ('a', '1'), kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:81: in set return self.client.set(*args, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = key = 'a', value = '1', timeout = 300000, version = None client = )>)> nx = False, xx = False def set( self, key: Any, value: Any, timeout: Optional[float] = DEFAULT_TIMEOUT, version: Optional[int] = None, client: Optional[Redis] = None, nx: bool = False, xx: bool = False, ) -> bool: """ Persist a value to the cache, and set an optional expiration time. Also supports optional nx parameter. If set to True - will use redis setnx instead of set. """ nkey = self.make_key(key, version=version) nvalue = self.encode(value) if timeout is DEFAULT_TIMEOUT: timeout = self._backend.default_timeout original_client = client tried: List[int] = [] while True: try: if client is None: client, index = self.get_client( write=True, tried=tried, show_index=True ) if timeout is not None: # Convert to milliseconds timeout = int(timeout * 1000) if timeout <= 0: if nx: # Using negative timeouts when nx is True should # not expire (in our case delete) the value if it exists. # Obviously expire not existent value is noop. return not self.has_key(key, version=version, client=client) else: # redis doesn't support negative timeouts in ex flags # so it seems that it's better to just delete the key # than to set it and than expire in a pipeline return bool( self.delete(key, client=client, version=version) ) return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) except _main_exceptions as e: if ( not original_client and not self._replica_read_only and len(tried) < len(self._server) ): tried.append(index) client = None continue > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:185: ConnectionInterrupted During handling of the above exception, another exception occurred: self = key_prefix_cache = with_prefix_cache = def test_iter_keys( self, key_prefix_cache: RedisCache, with_prefix_cache: RedisCache ): if isinstance(key_prefix_cache.client, ShardClient): pytest.skip("ShardClient doesn't support iter_keys") > key_prefix_cache.set("a", "1") tests/test_cache_options.py:111: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:175: in set return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) /usr/lib/python3.12/site-packages/redis/commands/core.py:2305: in set return self.execute_command("SET", *pieces, **options) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError __________________ TestDjangoRedisCacheEscapePrefix.test_keys __________________ self = args = ('a', '1'), kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:81: in set return self.client.set(*args, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = key = 'a', value = '1', timeout = 300000, version = None client = )>)> nx = False, xx = False def set( self, key: Any, value: Any, timeout: Optional[float] = DEFAULT_TIMEOUT, version: Optional[int] = None, client: Optional[Redis] = None, nx: bool = False, xx: bool = False, ) -> bool: """ Persist a value to the cache, and set an optional expiration time. Also supports optional nx parameter. If set to True - will use redis setnx instead of set. """ nkey = self.make_key(key, version=version) nvalue = self.encode(value) if timeout is DEFAULT_TIMEOUT: timeout = self._backend.default_timeout original_client = client tried: List[int] = [] while True: try: if client is None: client, index = self.get_client( write=True, tried=tried, show_index=True ) if timeout is not None: # Convert to milliseconds timeout = int(timeout * 1000) if timeout <= 0: if nx: # Using negative timeouts when nx is True should # not expire (in our case delete) the value if it exists. # Obviously expire not existent value is noop. return not self.has_key(key, version=version, client=client) else: # redis doesn't support negative timeouts in ex flags # so it seems that it's better to just delete the key # than to set it and than expire in a pipeline return bool( self.delete(key, client=client, version=version) ) return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) except _main_exceptions as e: if ( not original_client and not self._replica_read_only and len(tried) < len(self._server) ): tried.append(index) client = None continue > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:185: ConnectionInterrupted During handling of the above exception, another exception occurred: self = key_prefix_cache = with_prefix_cache = def test_keys(self, key_prefix_cache: RedisCache, with_prefix_cache: RedisCache): > key_prefix_cache.set("a", "1") tests/test_cache_options.py:116: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:175: in set return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) /usr/lib/python3.12/site-packages/redis/commands/core.py:2305: in set return self.execute_command("SET", *pieces, **options) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError ___________________________ test_custom_key_function ___________________________ self = args = ('foo-aa', 'foo'), kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:81: in set return self.client.set(*args, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = key = 'foo-aa', value = 'foo', timeout = 300000, version = None client = )>)> nx = False, xx = False def set( self, key: Any, value: Any, timeout: Optional[float] = DEFAULT_TIMEOUT, version: Optional[int] = None, client: Optional[Redis] = None, nx: bool = False, xx: bool = False, ) -> bool: """ Persist a value to the cache, and set an optional expiration time. Also supports optional nx parameter. If set to True - will use redis setnx instead of set. """ nkey = self.make_key(key, version=version) nvalue = self.encode(value) if timeout is DEFAULT_TIMEOUT: timeout = self._backend.default_timeout original_client = client tried: List[int] = [] while True: try: if client is None: client, index = self.get_client( write=True, tried=tried, show_index=True ) if timeout is not None: # Convert to milliseconds timeout = int(timeout * 1000) if timeout <= 0: if nx: # Using negative timeouts when nx is True should # not expire (in our case delete) the value if it exists. # Obviously expire not existent value is noop. return not self.has_key(key, version=version, client=client) else: # redis doesn't support negative timeouts in ex flags # so it seems that it's better to just delete the key # than to set it and than expire in a pipeline return bool( self.delete(key, client=client, version=version) ) return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) except _main_exceptions as e: if ( not original_client and not self._replica_read_only and len(tried) < len(self._server) ): tried.append(index) client = None continue > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:185: ConnectionInterrupted During handling of the above exception, another exception occurred: cache = settings = def test_custom_key_function(cache: RedisCache, settings: SettingsWrapper): caches_setting = copy.deepcopy(settings.CACHES) caches_setting["default"]["KEY_FUNCTION"] = "test_cache_options.make_key" caches_setting["default"]["REVERSE_KEY_FUNCTION"] = "test_cache_options.reverse_key" settings.CACHES = caches_setting if isinstance(cache.client, ShardClient): pytest.skip("ShardClient doesn't support get_client") for key in ["foo-aa", "foo-ab", "foo-bb", "foo-bc"]: > cache.set(key, "foo") tests/test_cache_options.py:133: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:175: in set return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) /usr/lib/python3.12/site-packages/redis/commands/core.py:2305: in set return self.execute_command("SET", *pieces, **options) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError ___________________________ SessionTests.test_cycle ____________________________ self = args = ('django.contrib.sessions.cacheobogf60a42cjeqh1ys7p59n46nllojm6', {'a': 'c', 'b': 'd'}, 1209600) kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:89: in add return self.client.add(*args, **kwargs) django_redis/client/default.py:238: in add return self.set(key, value, timeout, version=version, client=client, nx=True) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = key = 'django.contrib.sessions.cacheobogf60a42cjeqh1ys7p59n46nllojm6' value = {'a': 'c', 'b': 'd'}, timeout = 1209600000, version = None client = )>)> nx = True, xx = False def set( self, key: Any, value: Any, timeout: Optional[float] = DEFAULT_TIMEOUT, version: Optional[int] = None, client: Optional[Redis] = None, nx: bool = False, xx: bool = False, ) -> bool: """ Persist a value to the cache, and set an optional expiration time. Also supports optional nx parameter. If set to True - will use redis setnx instead of set. """ nkey = self.make_key(key, version=version) nvalue = self.encode(value) if timeout is DEFAULT_TIMEOUT: timeout = self._backend.default_timeout original_client = client tried: List[int] = [] while True: try: if client is None: client, index = self.get_client( write=True, tried=tried, show_index=True ) if timeout is not None: # Convert to milliseconds timeout = int(timeout * 1000) if timeout <= 0: if nx: # Using negative timeouts when nx is True should # not expire (in our case delete) the value if it exists. # Obviously expire not existent value is noop. return not self.has_key(key, version=version, client=client) else: # redis doesn't support negative timeouts in ex flags # so it seems that it's better to just delete the key # than to set it and than expire in a pipeline return bool( self.delete(key, client=client, version=version) ) return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) except _main_exceptions as e: if ( not original_client and not self._replica_read_only and len(tried) < len(self._server) ): tried.append(index) client = None continue > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:185: ConnectionInterrupted During handling of the above exception, another exception occurred: self = def test_cycle(self): self.session["a"], self.session["b"] = "c", "d" > self.session.save() tests/test_session.py:157: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/django/contrib/sessions/backends/cache.py:56: in save return self.create() /usr/lib/python3.12/site-packages/django/contrib/sessions/backends/cache.py:44: in create self.save(must_create=True) /usr/lib/python3.12/site-packages/django/contrib/sessions/backends/cache.py:63: in save result = func( django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:175: in set return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) /usr/lib/python3.12/site-packages/redis/commands/core.py:2305: in set return self.execute_command("SET", *pieces, **options) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError ________________ SessionTests.test_cycle_with_no_session_cache _________________ self = args = ('django.contrib.sessions.cachelr3gbdmre7fah24g9dt60t1oft8kgrra', {'a': 'c', 'b': 'd'}, 1209600) kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:89: in add return self.client.add(*args, **kwargs) django_redis/client/default.py:238: in add return self.set(key, value, timeout, version=version, client=client, nx=True) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = key = 'django.contrib.sessions.cachelr3gbdmre7fah24g9dt60t1oft8kgrra' value = {'a': 'c', 'b': 'd'}, timeout = 1209600000, version = None client = )>)> nx = True, xx = False def set( self, key: Any, value: Any, timeout: Optional[float] = DEFAULT_TIMEOUT, version: Optional[int] = None, client: Optional[Redis] = None, nx: bool = False, xx: bool = False, ) -> bool: """ Persist a value to the cache, and set an optional expiration time. Also supports optional nx parameter. If set to True - will use redis setnx instead of set. """ nkey = self.make_key(key, version=version) nvalue = self.encode(value) if timeout is DEFAULT_TIMEOUT: timeout = self._backend.default_timeout original_client = client tried: List[int] = [] while True: try: if client is None: client, index = self.get_client( write=True, tried=tried, show_index=True ) if timeout is not None: # Convert to milliseconds timeout = int(timeout * 1000) if timeout <= 0: if nx: # Using negative timeouts when nx is True should # not expire (in our case delete) the value if it exists. # Obviously expire not existent value is noop. return not self.has_key(key, version=version, client=client) else: # redis doesn't support negative timeouts in ex flags # so it seems that it's better to just delete the key # than to set it and than expire in a pipeline return bool( self.delete(key, client=client, version=version) ) return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) except _main_exceptions as e: if ( not original_client and not self._replica_read_only and len(tried) < len(self._server) ): tried.append(index) client = None continue > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:185: ConnectionInterrupted During handling of the above exception, another exception occurred: self = def test_cycle_with_no_session_cache(self): self.session["a"], self.session["b"] = "c", "d" > self.session.save() tests/test_session.py:167: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/django/contrib/sessions/backends/cache.py:56: in save return self.create() /usr/lib/python3.12/site-packages/django/contrib/sessions/backends/cache.py:44: in create self.save(must_create=True) /usr/lib/python3.12/site-packages/django/contrib/sessions/backends/cache.py:63: in save result = func( django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:175: in set return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) /usr/lib/python3.12/site-packages/redis/commands/core.py:2305: in set return self.execute_command("SET", *pieces, **options) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError ___________________________ SessionTests.test_delete ___________________________ self = args = ('django.contrib.sessions.cachecemttwvri20jtrnsow4xqoi0h45kduqs', {}, 1209600) kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:89: in add return self.client.add(*args, **kwargs) django_redis/client/default.py:238: in add return self.set(key, value, timeout, version=version, client=client, nx=True) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = key = 'django.contrib.sessions.cachecemttwvri20jtrnsow4xqoi0h45kduqs' value = {}, timeout = 1209600000, version = None client = )>)> nx = True, xx = False def set( self, key: Any, value: Any, timeout: Optional[float] = DEFAULT_TIMEOUT, version: Optional[int] = None, client: Optional[Redis] = None, nx: bool = False, xx: bool = False, ) -> bool: """ Persist a value to the cache, and set an optional expiration time. Also supports optional nx parameter. If set to True - will use redis setnx instead of set. """ nkey = self.make_key(key, version=version) nvalue = self.encode(value) if timeout is DEFAULT_TIMEOUT: timeout = self._backend.default_timeout original_client = client tried: List[int] = [] while True: try: if client is None: client, index = self.get_client( write=True, tried=tried, show_index=True ) if timeout is not None: # Convert to milliseconds timeout = int(timeout * 1000) if timeout <= 0: if nx: # Using negative timeouts when nx is True should # not expire (in our case delete) the value if it exists. # Obviously expire not existent value is noop. return not self.has_key(key, version=version, client=client) else: # redis doesn't support negative timeouts in ex flags # so it seems that it's better to just delete the key # than to set it and than expire in a pipeline return bool( self.delete(key, client=client, version=version) ) return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) except _main_exceptions as e: if ( not original_client and not self._replica_read_only and len(tried) < len(self._server) ): tried.append(index) client = None continue > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:185: ConnectionInterrupted During handling of the above exception, another exception occurred: self = def test_delete(self): > self.session.save() tests/test_session.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/django/contrib/sessions/backends/cache.py:56: in save return self.create() /usr/lib/python3.12/site-packages/django/contrib/sessions/backends/cache.py:44: in create self.save(must_create=True) /usr/lib/python3.12/site-packages/django/contrib/sessions/backends/cache.py:63: in save result = func( django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:175: in set return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) /usr/lib/python3.12/site-packages/redis/commands/core.py:2305: in set return self.execute_command("SET", *pieces, **options) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError ___________________________ SessionTests.test_flush ____________________________ self = args = ('django.contrib.sessions.cachey9a93w1z9yibi5wbxqyfumpx8m252iel', {'foo': 'bar'}, 1209600) kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:89: in add return self.client.add(*args, **kwargs) django_redis/client/default.py:238: in add return self.set(key, value, timeout, version=version, client=client, nx=True) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = key = 'django.contrib.sessions.cachey9a93w1z9yibi5wbxqyfumpx8m252iel' value = {'foo': 'bar'}, timeout = 1209600000, version = None client = )>)> nx = True, xx = False def set( self, key: Any, value: Any, timeout: Optional[float] = DEFAULT_TIMEOUT, version: Optional[int] = None, client: Optional[Redis] = None, nx: bool = False, xx: bool = False, ) -> bool: """ Persist a value to the cache, and set an optional expiration time. Also supports optional nx parameter. If set to True - will use redis setnx instead of set. """ nkey = self.make_key(key, version=version) nvalue = self.encode(value) if timeout is DEFAULT_TIMEOUT: timeout = self._backend.default_timeout original_client = client tried: List[int] = [] while True: try: if client is None: client, index = self.get_client( write=True, tried=tried, show_index=True ) if timeout is not None: # Convert to milliseconds timeout = int(timeout * 1000) if timeout <= 0: if nx: # Using negative timeouts when nx is True should # not expire (in our case delete) the value if it exists. # Obviously expire not existent value is noop. return not self.has_key(key, version=version, client=client) else: # redis doesn't support negative timeouts in ex flags # so it seems that it's better to just delete the key # than to set it and than expire in a pipeline return bool( self.delete(key, client=client, version=version) ) return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) except _main_exceptions as e: if ( not original_client and not self._replica_read_only and len(tried) < len(self._server) ): tried.append(index) client = None continue > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:185: ConnectionInterrupted During handling of the above exception, another exception occurred: self = def test_flush(self): self.session["foo"] = "bar" > self.session.save() tests/test_session.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/django/contrib/sessions/backends/cache.py:56: in save return self.create() /usr/lib/python3.12/site-packages/django/contrib/sessions/backends/cache.py:44: in create self.save(must_create=True) /usr/lib/python3.12/site-packages/django/contrib/sessions/backends/cache.py:63: in save result = func( django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:175: in set return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) /usr/lib/python3.12/site-packages/redis/commands/core.py:2305: in set return self.execute_command("SET", *pieces, **options) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError ________________________ SessionTests.test_invalid_key _________________________ self = args = ('django.contrib.sessions.cache1',), kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:104: in delete result = self.client.delete(*args, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = key = 'django.contrib.sessions.cache1', version = None, prefix = None client = )>)> def delete( self, key: Any, version: Optional[int] = None, prefix: Optional[str] = None, client: Optional[Redis] = None, ) -> int: """ Remove a key from the cache. """ if client is None: client = self.get_client(write=True) try: return client.delete(self.make_key(key, version=version, prefix=prefix)) except _main_exceptions as e: > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:375: ConnectionInterrupted During handling of the above exception, another exception occurred: self = def test_invalid_key(self): # Submitting an invalid session key (either by guessing, or if the db has # removed the key) results in a new key being generated. try: session = self.backend("1") session.save() self.assertNotEqual(session.session_key, "1") self.assertIsNone(session.get("cat")) session.delete() finally: # Some backends leave a stale cache entry for the invalid # session key; make sure that entry is manually deleted > session.delete("1") tests/test_session.py:191: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/django/contrib/sessions/backends/cache.py:81: in delete self._cache.delete(self.cache_key_prefix + session_key) django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:373: in delete return client.delete(self.make_key(key, version=version, prefix=prefix)) /usr/lib/python3.12/site-packages/redis/commands/core.py:1712: in delete return self.execute_command("DEL", *names) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError ____________________________ SessionTests.test_save ____________________________ self = args = ('django.contrib.sessions.cachek6u33ke08wb3ptx6j36dca5f5swlx227', {}, 1209600) kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:89: in add return self.client.add(*args, **kwargs) django_redis/client/default.py:238: in add return self.set(key, value, timeout, version=version, client=client, nx=True) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = key = 'django.contrib.sessions.cachek6u33ke08wb3ptx6j36dca5f5swlx227' value = {}, timeout = 1209600000, version = None client = )>)> nx = True, xx = False def set( self, key: Any, value: Any, timeout: Optional[float] = DEFAULT_TIMEOUT, version: Optional[int] = None, client: Optional[Redis] = None, nx: bool = False, xx: bool = False, ) -> bool: """ Persist a value to the cache, and set an optional expiration time. Also supports optional nx parameter. If set to True - will use redis setnx instead of set. """ nkey = self.make_key(key, version=version) nvalue = self.encode(value) if timeout is DEFAULT_TIMEOUT: timeout = self._backend.default_timeout original_client = client tried: List[int] = [] while True: try: if client is None: client, index = self.get_client( write=True, tried=tried, show_index=True ) if timeout is not None: # Convert to milliseconds timeout = int(timeout * 1000) if timeout <= 0: if nx: # Using negative timeouts when nx is True should # not expire (in our case delete) the value if it exists. # Obviously expire not existent value is noop. return not self.has_key(key, version=version, client=client) else: # redis doesn't support negative timeouts in ex flags # so it seems that it's better to just delete the key # than to set it and than expire in a pipeline return bool( self.delete(key, client=client, version=version) ) return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) except _main_exceptions as e: if ( not original_client and not self._replica_read_only and len(tried) < len(self._server) ): tried.append(index) client = None continue > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:185: ConnectionInterrupted During handling of the above exception, another exception occurred: self = def test_save(self): > self.session.save() tests/test_session.py:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/django/contrib/sessions/backends/cache.py:56: in save return self.create() /usr/lib/python3.12/site-packages/django/contrib/sessions/backends/cache.py:44: in create self.save(must_create=True) /usr/lib/python3.12/site-packages/django/contrib/sessions/backends/cache.py:63: in save result = func( django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:175: in set return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) /usr/lib/python3.12/site-packages/redis/commands/core.py:2305: in set return self.execute_command("SET", *pieces, **options) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError ___________________ SessionTests.test_save_doesnt_clear_data ___________________ self = args = ('django.contrib.sessions.cacheux90ng6qqfc8kp3n36iwyt06fyhosq46', {'a': 'b'}, 1209600) kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:89: in add return self.client.add(*args, **kwargs) django_redis/client/default.py:238: in add return self.set(key, value, timeout, version=version, client=client, nx=True) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = key = 'django.contrib.sessions.cacheux90ng6qqfc8kp3n36iwyt06fyhosq46' value = {'a': 'b'}, timeout = 1209600000, version = None client = )>)> nx = True, xx = False def set( self, key: Any, value: Any, timeout: Optional[float] = DEFAULT_TIMEOUT, version: Optional[int] = None, client: Optional[Redis] = None, nx: bool = False, xx: bool = False, ) -> bool: """ Persist a value to the cache, and set an optional expiration time. Also supports optional nx parameter. If set to True - will use redis setnx instead of set. """ nkey = self.make_key(key, version=version) nvalue = self.encode(value) if timeout is DEFAULT_TIMEOUT: timeout = self._backend.default_timeout original_client = client tried: List[int] = [] while True: try: if client is None: client, index = self.get_client( write=True, tried=tried, show_index=True ) if timeout is not None: # Convert to milliseconds timeout = int(timeout * 1000) if timeout <= 0: if nx: # Using negative timeouts when nx is True should # not expire (in our case delete) the value if it exists. # Obviously expire not existent value is noop. return not self.has_key(key, version=version, client=client) else: # redis doesn't support negative timeouts in ex flags # so it seems that it's better to just delete the key # than to set it and than expire in a pipeline return bool( self.delete(key, client=client, version=version) ) return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) except _main_exceptions as e: if ( not original_client and not self._replica_read_only and len(tried) < len(self._server) ): tried.append(index) client = None continue > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:185: ConnectionInterrupted During handling of the above exception, another exception occurred: self = def test_save_doesnt_clear_data(self): self.session["a"] = "b" > self.session.save() tests/test_session.py:176: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/django/contrib/sessions/backends/cache.py:56: in save return self.create() /usr/lib/python3.12/site-packages/django/contrib/sessions/backends/cache.py:44: in create self.save(must_create=True) /usr/lib/python3.12/site-packages/django/contrib/sessions/backends/cache.py:63: in save result = func( django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:175: in set return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) /usr/lib/python3.12/site-packages/redis/commands/core.py:2305: in set return self.execute_command("SET", *pieces, **options) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError _______________ SessionTests.test_session_key_valid_string_saved _______________ self = args = ('django.contrib.sessions.cache12345678',), kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:104: in delete result = self.client.delete(*args, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = key = 'django.contrib.sessions.cache12345678', version = None, prefix = None client = )>)> def delete( self, key: Any, version: Optional[int] = None, prefix: Optional[str] = None, client: Optional[Redis] = None, ) -> int: """ Remove a key from the cache. """ if client is None: client = self.get_client(write=True) try: return client.delete(self.make_key(key, version=version, prefix=prefix)) except _main_exceptions as e: > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:375: ConnectionInterrupted During handling of the above exception, another exception occurred: self = def tearDown(self): # NB: be careful to delete any sessions created; stale sessions fill up # the /tmp (with some backends) and eventually overwhelm it after lots # of runs (think buildbots) > self.session.delete() tests/test_session.py:36: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/django/contrib/sessions/backends/cache.py:81: in delete self._cache.delete(self.cache_key_prefix + session_key) django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:373: in delete return client.delete(self.make_key(key, version=version, prefix=prefix)) /usr/lib/python3.12/site-packages/redis/commands/core.py:1712: in delete return self.execute_command("DEL", *names) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError _ SessionTests.test_session_save_does_not_resurrect_session_logged_out_in_other_context _ self = args = ('django.contrib.sessions.cacheniq9we6zurrfrbr20am9f2cefdulyb0w', {'test_data': 'value1'}, 1209600) kwargs = {} @functools.wraps(method) def _decorator(self, *args, **kwargs): try: > return method(self, *args, **kwargs) django_redis/cache.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ django_redis/cache.py:89: in add return self.client.add(*args, **kwargs) django_redis/client/default.py:238: in add return self.set(key, value, timeout, version=version, client=client, nx=True) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = key = 'django.contrib.sessions.cacheniq9we6zurrfrbr20am9f2cefdulyb0w' value = {'test_data': 'value1'}, timeout = 1209600000, version = None client = )>)> nx = True, xx = False def set( self, key: Any, value: Any, timeout: Optional[float] = DEFAULT_TIMEOUT, version: Optional[int] = None, client: Optional[Redis] = None, nx: bool = False, xx: bool = False, ) -> bool: """ Persist a value to the cache, and set an optional expiration time. Also supports optional nx parameter. If set to True - will use redis setnx instead of set. """ nkey = self.make_key(key, version=version) nvalue = self.encode(value) if timeout is DEFAULT_TIMEOUT: timeout = self._backend.default_timeout original_client = client tried: List[int] = [] while True: try: if client is None: client, index = self.get_client( write=True, tried=tried, show_index=True ) if timeout is not None: # Convert to milliseconds timeout = int(timeout * 1000) if timeout <= 0: if nx: # Using negative timeouts when nx is True should # not expire (in our case delete) the value if it exists. # Obviously expire not existent value is noop. return not self.has_key(key, version=version, client=client) else: # redis doesn't support negative timeouts in ex flags # so it seems that it's better to just delete the key # than to set it and than expire in a pipeline return bool( self.delete(key, client=client, version=version) ) return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) except _main_exceptions as e: if ( not original_client and not self._replica_read_only and len(tried) < len(self._server) ): tried.append(index) client = None continue > raise ConnectionInterrupted(connection=client) from e E django_redis.exceptions.ConnectionInterrupted: Redis ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. django_redis/client/default.py:185: ConnectionInterrupted During handling of the above exception, another exception occurred: self = def test_session_save_does_not_resurrect_session_logged_out_in_other_context(self): """ Sessions shouldn't be resurrected by a concurrent request. """ from django.contrib.sessions.backends.base import UpdateError # Create new session. s1 = self.backend() s1["test_data"] = "value1" > s1.save(must_create=True) tests/test_session.py:351: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/django/contrib/sessions/backends/cache.py:56: in save return self.create() /usr/lib/python3.12/site-packages/django/contrib/sessions/backends/cache.py:44: in create self.save(must_create=True) /usr/lib/python3.12/site-packages/django/contrib/sessions/backends/cache.py:63: in save result = func( django_redis/cache.py:36: in _decorator raise e.__cause__ django_redis/client/default.py:175: in set return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx)) /usr/lib/python3.12/site-packages/redis/commands/core.py:2305: in set return self.execute_command("SET", *pieces, **options) /usr/lib/python3.12/site-packages/redis/client.py:622: in execute_command return self._execute_command(*args, **options) /usr/lib/python3.12/site-packages/redis/client.py:633: in _execute_command return conn.retry.call_with_retry( /usr/lib/python3.12/site-packages/redis/retry.py:87: in call_with_retry return do() /usr/lib/python3.12/site-packages/redis/client.py:634: in lambda: self._send_command_parse_response( /usr/lib/python3.12/site-packages/redis/client.py:605: in _send_command_parse_response return self.parse_response(conn, command_name, **options) /usr/lib/python3.12/site-packages/redis/client.py:652: in parse_response response = connection.read_response() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = disable_decoding = False def read_response( self, disable_decoding=False, *, disconnect_on_error=True, push_request=False, ): """Read the response from a previously sent command""" host_error = self._host_error() try: if self.protocol in ["3", 3] and not HIREDIS_AVAILABLE: response = self._parser.read_response( disable_decoding=disable_decoding, push_request=push_request ) else: response = self._parser.read_response(disable_decoding=disable_decoding) except socket.timeout: if disconnect_on_error: self.disconnect() raise TimeoutError(f"Timeout reading from {host_error}") except OSError as e: if disconnect_on_error: self.disconnect() raise ConnectionError(f"Error while reading from {host_error} : {e.args}") except BaseException: # Also by default close in case of BaseException. A lot of code # relies on this behaviour when doing Command/Response pairs. # See #1128. if disconnect_on_error: self.disconnect() raise if self.health_check_interval: self.next_health_check = time.monotonic() + self.health_check_interval if isinstance(response, ResponseError): try: > raise response E redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. /usr/lib/python3.12/site-packages/redis/connection.py:666: ResponseError =============================== warnings summary =============================== ../../../../../../../usr/lib/python3.12/site-packages/_pytest/config/__init__.py:1441 /usr/lib/python3.12/site-packages/_pytest/config/__init__.py:1441: PytestConfigWarning: Unknown config option: python_paths self._warn_or_fail_if_strict(f"Unknown config option: {key}\n") -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ FAILED tests/test_backend.py::TestDjangoRedisCache::test_touch_zero_timeout FAILED tests/test_backend.py::TestDjangoRedisCache::test_touch_positive_timeout FAILED tests/test_backend.py::TestDjangoRedisCache::test_touch_negative_timeout FAILED tests/test_backend.py::TestDjangoRedisCache::test_touch_missed_key - r... FAILED tests/test_backend.py::TestDjangoRedisCache::test_touch_forever - redi... FAILED tests/test_backend.py::TestDjangoRedisCache::test_touch_forever_nonexistent FAILED tests/test_backend.py::TestDjangoRedisCache::test_touch_default_timeout FAILED tests/test_backend.py::TestDjangoRedisCache::test_clear - redis.except... FAILED tests/test_cache_options.py::TestDjangoRedisCacheEscapePrefix::test_delete_pattern FAILED tests/test_cache_options.py::TestDjangoRedisCacheEscapePrefix::test_iter_keys FAILED tests/test_cache_options.py::TestDjangoRedisCacheEscapePrefix::test_keys FAILED tests/test_cache_options.py::test_custom_key_function - redis.exceptio... FAILED tests/test_session.py::SessionTests::test_cycle - redis.exceptions.Res... FAILED tests/test_session.py::SessionTests::test_cycle_with_no_session_cache FAILED tests/test_session.py::SessionTests::test_delete - redis.exceptions.Re... FAILED tests/test_session.py::SessionTests::test_flush - redis.exceptions.Res... FAILED tests/test_session.py::SessionTests::test_invalid_key - redis.exceptio... FAILED tests/test_session.py::SessionTests::test_save - redis.exceptions.Resp... FAILED tests/test_session.py::SessionTests::test_save_doesnt_clear_data - red... FAILED tests/test_session.py::SessionTests::test_session_key_valid_string_saved FAILED tests/test_session.py::SessionTests::test_session_save_does_not_resurrect_session_logged_out_in_other_context ERROR tests/test_backend.py::TestDjangoRedisCache::test_touch_zero_timeout - ... ERROR tests/test_backend.py::TestDjangoRedisCache::test_touch_positive_timeout ERROR tests/test_backend.py::TestDjangoRedisCache::test_touch_negative_timeout ERROR tests/test_backend.py::TestDjangoRedisCache::test_touch_missed_key - re... ERROR tests/test_backend.py::TestDjangoRedisCache::test_touch_forever - redis... ERROR tests/test_backend.py::TestDjangoRedisCache::test_touch_forever_nonexistent ERROR tests/test_backend.py::TestDjangoRedisCache::test_touch_default_timeout ERROR tests/test_backend.py::TestDjangoRedisCache::test_clear - redis.excepti... ERROR tests/test_cache_options.py::TestDjangoRedisCacheEscapePrefix::test_delete_pattern ERROR tests/test_cache_options.py::TestDjangoRedisCacheEscapePrefix::test_iter_keys ERROR tests/test_cache_options.py::TestDjangoRedisCacheEscapePrefix::test_keys ERROR tests/test_cache_options.py::test_custom_key_function - redis.exception... ERROR tests/test_client.py::TestClientClose::test_close_client_disconnect_default ERROR tests/test_client.py::TestClientClose::test_close_client_disconnect_default ERROR tests/test_client.py::TestClientClose::test_close_disconnect_settings ERROR tests/test_client.py::TestClientClose::test_close_disconnect_settings ERROR tests/test_client.py::TestClientClose::test_close_disconnect_settings_cache ERROR tests/test_client.py::TestClientClose::test_close_disconnect_settings_cache ERROR tests/test_client.py::TestClientClose::test_close_disconnect_client_options ERROR tests/test_client.py::TestClientClose::test_close_disconnect_client_options ERROR tests/test_session.py::SessionTests::test_cycle - redis.exceptions.Resp... ERROR tests/test_session.py::SessionTests::test_cycle_with_no_session_cache ERROR tests/test_session.py::SessionTests::test_delete - redis.exceptions.Res... ERROR tests/test_session.py::SessionTests::test_flush - redis.exceptions.Resp... ERROR tests/test_session.py::SessionTests::test_save - redis.exceptions.Respo... ERROR tests/test_session.py::SessionTests::test_save_doesnt_clear_data - redi... ======= 21 failed, 102 passed, 1 skipped, 1 warning, 26 errors in 21.31s ======= >>> ERROR: py3-django-redis: check failed >>> py3-django-redis: Uninstalling dependencies... (1/46) Purging .makedepends-py3-django-redis (20251012.165100) (2/46) Purging py3-django-pyc (4.2.25-r0) (3/46) Purging py3-django (4.2.25-r0) (4/46) Purging py3-asgiref-pyc (3.8.1-r1) (5/46) Purging py3-asgiref (3.8.1-r1) (6/46) Purging py3-sqlparse-pyc (0.5.1-r0) (7/46) Purging py3-sqlparse (0.5.1-r0) (8/46) Purging tzdata (2025b-r0) (9/46) Purging py3-setuptools-pyc (80.9.0-r0) (10/46) Purging py3-setuptools (80.9.0-r0) (11/46) Purging py3-wheel-pyc (0.46.1-r0) (12/46) Purging py3-wheel (0.46.1-r0) (13/46) Purging py3-gpep517-pyc (19-r0) (14/46) Purging py3-gpep517 (19-r0) (15/46) Purging py3-installer-pyc (0.7.0-r2) (16/46) Purging py3-installer (0.7.0-r2) (17/46) Purging py3-redis-pyc (6.1.0-r0) (18/46) Purging py3-redis (6.1.0-r0) (19/46) Purging py3-hiredis-pyc (3.2.1-r0) (20/46) Purging py3-hiredis (3.2.1-r0) (21/46) Purging py3-pytest-django-pyc (4.11.1-r0) (22/46) Purging py3-pytest-django (4.11.1-r0) (23/46) Purging py3-pytest-cov-pyc (5.0.0-r0) (24/46) Purging py3-pytest-cov (5.0.0-r0) (25/46) Purging py3-coverage-pyc (7.8.2-r0) (26/46) Purging py3-coverage (7.8.2-r0) (27/46) Purging py3-pytest-mock-pyc (3.10.0-r3) (28/46) Purging py3-pytest-mock (3.10.0-r3) (29/46) Purging py3-mock-pyc (5.2.0-r0) (30/46) Purging py3-mock (5.2.0-r0) (31/46) Purging py3-pytest-pyc (8.3.5-r0) (32/46) Purging py3-pytest (8.3.5-r0) (33/46) Purging py3-iniconfig-pyc (2.1.0-r0) (34/46) Purging py3-iniconfig (2.1.0-r0) (35/46) Purging py3-packaging-pyc (25.0-r0) (36/46) Purging py3-packaging (25.0-r0) (37/46) Purging py3-parsing-pyc (3.2.3-r0) (38/46) Purging py3-parsing (3.2.3-r0) (39/46) Purging py3-pluggy-pyc (1.5.0-r0) (40/46) Purging py3-pluggy (1.5.0-r0) (41/46) Purging py3-py-pyc (1.11.0-r4) (42/46) Purging py3-py (1.11.0-r4) (43/46) Purging py3-msgpack-pyc (1.0.8-r1) (44/46) Purging py3-msgpack (1.0.8-r1) (45/46) Purging valkey (8.1.1-r2) (46/46) Purging hiredis (1.3.0-r0) Executing busybox-1.37.0-r19.trigger OK: 296 MiB in 89 packages