Don't worry about ormsgpack import error, it's always required now
This commit is contained in:
parent
21b7c28692
commit
86761bc420
1 changed files with 1 additions and 4 deletions
|
@ -1,8 +1,8 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from contextlib import suppress
|
|
||||||
from typing import Any, Generic, Optional, TypeVar
|
from typing import Any, Generic, Optional, TypeVar
|
||||||
|
|
||||||
|
import ormsgpack
|
||||||
from aiocache import Cache
|
from aiocache import Cache
|
||||||
from aiocache.serializers import BaseSerializer
|
from aiocache.serializers import BaseSerializer
|
||||||
from pydantic.type_adapter import TypeAdapter
|
from pydantic.type_adapter import TypeAdapter
|
||||||
|
@ -10,9 +10,6 @@ from yarl import URL
|
||||||
|
|
||||||
T = TypeVar("T")
|
T = TypeVar("T")
|
||||||
|
|
||||||
with suppress(ImportError):
|
|
||||||
import ormsgpack
|
|
||||||
|
|
||||||
|
|
||||||
class OrmsgpackSerializer(BaseSerializer, Generic[T]):
|
class OrmsgpackSerializer(BaseSerializer, Generic[T]):
|
||||||
DEFAULT_ENCODING = None
|
DEFAULT_ENCODING = None
|
||||||
|
|
Loading…
Reference in a new issue