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

Replace update_forward_refs with model_rebuild in docs #1366

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

Danie-1
Copy link
Contributor

@Danie-1 Danie-1 commented Dec 19, 2024

The "update_forward_refs" which is suggested a few times in the docs is deprecated.

Would it be a good idea to replace these with "model_rebuild"?

It is apparently deprecated since pydantic 2.0, and will be removed in 3.0.

Note that the methods update_forward_refs and model_rebuild are not quite equivalent: update_forward_refs currently delegates to model_rebuild but with force=True, whereas the default is False. It might be worth checking whether this substitution is completely safe, but it does seem probably safe.

@vitalik vitalik merged commit be55f63 into vitalik:master Dec 19, 2024
37 checks passed
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