trisongz/aiokeydb-py

python 3.11 support

Closed this issue · 0 comments

l0rem commented

Hi! First of all, huge thanks for this repo and all the work that you put into it!

I just discovered this, and it seems like you don't officially support python versions newer than 3.8, importing library in my python3.11 project results in a following error

Traceback (most recent call last):
  File "core.py", line 7, in <module>
    from aiokeydb import from_url
  File "venv/lib/python3.11/site-packages/aiokeydb/__init__.py", line 57, in <module>
    from aiokeydb.client.serializers import SerializerType
  File "venv/lib/python3.11/site-packages/aiokeydb/client/__init__.py", line 39, in <module>
    from aiokeydb.client.serializers import SerializerType, BaseSerializer
  File "venv/lib/python3.11/site-packages/aiokeydb/client/serializers/__init__.py", line 7, in <module>
    from aiokeydb.client.serializers._pickle import PickleSerializer, DillSerializer
  File "venv/lib/python3.11/site-packages/aiokeydb/client/serializers/_pickle.py", line 29, in <module>
    class DefaultProtocols:
  File "venv/lib/python3.11/site-packages/aiokeydb/client/serializers/_pickle.py", line 32, in DefaultProtocols
    dill: int = dill.HIGHEST_PROTOCOL
                ^^^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'object' has no attribute 'HIGHEST_PROTOCOL'

The easy fix for me was installing dill, but i am not sure if I will face more problems further down the road with my 3.11 install :) Do you happen to have any suggestions or tips for me?

My intention is to use this in production, it will also be my first attempt at using KeyDb instead of Redis :) Thanks a lot!