Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pydantic V2 migration #3

Open
widders opened this issue Jul 10, 2023 · 0 comments
Open

Pydantic V2 migration #3

widders opened this issue Jul 10, 2023 · 0 comments

Comments

@widders
Copy link

widders commented Jul 10, 2023

With Pydantic v2 there have been code changes and this module won't load. I fixed it for my use case with "pydantic<2" in requirements but I guess that's not a long term solution.

Error:

File "/usr/local/lib/python3.10/dist-packages/aiokeydb/__init__.py", line 57, in <module>
  from aiokeydb.client.serializers import SerializerType
File "/usr/local/lib/python3.10/dist-packages/aiokeydb/client/__init__.py", line 40, in <module>
  from aiokeydb.client.config import KeyDBSettings
File "/usr/local/lib/python3.10/dist-packages/aiokeydb/client/config.py", line 8, in <module>
  from aiokeydb.client.types import BaseSettings, validator, lazyproperty, KeyDBUri
File "/usr/local/lib/python3.10/dist-packages/aiokeydb/client/types.py", line 9, in <module>
  from pydantic import BaseSettings as _BaseSettings
File "/usr/local/lib/python3.10/dist-packages/pydantic/__init__.py", line 206, in __getattr__
  return _getattr_migration(attr_name)
File "/usr/local/lib/python3.10/dist-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.1/migration/#basesettings-has-moved-to-pydantic-settings for more details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant