You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a project that uses Pydantic. I recently updated it to v2 and I still use sphinx==7.2.6. I noticed in the autogenerated source documentation, that models have the method model_post_init. This method is not override in my project and it comes directly from Pydantic BaseModel.
How to Reproduce
I cannot share source since it is covered by copyright.
The likely culprit isn't Sphinx core but the autodoc_pydantic extension since they say on their main page:
Perfect, let’s go. But wait, sphinx’ autodoc does not integrate too well with pydantic models 😕.
I think you should report this on their repo before you report it here.
This bug is reminiscent of some dataclass bugs since that type also has a __post_init__(). However since pydantic models aren't part of the standard library it's a safer bet to ask the extension authors to make a diagnoses.
Describe the bug
I have a project that uses Pydantic. I recently updated it to v2 and I still use sphinx==7.2.6. I noticed in the autogenerated source documentation, that models have the method model_post_init. This method is not override in my project and it comes directly from Pydantic BaseModel.
How to Reproduce
I cannot share source since it is covered by copyright.
Environment Information
Sphinx extensions
Additional context
No response
The text was updated successfully, but these errors were encountered: