From 7c2ab837aa0c5749ac84eb610ed13ac4fb6dfc12 Mon Sep 17 00:00:00 2001 From: Cyril Roelandt Date: Wed, 7 Jun 2023 17:19:28 +0200 Subject: [PATCH] Docs generation: mock the six module for autodoc Currently, tox-edocs fails with the following error message: Warning, treated as error: autodoc: failed to import module 'shell' from module 'glanceclient'; the following exception was raised: No module named 'six' We used to install six in the virtual environment through keystoneauth, but keystoneauth no longer depends on six. Let's mock six completely in the context of autodoc. Change-Id: Ibcf0b9698227a2c22fe991b7516ba5dceabfc607 --- doc/source/conf.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/source/conf.py b/doc/source/conf.py index c2a4066..185b741 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -46,6 +46,9 @@ openstackdocs_bug_tag = '' # text edit cycles. # execute "export SPHINX_DEBUG=1" in your terminal to disable +# TODO: remove this once no dependency uses six anymore +autodoc_mock_imports = ['six'] + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates']