iterative / gto

🏷️ Git Tag Ops. Turn your Git repository into Artifact Registry or Model Registry.
https://dvc.org/doc/gto
Apache License 2.0
142 stars 16 forks source link

pydantic 2.0 release has breaking changes - cli crash #373

Closed bobertlo closed 1 year ago

bobertlo commented 1 year ago

I got the following error and checked to downgrade and the package worked. I see 2.0 was released on June 30 and probably only effecting new installs.

Traceback (most recent call last):
  File "/home/robert/git/gamestate-board-localizer/.venv/bin/gto", line 5, in <module>
    from gto.cli import app
  File "/home/robert/git/gamestate-board-localizer/.venv/lib/python3.10/site-packages/gto/__init__.py", line 1, in <module>
    import gto.log  # noqa
  File "/home/robert/git/gamestate-board-localizer/.venv/lib/python3.10/site-packages/gto/log.py", line 6, in <module>
    from gto.config import CONFIG
  File "/home/robert/git/gamestate-board-localizer/.venv/lib/python3.10/site-packages/gto/config.py", line 6, in <module>
    from pydantic import BaseModel, BaseSettings, validator
  File "/home/robert/git/gamestate-board-localizer/.venv/lib/python3.10/site-packages/pydantic/__init__.py", line 206, in __getattr__
    return _getattr_migration(attr_name)
  File "/home/robert/git/gamestate-board-localizer/.venv/lib/python3.10/site-packages/pydantic/_migration.py", line 279, in wrapper
    raise PydanticImportError(
pydantic.errors.PydanticImportError: `BaseSettings` has been moved to the `pydantic-settings` package. See https://docs.pydantic.dev/2.0/migration/#basesettings-has-moved-to-pydantic-settings for more details.

For further information visit https://errors.pydantic.dev/2.0/u/import-error