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

[FEATURE] Support Pydantic 2.0 #276

Closed
wintonzheng opened this issue Jul 3, 2023 · 5 comments
Closed

[FEATURE] Support Pydantic 2.0 #276

wintonzheng opened this issue Jul 3, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@wintonzheng
Copy link

wintonzheng commented Jul 3, 2023

Is your feature request related to a problem? Please describe.
pydantic v2 got released.
However, fastapi-utils has a pydantic<2.0 constraint: https://github.com/dmontagu/fastapi-utils/blob/3ef27a6f67ac10fae6a8b4816549c0c44567a451/pyproject.toml#L43

Describe the solution you'd like
I would like to be able to use pydantic v2 and fastapi-utils together. Can we build the support for pydantic v2?

Describe alternatives you've considered
N/A

Additional context
N/A

@wintonzheng wintonzheng added the enhancement New feature or request label Jul 3, 2023
@wintonzheng wintonzheng changed the title [FEATURE] Support Pydantic 2.0 Jul 3, 2023
@wintonzheng wintonzheng changed the title Support Pydantic 2.0 [FEATURE] Support Pydantic 2.0 Jul 3, 2023
@yogsagot
Copy link

yogsagot commented Jul 8, 2023

Same issue here.

ERROR: Cannot install -r requirements.txt (line 1), -r requirements.txt (line 2) and pydantic==2.0.2 because these package versions have conflicting dependencies.
The conflict is caused by:
    The user requested pydantic==2.0.2
    fastapi 0.100.0 depends on pydantic!=1.8, !=1.8.1, !=2.0.0, !=2.0.1, <3.0.0 and >=1.7.4
    fastapi-utils 0.2.1 depends on pydantic<2.0 and >=1.0

@kgadek93
Copy link

Hi @dmontagu,
Are there any plans to release it in near future? Pydyantic v2 provides many fixes.

@pavelzw
Copy link
Contributor

pavelzw commented Aug 13, 2023

https://github.com/yuval9313/FastApi-RESTful is a fork of fastapi-utils that is more active and already has support for pydantic 2. Feel free to check it out.

@priyanshu-panwar
Copy link

https://github.com/priyanshu-panwar/fastapi-utilities is based on this project and has support for it.

@yuval9313
Copy link
Collaborator

Fixed in version 0.6.0 in pr #291

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
6 participants