Skip to content

Support redis-py 7.x (Python 3.13 compatibility) #124

@omni-client

Description

@omni-client

Context

I'm using langgraph-checkpoint-redis with Python 3.13 for conversation memory in a LangGraph
agent.

Problem

Python 3.13 raises this error when using the Redis checkpointer:

File "redis/commands/helpers.py", line 115, in get_protocol_version
if isinstance(client, redis.Redis) or isinstance(client, redis.asyncio.Redis):
TypeError: isinstance() arg 2 must be a type, a tuple of types, or a union

Research Done

  1. Root cause: Python 3.13 made isinstance() stricter with typing constructs
  2. Fix exists: redis-py 7.1.0 includes the fix
  3. Blocker: langgraph-checkpoint-redis constrains redis>=5.2.1,<7.0.0

Request

Update the redis dependency to allow 7.x:

redis = ">=5.2.1"  # or ">=7.1.0"

Current Workaround

I'm monkey-patching get_protocol_version() to avoid the isinstance check, but would prefer using
the upstream fix.

Environment

  • Python 3.13
  • langgraph-checkpoint-redis 0.2.1
  • redis 6.4.0

I'm open to taking the issue on if there are no takers

Metadata

Metadata

Assignees

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