Pottery Versions Save

Redis for humans. 🌎🌍🌏

v3.0.0

2 years ago

Breaking Change: Redlock now consistently uses seconds for all time units

In particular:

  1. The auto_release_time argument to Redlock.__init__() and synchronize() is now in seconds (was previously milliseconds)
  2. Redlock.locked() now returns how much longer you'll hold the lease in seconds (or 0 if you don't hold the lock; and was also previously milliseconds)

What's Changed

Full Changelog: https://github.com/brainix/pottery/compare/v2.3.7...v3.0.0

v2.3.7

2 years ago

Optimization: CachedOrderedDict.__init__()

Dramatically improve the performance of CachedOrderedDict.__init__(). Prior to this release, we were making multiple round trips to Redis, one per dict_key. As of this release, we make a single bulk call to Redis.

What's Changed

Full Changelog: https://github.com/brainix/pottery/compare/v2.3.6...v2.3.7

v2.3.6

2 years ago
  1. Bug Fix: Properly configure logging for the Pottery library
  2. Optimization: Prefer Redis UNLINK over DEL; UNLINK is faster and non-blocking

What's Changed

Full Changelog: https://github.com/brainix/pottery/compare/v2.3.5...v2.3.6

v2.3.5

2 years ago

Bug Fix: Don't allow a RedisDeque to equal a RedisList...

...even if they're both on the same Redis instance and have the same key.

Before this release:

>>> from pottery import RedisDeque, RedisList
>>> RedisDeque(key='videos:dicts') == RedisList(key='videos:dicts')
True

As of this release:

>>> from pottery import RedisDeque, RedisList
>>> RedisDeque(key='videos:dicts') == RedisList(key='videos:dicts')
False

What's Changed

Full Changelog: https://github.com/brainix/pottery/compare/v2.3.4...v2.3.5

v2.3.4

2 years ago

Bug Fix: Don't allow RedisDeques to equal Python lists...

...even when they contain the same elements. Observe:

>>> import collections
>>> collections.deque([1, 2, 3]) == [1, 2, 3]
False

What's Changed

Full Changelog: https://github.com/brainix/pottery/compare/v2.3.3...v2.3.4

v2.3.3

2 years ago

Bug Fix: Don't allow RedisDeques to equal RedisLists...

...even when they contain the same elements. Observe:

>>> import collections
>>> collections.deque([1, 2, 3]) == [1, 2, 3]
False

What's Changed

Full Changelog: https://github.com/brainix/pottery/compare/v2.3.2...v2.3.3

v2.3.2

2 years ago

Bug Fix: Properly compare RedisLists on different Redis databases

Prior to this release, list1 == list2 would fail if both were RedisLists but on different Redis databases. This is because we'd try to use the same Redis pipeline for both lists. Fixed in #572.

What's Changed

Full Changelog: https://github.com/brainix/pottery/compare/v2.3.1...v2.3.2

v2.3.1

2 years ago

Bug Fix: More robustly test if two Redis clients talk to the same database

Previously, we were comparing the two clients' connection_kwargs, but connection_kwargs contains more than just host, port, and db:

>>> from redis import Redis
>>> redis = Redis()
>>> redis.connection_pool.connection_kwargs
{'db': 0, 'username': None, 'password': None, 'socket_timeout': None, 'encoding': 'utf-8', 'encoding_errors': 'strict', 'decode_responses': False, 'retry_on_error': [], 'retry': None, 'health_check_interval': 0, 'client_name': None, 'redis_connect_func': None, 'host': 'localhost', 'port': 6379, 'socket_connect_timeout': None, 'socket_keepalive': None, 'socket_keepalive_options': None}

This PR allows Pottery to recognize that two Redis clients are connected to the same database even if their socket timeout our retry policies are different.

Bug Fix: Make RedisSet.contains_many() work for non-JSONifyable objects

v2.3.0

2 years ago

New Feature: RedisSimpleQueue

RedisSimpleQueue is a Redis-backed multi-producer, multi-consumer FIFO queue compatible with Python’s queue.SimpleQueue. In general, use a Python queue.Queue if you’re using it in one or more threads, use multiprocessing.Queue if you’re using it between processes, and use RedisSimpleQueue if you’re sharing it across machines or if you need for your queue to persist across application crashes or restarts.

What's Changed

Full Changelog: https://github.com/brainix/pottery/compare/v2.2.2...v2.3.0

v2.2.2

2 years ago

Bug Fix: Import Script from the correct place

Reported in #552, fixed in #554.

What's Changed

Full Changelog: https://github.com/brainix/pottery/compare/v2.2.1...v2.2.2