Skip to content

Commit

Permalink
fix:Using DefaultParser instead of BaseParser
Browse files Browse the repository at this point in the history
  • Loading branch information
cunla committed Jul 16, 2023
1 parent bdbe88c commit 553921c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fakeredis/aioredis.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
import sys
from typing import Union, Optional

import redis

from ._server import FakeBaseConnectionMixin

if sys.version_info >= (3, 11):
Expand All @@ -14,7 +12,7 @@
from async_timeout import timeout as async_timeout

import redis.asyncio as redis_async # aioredis was integrated into redis in version 4.2.0 as redis.asyncio
from redis.asyncio.connection import BaseParser
from redis.asyncio.connection import DefaultParser

from . import _fakesocket
from . import _helpers
Expand All @@ -30,7 +28,7 @@ def __init__(self, *args, **kwargs):
self.responses = asyncio.Queue()

def _decode_error(self, error):
parser = BaseParser(1) if redis.VERSION < (5, 0) else BaseParser()
parser = DefaultParser(1)
return parser.parse_error(error.value)

def put_response(self, msg):
Expand Down

0 comments on commit 553921c

Please sign in to comment.