djantic
djantic copied to clipboard
Pydantic 2 Support
I was testing out djantic with pydantic 2.4.2 and ran into an error caused by an import that was removed from pydantic.
File "/usr/local/lib/python3.11/site-packages/djantic/main.py", line 12, in <module>
from pydantic import BaseModel, ConfigError, create_model
ImportError: cannot import name 'ConfigError' from 'pydantic' (/usr/local/lib/python3.11/site-packages/pydantic/__init__.py)
The root cause of this appears to be that ConfigError
was removed from pydantic during the v1 -> v2 transition as mention in the migration guide