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
Somewhere between redis-py 2.7 and redis-py 2.10, the StrictRedis.__init__ and StrictRedis.from_url APIs diverged. They now take different keyword arguments
for errors and encoding_errors.
Is this a bug that will be fixed in later versions, or is it an intentional API change? I maintain pyramid_redis_sessions and will pin it to a version < 2.10 for now, but if it's an intentional change you plan to keep going forward, I'd like to know so I can accommodate the two different APIs.
The example below works on 2.7, and errors on 2.10:
importredisif__name__=='__main__':
# invoking StrictRedis directly is finer1=redis.StrictRedis(errors='strict')
r1.set('foo', 'bar')
printr1.get('foo')
# in redis-py 2.10, from_url now expects keyword `encoding_errors` instead# of errors...r2=redis.StrictRedis.from_url('redis://localhost:6379/0', errors='strict')
# ...but you don't find out until you access it and it raises TypeErrorprintr2.get('foo')
The text was updated successfully, but these errors were encountered:
@ericrasmussen Thanks for letting me know. It was an oversight. charset and errors can be passed again, but will now issue deprecation warnings. encoding and encoding_errors are preferred.
Somewhere between redis-py 2.7 and redis-py 2.10, the
StrictRedis.__init__
andStrictRedis.from_url
APIs diverged. They now take different keyword argumentsfor
errors
andencoding_errors
.Is this a bug that will be fixed in later versions, or is it an intentional API change? I maintain pyramid_redis_sessions and will pin it to a version < 2.10 for now, but if it's an intentional change you plan to keep going forward, I'd like to know so I can accommodate the two different APIs.
The example below works on 2.7, and errors on 2.10:
The text was updated successfully, but these errors were encountered: