Don't worry about ormsgpack import error, it's always required now

This commit is contained in:
Danielle McLean 2024-07-23 10:37:38 +10:00
parent 21b7c28692
commit 86761bc420
Signed by: 00dani
GPG key ID: 6854781A0488421C

View file

@ -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