Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from aioredis to redis-py #86

Merged
merged 1 commit into from
Jun 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ You can say thanks to the author by donations to these wallets:
* aiodns
* aiohttp
* aiosqlite
* aioredis
* redis-py
* PyYAML
* (optional) uvloop

Expand Down
5 changes: 1 addition & 4 deletions postfix_mta_sts_resolver/redis_cache.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import json
import uuid

import aioredis
from redis import asyncio as aioredis
from . import defaults
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):
ts, pol_id, pol_body = entry # pylint: disable=invalid-name,unused-variable
obj = (pol_id, pol_body)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
],
extras_require={
'sqlite': 'aiosqlite>=0.10.0',
'redis': 'aioredis>=2.0.0',
'redis': 'redis>=4.2.0rc1',
'dev': [
'pytest>=3.0.0',
'pytest-cov',
Expand Down
2 changes: 1 addition & 1 deletion snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ parts:
python-version: python3
python-packages:
- "aiosqlite>=0.10.0"
- "aioredis>=2.0.0"
- "redis>=4.2.0rc1"
build-packages:
- gcc
- make
Expand Down