mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
chore: aioredis version without importlib
This commit is contained in:
parent
8136ce8ff8
commit
ba08aab63f
1 changed files with 1 additions and 2 deletions
|
|
@ -6,7 +6,6 @@ import asyncio
|
||||||
import logging
|
import logging
|
||||||
import typing
|
import typing
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
from importlib.metadata import version
|
|
||||||
|
|
||||||
import aioredis
|
import aioredis
|
||||||
|
|
||||||
|
|
@ -394,7 +393,7 @@ class RedisStorage2(BaseStorage):
|
||||||
async def redis(self) -> AioRedisAdapterBase:
|
async def redis(self) -> AioRedisAdapterBase:
|
||||||
"""Get adapter based on aioredis version."""
|
"""Get adapter based on aioredis version."""
|
||||||
if self._redis is None:
|
if self._redis is None:
|
||||||
redis_version = version("aioredis").split(".")[0]
|
redis_version = aioredis.__version__.split(".")[0]
|
||||||
connection_data = dict(
|
connection_data = dict(
|
||||||
host=self._host,
|
host=self._host,
|
||||||
port=self._port,
|
port=self._port,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue