litestar-org/polyfactory

ImportError raised when library is used with pydantic < 1.10.0

Closed this issue · 0 comments

Currently when using the newest pydantic-factories (1.12.0) together with the pydantic version that is older than 1.10.0 ImportError is raised:

ImportError: cannot import name 'ConstrainedDate' from 'pydantic' ([...]/venv/lib/python3.11/site-packages/pydantic/__init__.py)

It seems that the minimum version of pydantic should be bumped to >1.10.0: https://github.com/pydantic/pydantic/releases/tag/v1.10.0:

[...]
Added ConstrainedDate and condate, #3740
[...]