Skip to content
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

Handle RESP3 sets as Python lists #3324

Merged
merged 4 commits into from
Jul 22, 2024

Commits on Jul 19, 2024

  1. Handle RESP3 sets as Python lists

    Although the RESP3 protocol defines the set data structure, sometimes
    the responses from the Redis server contain sets with nested maps, which
    cannot be represented in Python as sets with nested dicts, because dicts
    are not hashable.
    
    Versions of HIREDIS before 3.0.0 would cause segmentation fault when
    parsing such responses. Starting with version 3.0.0 the problem was
    fixed, with the compromise that RESP3 sets are represented as Python
    lists.
    
    The embedded RESP3 parser was so far trying to represent RESP3 sets as
    Python sets, if possible. Only when this was not possible it would
    switch to the list representation. Arguably this is not the best user
    experience, not knowing when you will get back a set or a list.
    
    Upgrade the required hiredis-py version to be at least 3.0.0, and change
    the embedded parser to always represent RESP3 sets as lists. This way we
    get a consistent experience in all cases.
    
    This is a breaking change.
    gerzse committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    184af84 View commit details
    Browse the repository at this point in the history
  2. Also cover RESP2 sets

    gerzse committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    89d75ca View commit details
    Browse the repository at this point in the history
  3. Fix failing tests

    gerzse committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    f5e56db View commit details
    Browse the repository at this point in the history
  4. Fix async RESP3 parser

    gerzse committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    b90fbac View commit details
    Browse the repository at this point in the history