DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] dts: mock pydantic for autodoc
@ 2025-11-13 21:56 Patrick Robb
  2025-11-19  3:16 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages 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] 2+ messages in thread

* Re: [PATCH] dts: mock pydantic for autodoc
  2025-11-13 21:56 [PATCH] dts: mock pydantic for autodoc Patrick Robb
@ 2025-11-19  3:16 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2025-11-19  3:16 UTC (permalink / raw)
  To: Patrick Robb; +Cc: luca.vizzarro, dev, Paul.Szczepanek, dmarx, abailey

13/11/2025 22:56, 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>

Applied, thanks.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-11-19  3:16 UTC | newest]

Thread overview: 2+ messages (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
2025-11-19  3:16 ` Thomas Monjalon

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).