Skip to content

Commit

Permalink
Merge pull request #86 from MartB/master
Browse files Browse the repository at this point in the history
Migrate from aioredis to redis-py
  • Loading branch information
Snawoot authored Jun 10, 2022
2 parents f24869d + 32c1158 commit 344d709
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
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

0 comments on commit 344d709

Please sign in to comment.