Migrate from aioredis to redis-py with asyncio support (#233)

* Migrate from aioredis to redis with asyncio support

Add test for redis type
Fix imports from wrong module (for tests_sync)

* fixing merge conflicts and up to dating the lock file

Co-authored-by: Chayim I. Kirshen <c@kirshen.com>
This commit is contained in:
Serhii Charykov 2022-08-10 15:21:13 +03:00 committed by GitHub
parent e5e887229a
commit 4661459ddd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 484 additions and 494 deletions

View file

@ -5,7 +5,7 @@ import unasync
ADDITIONAL_REPLACEMENTS = {
"aredis_om": "redis_om",
"aioredis": "redis",
"async_redis": "sync_redis",
":tests.": ":tests_sync.",
"pytest_asyncio": "pytest",
"py_test_mark_asyncio": "py_test_mark_sync",
@ -26,11 +26,12 @@ def main():
),
]
filepaths = []
for root, _, filenames in os.walk(
Path(__file__).absolute().parent
):
for root, _, filenames in os.walk(Path(__file__).absolute().parent):
for filename in filenames:
if filename.rpartition(".")[-1] in ("py", "pyi",):
if filename.rpartition(".")[-1] in (
"py",
"pyi",
):
filepaths.append(os.path.join(root, filename))
unasync.unasync_files(filepaths, rules)