From 1c322a735dedb8d9eb266f0e54280feebeecc82b Mon Sep 17 00:00:00 2001 From: Andrew Date: Sat, 27 Aug 2022 13:17:12 +0300 Subject: [PATCH 1/3] Fix failed UUID dataclass_factory test --- shazamio/factory_misc.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shazamio/factory_misc.py b/shazamio/factory_misc.py index f647364..e2e1010 100644 --- a/shazamio/factory_misc.py +++ b/shazamio/factory_misc.py @@ -1,4 +1,5 @@ from dataclass_factory import Factory +from dataclass_factory.schema_helpers import uuid_schema from shazamio.factory import FactorySchemas from shazamio.models import ArtistInfo @@ -15,6 +16,8 @@ from shazamio.models import YoutubeData from shazamio.models import ResponseTrack +from uuid import UUID + FACTORY_TRACK = Factory( schemas={ TrackInfo: FactorySchemas.FACTORY_TRACK_SCHEMA, @@ -27,6 +30,7 @@ RelatedSection: FactorySchemas.FACTORY_RELATED_SECTION_SCHEMA, YoutubeData: FactorySchemas.FACTORY_YOUTUBE_TRACK_SCHEMA, ResponseTrack: FactorySchemas.FACTORY_RESPONSE_TRACK_SCHEMA, + UUID: uuid_schema }, debug_path=True, ) From 8a053146d4417c0a9b906d931c377fd8c4ce4e61 Mon Sep 17 00:00:00 2001 From: dotX12 Date: Sat, 27 Aug 2022 19:29:35 +0300 Subject: [PATCH 2/3] black project --- shazamio/factory_misc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shazamio/factory_misc.py b/shazamio/factory_misc.py index e2e1010..b1ea73c 100644 --- a/shazamio/factory_misc.py +++ b/shazamio/factory_misc.py @@ -30,7 +30,7 @@ RelatedSection: FactorySchemas.FACTORY_RELATED_SECTION_SCHEMA, YoutubeData: FactorySchemas.FACTORY_YOUTUBE_TRACK_SCHEMA, ResponseTrack: FactorySchemas.FACTORY_RESPONSE_TRACK_SCHEMA, - UUID: uuid_schema + UUID: uuid_schema, }, debug_path=True, ) From 8082daa31039cbc99b8844078d47c03a91bcf74a Mon Sep 17 00:00:00 2001 From: dotX12 Date: Sat, 27 Aug 2022 19:54:30 +0300 Subject: [PATCH 3/3] update pyproject.toml --- pyproject.toml | 4 ++-- requirements.txt | 4 ++-- shazamio/factory_misc.py | 3 --- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e0eee40..1e08027 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,10 +18,10 @@ python = "^3.8" numpy = "^1.22.1" aiohttp = "^3.8.1" pydub = "^0.25.1" -dataclass-factory = "^2.10.1" +dataclass-factory = "2.16" aiofiles = "^0.8.0" pytest = "^7.1.2" -pytest-asyncio = "^0.18.3" +pytest-asyncio = "^0.19.0" anyio = "^3.6.1" [build-system] diff --git a/requirements.txt b/requirements.txt index df31e73..b360357 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ aiofiles~=0.8.0 aiohttp~=3.8.1 attrs==20.3.0 chardet==3.0.4 -dataclass-factory==2.10.1 +dataclass-factory==2.16 idna==3.1 multidict==5.1.0 numpy~=1.22.1 @@ -12,5 +12,5 @@ yarl==1.6.3 pytest~=7.1.2 setuptools~=60.7.0 -pytest-asyncio~=0.18.3 +pytest-asyncio~=0.19.0 anyio~=3.6.1 \ No newline at end of file diff --git a/shazamio/factory_misc.py b/shazamio/factory_misc.py index b1ea73c..2d9cec6 100644 --- a/shazamio/factory_misc.py +++ b/shazamio/factory_misc.py @@ -1,5 +1,4 @@ from dataclass_factory import Factory -from dataclass_factory.schema_helpers import uuid_schema from shazamio.factory import FactorySchemas from shazamio.models import ArtistInfo @@ -16,7 +15,6 @@ from shazamio.models import YoutubeData from shazamio.models import ResponseTrack -from uuid import UUID FACTORY_TRACK = Factory( schemas={ @@ -30,7 +28,6 @@ RelatedSection: FactorySchemas.FACTORY_RELATED_SECTION_SCHEMA, YoutubeData: FactorySchemas.FACTORY_YOUTUBE_TRACK_SCHEMA, ResponseTrack: FactorySchemas.FACTORY_RESPONSE_TRACK_SCHEMA, - UUID: uuid_schema, }, debug_path=True, )