From 1b90b2ad94f9c15482e6b6d909e2990119d251c6 Mon Sep 17 00:00:00 2001 From: Xiretza Date: Mon, 22 Aug 2022 08:56:13 +0200 Subject: [PATCH] Replace aioredis with redis-py aioredis has been merged into redis-py and will no longer be maintained as a separate project. --- etebase_server/fastapi/redis.py | 2 +- etebase_server/fastapi/routers/websocket.py | 2 +- requirements.in/base.txt | 2 +- requirements.txt | 15 +++++++++++---- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/etebase_server/fastapi/redis.py b/etebase_server/fastapi/redis.py index c4d697c..5cf8daf 100644 --- a/etebase_server/fastapi/redis.py +++ b/etebase_server/fastapi/redis.py @@ -1,5 +1,5 @@ import typing as t -import aioredis +from redis import asyncio as aioredis from etebase_server.django import app_settings diff --git a/etebase_server/fastapi/routers/websocket.py b/etebase_server/fastapi/routers/websocket.py index 019f58f..211b13d 100644 --- a/etebase_server/fastapi/routers/websocket.py +++ b/etebase_server/fastapi/routers/websocket.py @@ -1,7 +1,7 @@ import asyncio import typing as t -import aioredis +from redis import asyncio as aioredis from asgiref.sync import sync_to_async from django.db.models import QuerySet from fastapi import APIRouter, Depends, WebSocket, WebSocketDisconnect, status diff --git a/requirements.in/base.txt b/requirements.in/base.txt index e253c5e..6410748 100644 --- a/requirements.in/base.txt +++ b/requirements.in/base.txt @@ -5,4 +5,4 @@ fastapi typing_extensions uvicorn[standard] aiofiles -aioredis +redis>=4.2.0rc1 diff --git a/requirements.txt b/requirements.txt index 71085cf..f81eb35 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,8 +6,6 @@ # aiofiles==0.8.0 # via -r requirements.in/base.txt -aioredis==2.0.1 - # via -r requirements.in/base.txt anyio==3.5.0 # via # starlette @@ -17,11 +15,13 @@ asgiref==3.5.0 # django # uvicorn async-timeout==4.0.2 - # via aioredis + # via redis cffi==1.15.0 # via pynacl click==8.0.4 # via uvicorn +deprecated==1.2.13 + # via redis django==3.2.13 # via -r requirements.in/base.txt fastapi==0.75.0 @@ -34,18 +34,24 @@ idna==3.3 # via anyio msgpack==1.0.3 # via -r requirements.in/base.txt +packaging==21.3 + # via redis pycparser==2.21 # via cffi pydantic==1.9.0 # via fastapi pynacl==1.5.0 # via -r requirements.in/base.txt +pyparsing==3.0.9 + # via packaging python-dotenv==0.19.2 # via uvicorn pytz==2022.1 # via django pyyaml==6.0 # via uvicorn +redis==4.3.4 + # via -r requirements.in/base.txt sniffio==1.2.0 # via anyio sqlparse==0.4.2 @@ -55,7 +61,6 @@ starlette==0.17.1 typing-extensions==4.1.1 # via # -r requirements.in/base.txt - # aioredis # pydantic uvicorn[standard]==0.17.6 # via -r requirements.in/base.txt @@ -65,3 +70,5 @@ watchgod==0.8.1 # via uvicorn websockets==10.2 # via uvicorn +wrapt==1.14.1 + # via deprecated