pypi django-redis 7.0.0

5 hours ago

django-redis 7.0.0 (2026-06-02)

Features

  • Added the ability to pass redis username in the cache options (#657)
  • RedisCache does not attempt to close clients which have not been initialized. (#796)
  • Add sorted set operations (zadd, zrange, zrem, etc.) and mixins for RedisCache (#797)
  • Centralize configuration in pyproject.toml, drop EoL Python & Django
    versions, and add support & testing for modern Python & Django versions. (#820)
  • Provide TypeVar defaults & provide initial typing for RedisCache. (#829)

Bug Fixes

  • Fix IntEnum encoding (#602)
  • Fix incorrect Redis typing that relied on the legacy types-redis package, and update the public API to avoid exposing redis-py key types (the encode/decode/make_key methods allow a different API surface). (#822)

Miscellaneous

  • Drop support for Django 5.0 (EOL) (#779)
  • Clean & organize ruff config (#781)
  • Replace black with ruff format (#782)
  • Update RedisCache.close to not forward kwargs to the client implementation. (#788)
  • Rename 'name' parameter to 'key' in all sorted set methods for better consistency with Redis terminology (#811)
  • Fix hash method parameters: rename 'name' → 'key', 'key' → 'field' to align with Redis/Valkey terminology. Add version parameter to hlen() and hkeys(). Fix make_key() to only apply to hash key, not fields. (#812)
  • pre-commit autoupdate (#819)
  • Use from __future__ import annotations to postpone evaluation of annotations. (#823)
  • Increase mypy strictness, fix typing configuration, and fix type errors. (#824)
  • This change updates the compose configuration, and moves it to tests
    directory as it is only for testing. (#825)
  • Remove code handling unsupported Django versions (#826)
  • Increase mypy type coverage & update strictness overrides to only target specific modules (#827)

Don't miss a new django-redis release

NewReleases is sending notifications on new releases.