-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reader: partly restore the previous behaviour
Version 3.0.0 changed the way sets and maps are handled in libvalkey-py. Now, all the sets and dicts were treated as lists, maps being lists of tuples. This change was done without keeping `valkey-py` in mind. As it turned out, this way of handling maps is not really applicable to `valkey-py` because `valkey-py` doesn't know what data type it expects. Hence, it can't tell whether the returned list should be treated as a map or left as it is. This commit partly reverts the behaviour to what it was pre-3.0.0, leaving maps as dicts all the time. All sets, though, are being treated as lists now when `convertSetsToLists=True`. While this behaviour excludes some exotic use cases allowed by RESP like set or array being a key of a map, it does not affect the consumer library as much, and none of such exotic use cases are being used in the real world anyway. Signed-off-by: Mikhail Koviazin <[email protected]>
- Loading branch information
Showing
4 changed files
with
72 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters