From bb2d1cd107ee365034f591a53beea1042338358f Mon Sep 17 00:00:00 2001 From: Daniel Amar Date: Thu, 24 Oct 2024 17:40:22 -0400 Subject: [PATCH] Update shazamio version as well as pydantic version to >2 --- pyproject.toml | 3 +-- requirements.txt | 30 +++++++++++++++--------------- shazamio/schemas/base.py | 11 +++++------ 3 files changed, 21 insertions(+), 23 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 60a322c..ba6c041 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "shazamio" -version = "0.6.0" +version = "0.7.0" description = "Is a asynchronous framework from reverse engineered Shazam API written in Python 3.8+ with asyncio and aiohttp." authors = ["dotX12"] license = "MIT License" @@ -21,7 +21,6 @@ pydub = "^0.25.1" dataclass-factory = "2.16" aiofiles = "23.2.1" anyio = "4.3.0" -pydantic = "^1.10.2" shazamio-core = "^1.0.7" aiohttp-retry = "^2.8.3" diff --git a/requirements.txt b/requirements.txt index ccf4598..9686c87 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,16 +1,16 @@ -aiofiles~=0.8.0 -aiohttp~=3.8.1 -attrs==20.3.0 -chardet==3.0.4 -dataclass-factory==2.16 -idna==3.1 -multidict==5.1.0 -numpy~=1.22.1 -pydub==0.25.1 -typing-extensions==3.7.4.3 -yarl==1.6.3 +aiofiles +aiohttp +attrs +chardet +dataclass-factory +idna +multidict +numpy +pydub +typing-extensions +yarl -pytest~=7.1.2 -setuptools~=65.5.1 -pytest-asyncio~=0.19.0 -anyio~=3.6.1 +pytest +setuptools +pytest-asyncio +anyio diff --git a/shazamio/schemas/base.py b/shazamio/schemas/base.py index 98a184c..305a5c8 100644 --- a/shazamio/schemas/base.py +++ b/shazamio/schemas/base.py @@ -3,7 +3,6 @@ from typing import TypeVar from pydantic import BaseModel -from pydantic.generics import GenericModel T = TypeVar("T", bound=BaseModel) @@ -17,22 +16,22 @@ class BaseIdTypeHref(BaseHref): type: str -class BaseIdTypeHrefAttributesModel(GenericModel, BaseIdTypeHref, Generic[T]): +class BaseIdTypeHrefAttributesModel(BaseIdTypeHref, Generic[T]): attributes: T -class BaseAttributesModel(GenericModel, BaseModel, Generic[T]): +class BaseAttributesModel(BaseModel, Generic[T]): attributes: T -class BaseDataModel(GenericModel, BaseModel, Generic[T]): +class BaseDataModel(BaseModel, Generic[T]): data: T -class BaseHrefNextData(GenericModel, BaseHref, Generic[T]): +class BaseHrefNextData(BaseHref, Generic[T]): next: Optional[str] = None data: T -class BaseHrefData(GenericModel, BaseHref, Generic[T]): +class BaseHrefData(BaseHref, Generic[T]): data: T