Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

Commit

Permalink
Fix Python 3.11 error
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowone committed Feb 5, 2023
1 parent 19be499 commit 2d56d75
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions aioredis/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ class RedisError(Exception):
class ConnectionError(RedisError):
pass


class TimeoutError(asyncio.TimeoutError, builtins.TimeoutError, RedisError):
pass
if asyncio.TimeoutError is builtins.TimeoutError: # >= Python 3.11
class TimeoutError(builtins.TimeoutError, RedisError):
pass
else:
class TimeoutError(asyncio.TimeoutError, builtins.TimeoutError, RedisError):
pass


class AuthenticationError(ConnectionError):
Expand Down

0 comments on commit 2d56d75

Please sign in to comment.