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

support pydantic v2 #25

Open
sanzoghenzo opened this issue Jul 14, 2023 · 3 comments
Open

support pydantic v2 #25

sanzoghenzo opened this issue Jul 14, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@sanzoghenzo
Copy link

Hi! great to see this useful tool!

Cross posting from FastAPI discussions 😉

I just tried it, but unfortunately it doesn't work with pydantic v2.

It crashes because it can't find pydantic.fields.ModelField, that is removed in facor of a cls.model_fields, which is a dict[str, FieldInfo].
Obviously there will be other error, but I couldn't find the time to investigate it further.

@dotX12 dotX12 self-assigned this Jul 22, 2023
@dotX12
Copy link
Owner

dotX12 commented Jul 22, 2023

The work is almost finished, but when I checked the tests from V1 to V2, I found a problem with the incorrect parsing of Optional[list[...]], Optional[set[...]] and other types for FORM , because of which I had to spend time and make a PR in FastAPI.

But need to wait for it - fastapi/fastapi#9925 & fastapi/fastapi#9928

@dotX12 dotX12 added the enhancement New feature or request label Jul 22, 2023
@cofob
Copy link

cofob commented Nov 6, 2023

Hello @dotX12. Could you please post the current version with pydantic v2?

@cofob
Copy link

cofob commented Apr 9, 2024

I made a fork with support for version 2 -
https://github.com/AezaGroup/pyfa-converter-v2

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

No branches or pull requests

3 participants