DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] dts: mock pydantic for autodoc
@ 2025-11-13 21:56 Patrick Robb
  0 siblings, 0 replies; only message in thread
From: Patrick Robb @ 2025-11-13 21:56 UTC (permalink / raw)
  To: luca.vizzarro; +Cc: dev, Paul.Szczepanek, dmarx, abailey, Patrick Robb

Mock the Pydantic import so that even when Pydantic
is available on the system, it is not loaded by
Sphinx, ensuring we perform the doc build without
Pydantic regardless of the environment.

Signed-off-by: Patrick Robb <probb@iol.unh.edu>
---
 doc/guides/conf.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/doc/guides/conf.py b/doc/guides/conf.py
index 2c1aa81bbf..29d5cf019d 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -106,6 +106,9 @@
     # fabric.Connection (without) vs. fabric.connection.Connection (with)
     autodoc_mock_imports = importlib.import_module('check-dts-requirements').get_missing_imports()
 
+    # Always mock Pydantic to avoid autodoc introspecting its internals
+    autodoc_mock_imports = list(set(autodoc_mock_imports + ['pydantic', 'pydantic_core']))
+
 
 # ####### :numref: fallback ########
 # The following hook functions add some simple handling for the :numref:
-- 
2.49.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-11-13 21:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-13 21:56 [PATCH] dts: mock pydantic for autodoc Patrick Robb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).