File tree Expand file tree Collapse file tree 2 files changed +5
-17
lines changed Expand file tree Collapse file tree 2 files changed +5
-17
lines changed Original file line number Diff line number Diff line change 24
24
belong to and return a connection to it. ConnectionPool also implements
25
25
disconnect() to force all connections in the pool to disconnect from
26
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.
27
+ * redis-py no longer support the SELECT command. You can still connect to
28
+ a specific database by specifing it when instantiating a client instance
29
+ or by creating a connection pool. If you need to talk to multiplate
30
+ databases within your application, you should use a separate client
31
+ instance for each database you want to talk to.
34
32
* Completely refactored Publish/Subscribe support. The subscribe and listen
35
33
commands are no longer available on the redis-py Client class. Instead,
36
34
the `pubsub` method returns an instance of the PubSub class which contains
Original file line number Diff line number Diff line change @@ -294,16 +294,6 @@ def save(self):
294
294
"""
295
295
return self .execute_command ('SAVE' )
296
296
297
- def select (self , db ):
298
- """
299
- Select a differnet Redis database.
300
-
301
- WARNING: this could have severe consequences for pooled connections.
302
- It's highly advised to use a separate connection pool and client
303
- instance to work with multiple databases. Use this at your own risk.
304
- """
305
- return self .execute_command ('SELECT' , db )
306
-
307
297
def shutdown (self ):
308
298
"Shutdown the server"
309
299
try :
You can’t perform that action at this time.
0 commit comments