Hot-fix release after #1828.
In 0.19.0
we've loosen pydantic requirements to accept both 1.x and 2.x since huggingface_hub
is compatible with both. However, it started to cause issues when installing both huggingface_hub[inference]
and tensorflow
in a Python3.8 environment. The problem comes from the fact that on Python3.8, Pydantic>=2.x and tensorflow don't seem to be compatible. Tensorflow depends on
typing_extension<=4.5.0
while pydantic 2.x requires typing_extensions>=4.6
. This causes a ImportError: cannot import name 'TypeAliasType' from 'typing_extensions'.
when importing huggingface_hub.
As a side note, tensorflow support for Python3.8 has been dropped since 2.14.0. Therefore this issue should affect less and less users over time.
Full Changelog: v0.19.2...v0.19.3