`BaseSettings` has been moved to the `pydantic-settings` package
Closed this issue · 0 comments
simonpfeifhofer commented
Would it be possible to restrict pydantic (currently >=1.7.3) to the major-release 1 or migrate to 2.X?
Seems to be the case that 2.X is a complete rewrite: https://pypi.org/project/pydantic/.
Maybe it would be a good idea (for other packages too) to stick more strictly to certain versions in order to avoid backward-compatibility issues.
Stack trace:
File "/usr/local/lib/python3.9/site-packages/tenseal_inference/crypto.py", line 10, in <module>
fhe_enc_dec_service_1 | from tenseal_inference.inference import ONNXModel
fhe_enc_dec_service_1 | File "/usr/local/lib/python3.9/site-packages/tenseal_inference/inference.py", line 18, in <module>
fhe_enc_dec_service_1 | from tenseal_inference.config import KeyParamsConfig
fhe_enc_dec_service_1 | File "/usr/local/lib/python3.9/site-packages/tenseal_inference/config.py", line 6, in <module>
fhe_enc_dec_service_1 | from pydantic import BaseSettings
fhe_enc_dec_service_1 | File "/usr/local/lib/python3.9/site-packages/pydantic/__init__.py", line 210, in __getattr__
fhe_enc_dec_service_1 | return _getattr_migration(attr_name)
fhe_enc_dec_service_1 | File "/usr/local/lib/python3.9/site-packages/pydantic/_migration.py", line 289, in wrapper
fhe_enc_dec_service_1 | raise PydanticImportError(
fhe_enc_dec_service_1 | pydantic.errors.PydanticImportError: `BaseSettings` has been moved to the `pydantic-settings` package. See https://docs.pydantic.dev/2.1.1/migration/#basesettings-has-moved-to-pydantic-settings for more details.