Skip to content

Async client broken with redis 8.1.0 (Is_Cluster forwards unknown connection_kwargs) #261

Description

@Naseem77

A clean pip install falkordb today pulls redis 8.1.0, and the async client can't run anything:

from falkordb.asyncio import FalkorDB

g = FalkorDB(host="localhost", port=6379).select_graph("t")
await g.query("RETURN 1")
# TypeError: Redis.__init__() got an unexpected keyword argument 'himport_registry'

The sync client is fine, and redis 8.0.1 is fine — it's only async + redis >= 8.1.0.

What's happening

Is_Cluster() in falkordb/asyncio/cluster.py forwards the whole connection_kwargs dict into a sync client:

kwargs = pool.connection_kwargs.copy()
info = sync_redis.Redis(**kwargs).info(section="server")

redis 8.1.0's ConnectionPool.__init__ now injects its own himport_registry into connection_kwargs, and Redis.__init__ doesn't accept it. Since this probe runs during connection setup, every query fails before anything is sent.

This is #235 again

#235 was the same thing with a different key — path instead of himport_registry, same function, same line, same unexpected keyword argument. It was fixed by special-casing that one key:

if pool.connection_class is redis.UnixDomainSocketConnection:
    kwargs["unix_socket_path"] = kwargs.pop("path")

redis shipped 8.1.0 eleven days later and it broke again. Any future internal addition on redis's side will do the same.

Suggested fix

Pass only what Redis.__init__ actually accepts:

_accepted = inspect.signature(sync_redis.Redis.__init__).parameters
kwargs = {k: v for k, v in kwargs.items() if k in _accepted}

info = sync_redis.Redis(**kwargs).info(section="server")

I patched this locally on falkordb 1.6.2 + redis 8.1.0 and async works again (RETURN 1[[1]]). Filtering by signature also covers the path case, so the existing special-case could go.

The sync client already does something similar in cluster.py — it pulls fields out by name rather than forwarding everything, which is why it never broke.

Also worth noting

  • redis>=7.1.0 has no upper bound, so this reaches users the moment redis publishes. Might be worth a cap until the fix ships.
  • Bump redis from 7.4.0 to 8.1.0 #258 (Bump redis 7.4.0 → 8.1.0) has been failing on Python 3.10–3.14 since 2026-07-30 with this exact TypeError. The fix above should make it green.

Versions

falkordb 1.6.2, redis 8.1.0 (8.0.1 works), Python 3.11 / 3.12, macOS + Linux CI

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions