redis / redis-py

Redis Python client
MIT License
12.4k stars 2.48k forks source link

Fail with Python 3.12 #3299

Open shadchin opened 4 days ago

shadchin commented 4 days ago

Version: last version 5.0.7

Platform: all platforms

Description:

Fail import redis.commands.graph with Python 3.12+

(venv312) shadchin@jakku:~/venv312/bin$ python -c 'import redis.commands.graph'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/shadchin/venv312/lib/python3.12/site-packages/redis/commands/graph/__init__.py", line 4, in <module>
    from .commands import AsyncGraphCommands, GraphCommands
  File "/home/shadchin/venv312/lib/python3.12/site-packages/redis/commands/graph/commands.py", line 6, in <module>
    from .query_result import AsyncQueryResult, QueryResult
  File "/home/shadchin/venv312/lib/python3.12/site-packages/redis/commands/graph/query_result.py", line 3, in <module>
    from distutils.util import strtobool
ModuleNotFoundError: No module named 'distutils'
gerzse commented 1 hour ago

@shadchin Please note that Python 3.12 is not yet supported in redis-py. Work is in progress on this. Can you try 3.11 in the meanwhile?