Uppercase commands in CommandsParser.get_keys #2236
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request check-list
$ toxpass with this change (including linting)?I haven't been able to get
toxto pass locally. I'm unsure what the problem is, but it seems like it's related touvloop. I'm sure it's just a problem with my dev environment as everything passes in CI.Description of change
I ran into issues when migrating from the blocking
RedisClustertoasyncio.RedisClusterwhereasyncio.CommandsParser.get_keyswould raise errors about commands not existing, even though everything worked with the blocking client. Passing the commands toasyncio.RedisCluster.execute_commandas uppercase strings fixed the problem.This change makes sure that commands passed to
asyncio.CommandsParser.get_keysare always uppercased when used with theself.commandsdict. This behavior is consistent with the blocking client. I thought that the commands maybe should be uppercased before being passed toget_keysbut I haven't been able to find any code that looks like it does that. For reference, I was using commands from a proprietary Redis module.