-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Fix recursion error in json schema generation #6720
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
Conversation
|
please review cc @dmontagu |
|
@commonism any concerns with this? |
Deploying with
|
| Latest commit: |
07ede88
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://adec97b4.pydantic-docs2.pages.dev |
| Branch Preview URL: | https://deepcopy-core-schema.pydantic-docs2.pages.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this makes sense, though @adriangb and I both agree that there is probably a better fix out there.
Probably the best way to fix it would be to generate the JSON schema more fully-independently of the core schema, rather than storing JSON-modification functions on the core schema. Or at least rework the core schema generation so that there is less mutability. But this works now.
|
@adriangb amazing thank you for the quick fix! I tested this branch against some of our code which failed previously with random RecursionErrors and now it works with this branch changes |
No. |
Fixes #6708
Selected Reviewer: @Kludex