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

Enable strict=True for ValuesAxis #4

Open
PaulVanSchayck opened this issue Sep 22, 2023 · 0 comments
Open

Enable strict=True for ValuesAxis #4

PaulVanSchayck opened this issue Sep 22, 2023 · 0 comments

Comments

@PaulVanSchayck
Copy link
Collaborator

Pydantic v2 strict mode has been enabled everywhere, except for ValuesAxis.

When enabled the following test would fail:

>       assert object_type.model_validate_json(json_string).model_dump_json(exclude_none=True) == json_string
E       pydantic_core._pydantic_core.ValidationError: 4 validation errors for Axes
E       t.values.0
E         Input should be a valid datetime [type=datetime_type, input_value='2008-01-01T04:00:00Z', input_type=str]
E           For further information visit https://errors.pydantic.dev/2.3/v/datetime_type

This seems to be an issue in the combination between Generics (ValuesT) and datetime and strict mode when converting between JSON <-> Pydantic. Needs further investigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant