Filter-rewriting for comparisons on dates, times, and datetimes #4000
Labels
enhancement
it's not broken, but we want it to be better
interop
how to play nicely with other packages
(I strongly recommend reading #3795 for context)
Pydantic has a 'constrained
date
' type, which usesannotated-types
to express the comparison bounds. We do correctly support this by converting it to a filter, but it would be nice to then rewrite that filter to make the strategy efficient too - which I mentioned in pydantic/pydantic#4682 (comment).And then while we're at it, it seems worth considering the same as applied to
time
anddatetime
classes (in the latter case, perhaps just for single-tz strategies, and/or filtering in addition to a bit of a rewrite) to ensure that the obvious extensions also work if and when someone implements those.The text was updated successfully, but these errors were encountered: