This repository was archived by the owner on Feb 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 332
This repository was archived by the owner on Feb 21, 2023. It is now read-only.
TypeError: duplicate base class TimeoutError #1443
Copy link
Copy link
Open
Labels
Description
Describe the bug
When trying to import aioredis in Python 3.11 an error is raised
To Reproduce
1- use python 3.11
2- try to import aioredis
3- this error is raised:
>>> import aioredis
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ".venv/lib64/python3.11/site-packages/aioredis/__init__.py", line 1, in <module>
from aioredis.client import Redis, StrictRedis
File ".venv/lib64/python3.11/site-packages/aioredis/client.py", line 32, in <module>
from aioredis.connection import (
File ".venv/lib64/python3.11/site-packages/aioredis/connection.py", line 33, in <module>
from .exceptions import (
File ".venv/lib64/python3.11/site-packages/aioredis/exceptions.py", line 14, in <module>
class TimeoutError(asyncio.TimeoutError, builtins.TimeoutError, RedisError):
TypeError: duplicate base class TimeoutErrorExpected behavior
it should import correctly without errors. I think the problem is in aioredis/exceptions.py#L14
class TimeoutError(asyncio.TimeoutError, builtins.TimeoutError, RedisError):
passThe asyncio.TimeoutError is inheriting from builtins.TimeoutError and they are both used as base classes which python doesn't like.
Logs/tracebacks
already added abovePython Version
$ python --version
3.11.0aioredis Version
$ python -m pip show aioredis
Name: aioredis
Version: 2.0.1
Summary: asyncio (PEP 3156) Redis support
Home-page: https://github.com/aio-libs/aioredis-py
Author:
Author-email:
License: MIT
Location: /mnt/d/dev/python/smsarko/smsarko-fastapi/.venvl/lib64/python3.11/site-packages
Requires: async-timeout, typing-extensions
Required-by:Additional context
No response
Code of Conduct
- I agree to follow the aio-libs Code of Conduct
strongbugman and nanarino