-
Notifications
You must be signed in to change notification settings - Fork 84
redis: Fix types of some options #1372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The socket_keepalive option in RedisClient is not an integer but a boolean. Also the healthcheck_interval option can accept not only integers but also float values. This fixes the types to parse these options accordingly. Note this change still keeps support for socket_keepalive=1 or socket_keepalive=0 , but would remove support for the other integer values such as 2 or -1.
f66dab0
to
2b4f38b
Compare
]) | ||
|
||
#: Client arguments that are expected to be float convertible. | ||
CLIENT_FLOAT_ARGS = frozenset([ | ||
'socket_timeout', | ||
'health_check_interval', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change intended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I think it is explained in the PR comment as well as the commit message ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. I missed the second sentence 😑. Sorry for that.
@Mergifyio backport stable/4.6 |
✅ Backports have been created
|
redis: Fix types of some options (backport #1372)
The socket_keepalive option in RedisClient is not an integer but a boolean. Also the healthcheck_interval option can accept not only integers but also float values. This fixes the types to parse these options accordingly.
Note this change still keeps support for socket_keepalive=1 or socket_keepalive=0 , but would remove support for the other integer values such as 2 or -1.