-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Pydantic 1.X doesn't work with Python 3.12.4 #9607
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
Comments
Note: I don't reproduce with Pydantic 2. Too bad it happens right when I was working on the migration of my project 😅 . |
Seeing the same issue. In our case we are using pydantic 2.7.1, but are importing mergepythonclient which relies on V1. |
Seconded, this is an issue that specifically cropped up moving from python 3.12.3 to python 3.12.4. It also affects pydantic.v1 within pydantic==2.7.3 |
My solution was to downgrade python to version 3.12.3 and it worked properly |
Closed by #9612 |
Uh oh!
There was an error while loading. Please reload this page.
Initial Checks
Description
Using Pydantic 1.10.15 with Python 3.12.4 throws the following error:
This looks very similar to this issue fixed recently in typeguard by this PR: agronholm/typeguard#460.
Example Code
I initially discovered the error when trying to import
fastapi
(it was failing here), but I was able to reproduce by defining a model containing a type which doesn't exist yet:Python, Pydantic & OS Version
Affected Components
.model_dump()
and.model_dump_json()
model_construct()
, pickling, private attributes, ORM modeThe text was updated successfully, but these errors were encountered: