Changelogs » Django-redis

PyUp Safety actively tracks 263,329 Python packages for vulnerabilities and notifies you when to upgrade.



  Date: 2020-05-27
  - No code changes.
  - Fixed a typo in setup.cfg metadata preventing a successful release.


  Date: 2020-05-27
  - The project has moved to `Jazzband <>`_. This is the
  first release under the new organization. The new repository URL is
  - Removed support for end-of-life Django < 2.2.
  - Removed support for unmaintained redis-py 2.X.
  - Changed uses of deprecated ``smart_text()`` to ``smart_str()``.
  - Fixed deprecation warning with the msgpack serializer.
  - The ``.touch()`` method now uses the default timeout, to cache forever pass
  - Subclasses of ``JSONSerializer`` can now override the ``encoder_class``
  attribute to change the JSON encoder. It defaults to ``DjangoJSONEncoder``.
  - Fixed ``DefaultClient.set()`` to work with empty ``Pipeline``.
  - The ``thread_local`` parameter is now forwarded to the Redis client.


  Date: 2019-12-13
  - Removed support for Python 2.7 and 3.4.
  - Removed support for Django 2.0 and 2.1.
  - Added support for Python 3.8.
  - Added support for Django 2.2 and 3.0.
  - Changed msgpack-python soft dependency to msgpack.
  - Fixed ``.touch()`` method for sharded client.
  - Fixed prefix escaping for the sharded client.
  - Fixed ``.add()`` method to return a bool.


  Date: 2018-10-19
  - Add support and testing for Django 2.1 and Python 3.7. No actual code changes
  were required.
  - Add support for redis-py 3.0.
  - Add touch command.


  Date: 2018-10-19
  - Pin redis version to 2.10.6


  Date: 2018-03-01
  - Add testing and support for Django 2.0. No actual code changes were required.
  - Escape ``KEY_PREFIX`` and ``VERSION`` when used in glob expressions.
  - Improve handling timeouts less than 1ms.
  - Remove fakeredis support.
  - Add datetime, date, time, and timedelta serialization support to the JSON
  - The deprecated feature of passing ``True`` as a timeout value is no longer
  - Fix ``add()`` with a negative timeout to not store key (it is immediately
  - Remove support for Django < 1.11.
  - Add support for atomic incr if key is not set.


  Date: 2017-04-25
  - Drop deprecated exception with typo ConnectionInterrumped. Use
  ConnectionInterrupted instead.
  - Remove many workarounds related to old and not supported versions
  of django and redis-py.
  - Code cleaning and flake8 compliance fixes.
  - Add better impl for ``close`` method.
  - Fix compatibility warnings with python 3.6


  Date: 2017-01-02
  - Add the ability to enable write to slave when master is not available.
  - Add ``itersize`` parameter to ``delete_pattern``.


  Date: 2016-11-02
  - Fix incorrect behavior of ``clear()`` method.


  Date: 2016-09-21
  - Now only support Django 1.8 and above. Support for older versions has been dropped.
  - Remove undocumented and deprecated support for old connection string format.
  - Add support for ``PASSWORD`` option (useful when the password contains url unsafe
  - Make the package compatible with fake redis.
  - Fix compatibility issues with latest django version (1.10).


  Date: 2016-07-25
  - Fix possible race condition on incr implementation using
  lua script (thanks to prokaktus).


  Date: 2016-05-17
  - Fix minor ttl inconsistencies.


  Date: 2016-04-21
  - Fix timeout bug (thanks to skorokithakis)


  Date: 2016-04-13
  - Add additional check for avoid wrong exception on ``get_redis_connection``.


  Date: 2016-04-12
  - Make redis client pluggable (thanks to arnuschky)
  - Add version number inside python module (thanks to BertrandBordage)
  - Fix clear method (thanks to ostcar)
  - Add the ability to specify key prefix on delete and delete_pattern.
  - BREAKING CHANGE: improved compression support (make it more plugable).


  Date: 2015-10-31
  - Improved exception handling in herd client (thanks to brandoshmando)
  - Fix bug that not allows use generators on delete_many (thanks to ostcar).
  - Remove obsolete code that makes hard dependency to mspack.


  Date: 2015-07-03
  - Add ``persist`` and ``expire`` methods.
  - Remove old and broken dummy client.
  - Expose a redis lock method.


  Date: 2015-06-15
  - Add plugable serializers architecture (thanks to jdufresne)
  - Add json serializer (thanks to jdufresne)
  - Add msgpack serializer (thanks to uditagarwal)
  - Implement delete_pattern using iter_scan for better performance (thanks to lenzenmi)


  - Remove usage of deprecated ``get_cache`` method.
  - Added connection option SOCKET_CONNECT_TIMEOUT. [Jorge C. Leitão].
  - Replace setex and friends with set, because it now supports all need for atomic.
  updates (thanks to 23doors) (re revert changes from 3.8.x branch).
  - Fix django 1.8 compatibilities.
  - Fix django 1.9 compatibilities.
  - BREAKING CHANGE: Now timeout=0 works as django specified (expires immediately)
  - Now requires redis server >= 2.8
  - BREAKING CHANGE: ``redis_cache`` is no longer a valid package name


  - Backport django 1.8 fixes from master.


  - Minor fix on regular expression for old url notation.


  - Revert some changes from 3.8.1 that are incompatible with redis server < 2.6.12


  - Fix documentation related to new url format.
  - Fix documentation parts that uses now removed functions.
  - Fix invalid url transformation from old format (password was not set properly)
  - Replace setex and friends with set, because it now supports all need for atomic
  updates (thanks to 23doors).


  - Add compression support. (Thanks to alanjds)
  - Change package name from redis_cache to django_redis.
  - Add backward compatibility layer for redis_cache package name.
  - BACKWARD INCOMPATIBLE CHANGE: use StrictRedis instead of Redis class of redis-py
  - Add redis dummy backend for development purposes. (Thanks to papaloizouc)
  - Now use redis native url notation for connection string (the own connection string
  notation is also supported but is marked as deprecated).
  - Now requires redis-py >= 2.10.0
  - Remove deprecated ``raw_cache`` property from backend.


  - Add missing forward of version parameter from ``add()`` to ``set()`` function. (by fellowshipofone)


  - Improve docs (by dkingman).
  - Fix missing imports on sentinel client (by opapy).
  - Connection closing improvements on sentinel client (by opapy).


  - Add support for django's ``KEY_FUNCTION`` and ``REVERSE_KEY_FUNCTION`` (by teferi)
  - Accept float value for socket timeout.
  - Fix wrong behavior of ``DJANGO_REDIS_IGNORE_EXCEPTIONS`` with socket timeouts.
  - Backward incompatible change: now raises original exceptions instead of self defined.


  - Add ttl method purposed to be included in django core.
  - Add iter_keys method that uses redis scan methods for memory efficient keys retrieval.
  - Add version keyword parameter to keys.
  - Deprecate django 1.3.x support.


  - Fix wrong import on sentinel client.


  - Add pluggable connection factory.
  - Negative timeouts now works as expected.
  - Delete operation now returns a number of deleted items instead of None.


  - Fixed redis-py < 2.9.0 incompatibilities
  - Fixed runtests error with django 1.7


  - Removed: stats module (should be replaced with an other in future)
  - New: experimental client for add support to redis-sentinel.
  - Now uses a django ``DEFAULT_TIMEOUT`` constant instead of ``True``.
  Deprecation warning added for code that now uses ``True`` (unlikely).
  - Fix wrong forward of timeout on shard client.
  - Fix incr_version wrong behavior when using shard client (wrong client used for set new key).


  - Fix exception name from ConnectionInterrumped to
  ConnectionInterrupted maintaining an old exception class
  for backward compatibility (thanks Łukasz Langa (ambv))
  - Fix wrong behavior for "default" parameter on get method
  (also thanks to Łukasz Langa (ambv)).
  - Now added support for master-slave connection to default
  client (it still experimental because is not tested in
  production environments).
  - Merged SimpleFailoverClient experimental client (only for
  experiment with it, not ready for use in production)
  - Django 1.6 cache changes compatibility. Explicitly passing in
  timeout=None no longer results in using the default timeout.
  - Major code cleaning. (Thanks to Bertrand Bordage BertrandBordage)
  - Bugfixes related to some index error on hashring module.


  - Add SOCKET_TIMEOUT attribute to OPTIONS (thanks to eclipticplane)


  - Changed default behavior of connection error exceptions: now by default
  raises exception on connection error is occurred.
  Thanks to Mümin Öztürk:
  - cache.add now uses setnx redis command (atomic operation)
  - cache.incr and cache.decr now uses redis incrby command (atomic operation)


  - Fix python3 compatibility on utils module.


  - Add nx argument on set method for both clients (thanks to Kirill Zaitsev)


  - Bug fixes on sharded client.


  - Now reuse connection pool on massive use of ``get_cache`` method.


  - Fixed python 2.6 compatibility.


  - Now on call close() not disconnect all connection pool.


  - Fixed incorrect exception message on LOCATION has wrong format.
  (Thanks to Yoav Weiss)


  - Helpers for access to raw redis connection.


  - Python 3.2+ support.
  - Code cleaning and refactor.
  - Ignore exceptions (same behavior as memcached backend)
  - Pluggable clients.
  - Unified connection string.


  - Bug fixes on ``keys`` and ``delete_pattern`` methods.


  - Remove duplicate check if key exists on ``incr`` method.
  - Fix incorrect behavior of ``delete_pattern`` with sharded client.


  - New ``delete_pattern`` method. Useful for delete keys using wildcard syntax.


  - Many bug fixes.
  - Client side sharding.