redis-py icon indicating copy to clipboard operation
redis-py copied to clipboard

Fail with Python 3.12

Open shadchin opened this issue 1 year ago • 3 comments

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'

shadchin avatar Jun 29 '24 19:06 shadchin

@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?

gerzse avatar Jul 03 '24 18:07 gerzse

It's not blocking me yet, I just decided to let you know, in case you didn't know

shadchin avatar Jul 04 '24 10:07 shadchin

I would like to know, when are you planning compatibility implementation with Python 3.12?

AniaKru95 avatar Jul 09 '24 07:07 AniaKru95

3.12 is listed as supported in setup.py/pypi. Is that accurate? If so can we close this ticket?

rtaycher avatar Feb 11 '25 03:02 rtaycher

3.13 installs and imports

On the other hand some parts of tests fail at least locally (might be my setup (also pytest-profiling needs to be updated to 1.8.1 to replace the removed pipes library)

Can we declare 3.13 supported? If not what needs to be done for it to be supported? Should I open another ticket?

rtaycher avatar Feb 11 '25 04:02 rtaycher

Hi @rtaycher, I'll check the compatibility with 3.12. If it works without errors, this issue should be closed as it is related to 3.12. For 3.13 support, I suggest opening a new issue to track the request.

petyaslavova avatar Feb 11 '25 08:02 petyaslavova

3.13 ticket https://github.com/redis/redis-py/issues/3501#issue-2844223260

rtaycher avatar Feb 11 '25 08:02 rtaycher

Half of the pipeline actions are running with Python 3.12 so the compatibility has been fixed. Closing this issue.

petyaslavova avatar Feb 11 '25 11:02 petyaslavova