Skip to content

Redis-py

Pre-release
Pre-release

Choose a tag to compare

@HassanAbouelela HassanAbouelela released this 25 Jul 21:32
· 11 commits to main since this release
ea19a74

This release switches from aioredis v2 to redis-py. If you've made the migration to the first release candidate, there shouldn't be much that needs changing. The required changes are listed below. Since aioredis is mostly a subset of redis-py in version 2, you can start using more features after this release.

Added

  • RedisSession.connect can take an optional ping flag which specifies if the services should be validated with a PING
  • RedisSession.connect returns it's self so it can be better chained when creating the client
  • RedisSession.pool was added back after being removed in the previous release candidate

Changed

  • Switch aioredis for redis ~= 4.2.0
  • RedisSession no longer takes a URL, but accepts all parameters which can be passed to redis.asyncio.Redis
  • RedisSessionNotConnected is more explicit about the issue being a lack of calling the connect method, as opposed to actually being connected.
  • RedisSession.connected has been renamed to RedisSession.valid
  • RedisCache.delete returns the number of deleted entries

Deprecated

  • RedisSession.pool has been deprecated due to being an unnecessary wrapper around RedisSession.client.connection_pool. For most cases, you should perform the operations directly from the client, and it'll manage all the pooling overhead. If you truly need to access the pool directly, you can do so through the client.

Full Changelog: v1.0.0-rc1...v1.0.0-rc2