|
1 |
| -* 2.2.5 (in development) |
| 1 | + |
| 2 | +* 2.4 (in development) |
| 3 | + * WARNING: 2.4 contains several backwards incompatible changes. |
| 4 | + * Completely refactored Connection objects. Moved much of the Redis |
| 5 | + protocol packing for requests here, and eliminated the nasty dependencies |
| 6 | + it had on the client to do AUTH and SELECT commands on connect. |
| 7 | + * Connection objects now have a parser attribute. Parsers are responsible |
| 8 | + for reading data Redis sends. Two parsers ship with redis-py: a |
| 9 | + PythonParser and the HiRedis parser. redis-py will automatically use the |
| 10 | + HiRedis parser if you have the Python hiredis module installed, otherwise |
| 11 | + it will fall back to the PythonParser. You can force or the other, or even |
| 12 | + an external one by passing the `parser_class` argument to ConnectionPool. |
| 13 | + * Added a UnixDomainSocketConnection for users wanting to talk to the Redis |
| 14 | + instance running on a local machine only. You can use this connection |
| 15 | + by passing it to the `connection_class` argument of the ConnectionPool. |
| 16 | + * Connections no longer derive from threading.local. See threading.local |
| 17 | + note below. |
| 18 | + * ConnectionPool has been comletely refactored. The ConnectionPool now |
| 19 | + maintains a list of connections. The redis-py client only hangs on to |
| 20 | + a ConnectionPool instance, calling get_connection() anytime it needs to |
| 21 | + send a command. When get_connection() is called, the command name and |
| 22 | + any keys involved in the command are passed as arguments. Subclasses of |
| 23 | + ConnectionPool could use this information to identify the shard the keys |
| 24 | + belong to and return a connection to it. ConnectionPool also implements |
| 25 | + disconnect() to force all connections in the pool to disconnect from |
| 26 | + the Redis server. |
| 27 | + * redis-py does not treat the SELECT command as special anymore. Previously, |
| 28 | + redis-py tried to make sure you didn't shoot yourself in the foot by |
| 29 | + SELECTing a different database, then reusing that connection later and |
| 30 | + expecting it to be set. In practice, this caused more headaches than it |
| 31 | + was worth. So you can use SELECT if you really want to, although it's |
| 32 | + highly recommended to instead create a separate client instance and |
| 33 | + connection pool for each Redis database you want to talk to. |
| 34 | + * Completely refactored Publish/Subscribe support. The subscribe and listen |
| 35 | + commands are no longer available on the redis-py Client class. Instead, |
| 36 | + the `pubsub` method returns an instance of the PubSub class which contains |
| 37 | + all publish/subscribe support. Note, you can still PUBLISH from the |
| 38 | + redis-py client class if you desire. |
| 39 | + * Removed support for all previously deprecated commands or options. |
| 40 | + * redis-py no longer uses threading.local in any way. Since the Client |
| 41 | + class no longer holds on to a connection, it's no longer needed. You can |
| 42 | + now pass client instances between threads, and commands run on those |
| 43 | + threads will retrieve an available connection from the pool, use it and |
| 44 | + release it. It should now be trivial to use redis-py with eventlet or |
| 45 | + greenlet. |
2 | 46 | * Support Jython, fixing #97. Thanks to Adam Vandenberg for the patch.
|
3 | 47 | * Using __getitem__ now properly raises a KeyError when the key is not
|
4 | 48 | found. Thanks Ionuț Arțăriși for the patch.
|
|
0 commit comments