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

Fields of type"typing.Annotated" are not supported in pydantic #491

Merged
merged 6 commits into from
Nov 5, 2023

Conversation

kashyab12
Copy link
Contributor

#490

Reproduced the issue with pydantic==1.7.4. After looking at the pydantic changelog v1.8 2021-02-26 introduced support for typing.Annotated hints on model fields. After installing pydantic==1.8 and trying to reproduce the issue, no errors were produced.

@gabrieldemarmiesse
Copy link
Owner

Thanks! In the github yaml files, the pydantic version is hardcoded for the unit tests, can you set it to 1.8.0 instead of just 1.* so that our unit tests run with the oldest version possible? Thanks!

@kashyab12
Copy link
Contributor Author

Thanks! In the github yaml files, the pydantic version is hardcoded for the unit tests, can you set it to 1.8.0 instead of just 1.* so that our unit tests run with the oldest version possible? Thanks!

@gabrieldemarmiesse after modifying the pydantic version in the github jobs, lots of tests are failing. Upon taking a look at the stacktrace seems like the pydantic object is missing the __version__ attribute. This issue was fixed in version 1.9 according to the changelog. So either:

  • We modify the job to use version 1.9 (not the oldest version), which wouldn't tell us whether a new change breaks compatability with version 1.8; or
  • Modify both minimum supported version and job version to use 1.9; or
  • Modify references to __version__ and obtain the version by some other means.

@gabrieldemarmiesse
Copy link
Owner

We can se the minimul version to 1.9. That why we have our CI!

@kashyab12
Copy link
Contributor Author

@gabrieldemarmiesse I've updated CI to use pydantic==1.9.

requirements.txt Outdated Show resolved Hide resolved
@gabrieldemarmiesse gabrieldemarmiesse enabled auto-merge (squash) November 5, 2023 10:26
@gabrieldemarmiesse gabrieldemarmiesse merged commit a8be921 into gabrieldemarmiesse:master Nov 5, 2023
36 checks passed
@gabrieldemarmiesse
Copy link
Owner

Many thanks!

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

Successfully merging this pull request may close these issues.

2 participants