You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following sequence of commands poses a problem for redis-py. It is a reduction of a real sequence of commands invoked by a copy script I wrote, and needless to say, figuring out the behavior in the comments confused me mightily.
from redis import Redis
source = Redis(db=0) # source opens a new connection to localhost/0
dest = Redis(db=0) # dest uses the existing connection to localhost/0
source.select(1) # since source and dest are sharing a connection,
# they will now both operate on database 1
copy(source, dest) # doesn't accomplish anything useful!
The text was updated successfully, but these errors were encountered:
Definitely a bug. I think it makes sense for .select() to swap the underlying connection for the instance .select() is called on. I'll play with it a bit and make sure it makes sense from a usability perspective.
This problem has been resolved in the "newapi" branch of redis-py. I plan on merging this branch with master in the next day or so and making an official release.
The following sequence of commands poses a problem for
redis-py
. It is a reduction of a real sequence of commands invoked by a copy script I wrote, and needless to say, figuring out the behavior in the comments confused me mightily.The text was updated successfully, but these errors were encountered: