shazamio / ShazamIO

🎵 Is a free asynchronous library from reverse engineered Shazam API written in Python 3.8+ with asyncio and aiohttp.
MIT License
519 stars 75 forks source link

Pydantic compatibility issue #80

Open PGSAVE opened 10 months ago

PGSAVE commented 10 months ago

There is a compatibility issue when other projects use Pydantic in addition to the Shazamio library.

Please update compatibility with new libraries, because shazamio uses very outdated versions of libraries.

shazamio 0.4.0.1 requires pydantic<2.0.0,>=1.10.2, but you have pydantic 2.5.3 which is incompatible.

dotX12 commented 9 months ago

@D2PF3 Hello! If you can help with this - I will be grateful! I'm currently developing core in rust.

magowiz commented 5 months ago

Hi, any news on this? I'm trying to include shazamio in a buildozer/kivy project, since the pydantic recipe points to 2.16.1, shazamio cannot work.

On android phone logcat I have:

 File "/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/python-installs/musenote/arm64-v8a/shazamio/__init__.py", line 1, in <module>
   File "/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/python-installs/musenote/arm64-v8a/shazamio/serializers.py", line 3, in <module>
   File "/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/python-installs/musenote/arm64-v8a/shazamio/schemas/base.py", line 20, in <module>
   File "/home/jenkins/workspace/nization_folder_musenote_develop/.buildozer/arm64-v8a/android/platform/build-arm64-v8a/build/python-installs/musenote/arm64-v8a/pydantic/_internal/_model_construction.py", line 115, in __new__
   File "<frozen abc>", line 106, in __new__
 TypeError: Cannot create a consistent method resolution
 order (MRO) for bases BaseModel, BaseIdTypeHref, Generic

I already reported this to python4android project here: https://github.com/kivy/python-for-android/issues/3024 thinking was pydantic_core issue.

Let me know if you need further information or if there is something I should try.

Best regards, magowiz