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

Filter-rewriting for comparisons on dates, times, and datetimes #4000

Open
Zac-HD opened this issue May 22, 2024 · 0 comments
Open

Filter-rewriting for comparisons on dates, times, and datetimes #4000

Zac-HD opened this issue May 22, 2024 · 0 comments
Labels
enhancement it's not broken, but we want it to be better interop how to play nicely with other packages

Comments

@Zac-HD
Copy link
Member

Zac-HD commented May 22, 2024

(I strongly recommend reading #3795 for context)

Pydantic has a 'constrained date' type, which uses annotated-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 and datetime 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.

@Zac-HD Zac-HD added enhancement it's not broken, but we want it to be better interop how to play nicely with other packages labels May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement it's not broken, but we want it to be better interop how to play nicely with other packages
Projects
None yet
Development

No branches or pull requests

1 participant