The Fix
pip install pydantic==2.11.3
Based on closed pydantic/pydantic issue #11703 · PR/commit linked
Production note: Most teams hit this during upgrades or environment changes. Roll out with a canary and smoke critical endpoints (health, OpenAPI/docs) before 100%.
@@ -56,17 +56,14 @@ jobs:
- run: uv run python -c 'import docs.plugins.main'
- # Adding local symlinks gets nice source locations like
- # pydantic_core/core_schema.py
- # instead of
from mkdocstrings.handlers.base import BaseHandler
from pathlib import Path
class CustomHandler(BaseHandler):
def get_templates_dir(self, handler: str | None = None) -> Path:
return super().get_templates_dir("python") # untested, needs TLC
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
Option A — Upgrade to fixed release\npip install pydantic==2.11.3\nWhen NOT to use: This fix should not be applied if the documentation structure changes significantly.\n\n
Why This Fix Works in Production
- Trigger: It does not appear to be working as expected anymore, see e.g.,…
- Mechanism: The documentation build script was not correctly creating symlinks for external packages
- Why the fix works: Fixes the documentation source code paths for external packages in the build process, ensuring correct symlink creation and PYTHONPATH settings. (first fixed release: 2.11.3).
- If left unfixed, the same config can fail only in production (env differences), causing startup failures or partial feature outages.
Why This Breaks in Prod
- Shows up under Python 3.10 in real deployments (not just unit tests).
- The documentation build script was not correctly creating symlinks for external packages
- Production symptom (often without a traceback): It does not appear to be working as expected anymore, see e.g., [Color.RGBA](https://docs.pydantic.dev/latest/api/pydantic_extra_types_color/#pydantic_extra_types.color.RGBA), screenshot:
Proof / Evidence
- GitHub issue: #11703
- Fix PR: https://github.com/pydantic/pydantic/pull/11710
- First fixed release: 2.11.3
- Reproduced locally: No (not executed)
- Last verified: 2026-02-09
- Confidence: 0.85
- Did this fix it?: Yes (upstream fix exists)
- Own content ratio: 0.68
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“Thanks for the thorough investigation, I can confirm the issue and I've opened a fix.”
Failure Signature (Search String)
- It does not appear to be working as expected anymore, see e.g., [Color.RGBA](https://docs.pydantic.dev/latest/api/pydantic_extra_types_color/#pydantic_extra_types.color.RGBA),
Copy-friendly signature
Failure Signature
-----------------
It does not appear to be working as expected anymore, see e.g., [Color.RGBA](https://docs.pydantic.dev/latest/api/pydantic_extra_types_color/#pydantic_extra_types.color.RGBA), screenshot:
Error Message
Signature-only (no traceback captured)
Error Message
-------------
It does not appear to be working as expected anymore, see e.g., [Color.RGBA](https://docs.pydantic.dev/latest/api/pydantic_extra_types_color/#pydantic_extra_types.color.RGBA), screenshot:
Minimal Reproduction
from mkdocstrings.handlers.base import BaseHandler
from pathlib import Path
class CustomHandler(BaseHandler):
def get_templates_dir(self, handler: str | None = None) -> Path:
return super().get_templates_dir("python") # untested, needs TLC
Environment
- Python: 3.10
What Broke
Documentation links were pointing to incorrect source locations, leading to confusion for users.
Why It Broke
The documentation build script was not correctly creating symlinks for external packages
Fix Options (Details)
Option A — Upgrade to fixed release Safe default (recommended)
pip install pydantic==2.11.3
Use when you can deploy the upstream fix. It is usually lower-risk than long-lived workarounds.
Fix reference: https://github.com/pydantic/pydantic/pull/11710
First fixed release: 2.11.3
Last verified: 2026-02-09. Validate in your environment.
When NOT to Use This Fix
- This fix should not be applied if the documentation structure changes significantly.
Verify Fix
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
Did This Fix Work in Your Case?
Quick signal helps us prioritize which fixes to verify and improve.
Prevention
- Add a CI check that diffs key outputs after upgrades (OpenAPI schema snapshots, JSON payload shapes, CLI output).
- Upgrade behind a canary and run integration tests against the canary before 100% rollout.
Version Compatibility Table
| Version | Status |
|---|---|
| 2.11.3 | Fixed |
Related Issues
No related fixes found.
Sources
We don’t republish the full GitHub discussion text. Use the links above for context.