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
Hi,
I discovered today when using the function brpoplpush, setting a timeout with a float value will result in the returned error: timeout is negative.
I have been able to reproduce this without issue, and this error is returned only for floats and not integer types. Additionally, when using the actual Redis package, this error is not present, and timeout values of float types are permitted. Doing some investigations, the _blocking function does state in its docstring: The timeout must be an integer, and 0 means infinite., hence, it does seem there is an implicit restriction of only integers being allowed (although this goes against the original Redis package). I think this needs to be updated to better reflect the Redis package.
Cheers :)
The text was updated successfully, but these errors were encountered:
It looks like floating-point timeouts are a new feature in Redis 6 (see History section of https://redis.io/commands/brpoplpush). Fakeredis doesn't generally have much support for Redis 6 features, but pull requests are welcome.
Hi,
I discovered today when using the function
brpoplpush
, setting a timeout with a float value will result in the returned error:timeout is negative
.I have been able to reproduce this without issue, and this error is returned only for floats and not integer types. Additionally, when using the actual Redis package, this error is not present, and timeout values of float types are permitted. Doing some investigations, the
_blocking
function does state in its docstring:The timeout must be an integer, and 0 means infinite.
, hence, it does seem there is an implicit restriction of only integers being allowed (although this goes against the original Redis package). I think this needs to be updated to better reflect the Redis package.Cheers :)
The text was updated successfully, but these errors were encountered: