Skip to content
Snippets Groups Projects
Commit 32c11580 authored by MartB's avatar MartB
Browse files

Migrate from aioredis to redis-py

parent f24869d8
Branches
Tags
No related merge requests found
...@@ -30,7 +30,7 @@ You can say thanks to the author by donations to these wallets: ...@@ -30,7 +30,7 @@ You can say thanks to the author by donations to these wallets:
* aiodns * aiodns
* aiohttp * aiohttp
* aiosqlite * aiosqlite
* aioredis * redis-py
* PyYAML * PyYAML
* (optional) uvloop * (optional) uvloop
......
import json import json
import uuid import uuid
import aioredis from redis import asyncio as aioredis
from . import defaults from . import defaults
from .base_cache import BaseCache, CacheEntry from .base_cache import BaseCache, CacheEntry
# Remove once fixed: https://github.com/aio-libs/aioredis-py/issues/1115
aioredis.Redis.__del__ = lambda *args: None # type: ignore
def pack_entry(entry): def pack_entry(entry):
ts, pol_id, pol_body = entry # pylint: disable=invalid-name,unused-variable ts, pol_id, pol_body = entry # pylint: disable=invalid-name,unused-variable
obj = (pol_id, pol_body) obj = (pol_id, pol_body)
......
...@@ -26,7 +26,7 @@ setup(name='postfix_mta_sts_resolver', ...@@ -26,7 +26,7 @@ setup(name='postfix_mta_sts_resolver',
], ],
extras_require={ extras_require={
'sqlite': 'aiosqlite>=0.10.0', 'sqlite': 'aiosqlite>=0.10.0',
'redis': 'aioredis>=2.0.0', 'redis': 'redis>=4.2.0rc1',
'dev': [ 'dev': [
'pytest>=3.0.0', 'pytest>=3.0.0',
'pytest-cov', 'pytest-cov',
......
...@@ -13,7 +13,7 @@ parts: ...@@ -13,7 +13,7 @@ parts:
python-version: python3 python-version: python3
python-packages: python-packages:
- "aiosqlite>=0.10.0" - "aiosqlite>=0.10.0"
- "aioredis>=2.0.0" - "redis>=4.2.0rc1"
build-packages: build-packages:
- gcc - gcc
- make - make
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment