Description
In order to speed up CI, we have to be able to run quibble locally. To do that, we have to understand how it works. To do that, we have to read the documentation. Documentation is not always up to date and sometimes confusing. To make it easier for us, we will update documentation as we read it.
This task is about a bug that was noticed when quibble documentation was built locally.
For more information, see parent task T418234: Update Quibble documentation and the related commit 1250511.
Environments
ubuntu
* Platform: linux; (Linux-6.14.0-37-generic-x86_64-with-glibc2.39) * Python version: 3.12.3 (CPython) * Sphinx version: 9.1.0 * Docutils version: 0.22.4 * Jinja2 version: 3.1.6 * Pygments version: 2.19.2
macos + devcontainer
* Platform: linux; (Linux-6.12.72-linuxkit-aarch64-with-glibc2.41) * Python version: 3.11.14 (CPython) * Sphinx version: 9.0.4 * Docutils version: 0.22.4 * Jinja2 version: 3.1.6 * Pygments version: 2.19.2
Steps to reproduce:
quibble$ tox -e doc ... ModuleNotFoundError: No module named 'pkg_resources' ...
Full output:
| 1 | z@imac:~/Documents/gerrit/integration/quibble$ tox -e doc |
|---|---|
| 2 | doc: install_deps> python -I -m pip install '.[doc]' |
| 3 | .pkg: install_requires> python -I -m pip install 'setuptools-git-versioning<2,>=1.8.0' 'setuptools>=61.0' |
| 4 | .pkg: _optional_hooks> python /home/z/snap/code/228/.local/share/pipx/venvs/tox/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta |
| 5 | .pkg: get_requires_for_build_sdist> python /home/z/snap/code/228/.local/share/pipx/venvs/tox/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta |
| 6 | .pkg: get_requires_for_build_editable> python /home/z/snap/code/228/.local/share/pipx/venvs/tox/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta |
| 7 | .pkg: build_editable> python /home/z/snap/code/228/.local/share/pipx/venvs/tox/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta |
| 8 | doc: install_package_deps> python -I -m pip install 'GitPython~=3.1.0' PyYAML extras pymemcache requests |
| 9 | doc: install_package> python -I -m pip install --force-reinstall --no-deps /home/z/Documents/gerrit/integration/quibble/.tox/.tmp/package/1/quibble-1.15.0.post15+git.e4921eeb-0.editable-py3-none-any.whl |
| 10 | doc: commands[0]> sphinx-build -v -W -b html doc/source doc/build/html |
| 11 | Running Sphinx v9.1.0 |
| 12 | |
| 13 | Configuration error! |
| 14 | |
| 15 | Versions |
| 16 | ======== |
| 17 | |
| 18 | * Platform: linux; (Linux-6.14.0-37-generic-x86_64-with-glibc2.39) |
| 19 | * Python version: 3.12.3 (CPython) |
| 20 | * Sphinx version: 9.1.0 |
| 21 | * Docutils version: 0.22.4 |
| 22 | * Jinja2 version: 3.1.6 |
| 23 | * Pygments version: 2.19.2 |
| 24 | |
| 25 | Last Messages |
| 26 | ============= |
| 27 | |
| 28 | None. |
| 29 | |
| 30 | Loaded Extensions |
| 31 | ================= |
| 32 | |
| 33 | None. |
| 34 | |
| 35 | Traceback |
| 36 | ========= |
| 37 | |
| 38 | Traceback (most recent call last): |
| 39 | File "/home/z/Documents/gerrit/integration/quibble/.tox/doc/lib/python3.12/site-packages/sphinx/config.py", line 596, in eval_config_file |
| 40 | exec(code, namespace) # NoQA: S102 |
| 41 | ^^^^^^^^^^^^^^^^^^^^^ |
| 42 | File "/home/z/Documents/gerrit/integration/quibble/doc/source/conf.py", line 6, in <module> |
| 43 | from pkg_resources import get_distribution |
| 44 | ModuleNotFoundError: No module named 'pkg_resources' |
| 45 | |
| 46 | The above exception was the direct cause of the following exception: |
| 47 | |
| 48 | Traceback (most recent call last): |
| 49 | File "/home/z/Documents/gerrit/integration/quibble/.tox/doc/lib/python3.12/site-packages/sphinx/cmd/build.py", line 414, in build_main |
| 50 | app = Sphinx( |
| 51 | ^^^^^^^ |
| 52 | File "/home/z/Documents/gerrit/integration/quibble/.tox/doc/lib/python3.12/site-packages/sphinx/application.py", line 273, in __init__ |
| 53 | self.config = Config.read(self.confdir, overrides=overrides, tags=self.tags) |
| 54 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 55 | File "/home/z/Documents/gerrit/integration/quibble/.tox/doc/lib/python3.12/site-packages/sphinx/config.py", line 352, in read |
| 56 | return _read_conf_py(filename, overrides=overrides, tags=tags) |
| 57 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 58 | File "/home/z/Documents/gerrit/integration/quibble/.tox/doc/lib/python3.12/site-packages/sphinx/config.py", line 567, in _read_conf_py |
| 59 | namespace = eval_config_file(conf_path, tags) |
| 60 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 61 | File "/home/z/Documents/gerrit/integration/quibble/.tox/doc/lib/python3.12/site-packages/sphinx/config.py", line 611, in eval_config_file |
| 62 | raise ConfigError(msg % traceback.format_exc()) from exc |
| 63 | sphinx.errors.ConfigError: There is a programmable error in your configuration file: |
| 64 | |
| 65 | Traceback (most recent call last): |
| 66 | File "/home/z/Documents/gerrit/integration/quibble/.tox/doc/lib/python3.12/site-packages/sphinx/config.py", line 596, in eval_config_file |
| 67 | exec(code, namespace) # NoQA: S102 |
| 68 | ^^^^^^^^^^^^^^^^^^^^^ |
| 69 | File "/home/z/Documents/gerrit/integration/quibble/doc/source/conf.py", line 6, in <module> |
| 70 | from pkg_resources import get_distribution |
| 71 | ModuleNotFoundError: No module named 'pkg_resources' |
| 72 | |
| 73 | |
| 74 | The full traceback has been saved in: |
| 75 | /tmp/sphinx-err-_p20cat3.log |
| 76 | |
| 77 | To report this error to the developers, please open an issue at <https://github.com/sphinx-doc/sphinx/issues/>. Thanks! |
| 78 | Please also report this if it was a user error, so that a better error message can be provided next time. |
| 79 | doc: exit 2 (0.26 seconds) /home/z/Documents/gerrit/integration/quibble> sphinx-build -v -W -b html doc/source doc/build/html pid=13727 |
| 80 | doc: FAIL code 2 (16.51=setup[16.26]+cmd[0.26] seconds) |
| 81 | evaluation failed :( (16.92 seconds) |
| 1 | vscode ➜ /workspaces/quibble (master) $ tox -e doc |
|---|---|
| 2 | doc: install_deps> python -I -m pip install '.[doc]' |
| 3 | .pkg: install_requires> python -I -m pip install 'setuptools-git-versioning<2,>=1.8.0' 'setuptools>=61.0' |
| 4 | .pkg: _optional_hooks> python /home/vscode/.local/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta |
| 5 | .pkg: get_requires_for_build_sdist> python /home/vscode/.local/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta |
| 6 | .pkg: get_requires_for_build_editable> python /home/vscode/.local/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta |
| 7 | .pkg: build_editable> python /home/vscode/.local/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta |
| 8 | doc: install_package_deps> python -I -m pip install 'GitPython~=3.1.0' PyYAML extras pymemcache requests |
| 9 | doc: install_package> python -I -m pip install --force-reinstall --no-deps /workspaces/quibble/.tox/.tmp/package/1/quibble-1.15.0.post15+git.e4921eeb.dirty-0.editable-py3-none-any.whl |
| 10 | doc: commands[0]> sphinx-build -v -W -b html doc/source doc/build/html |
| 11 | Running Sphinx v9.0.4 |
| 12 | |
| 13 | Configuration error! |
| 14 | |
| 15 | Versions |
| 16 | ======== |
| 17 | |
| 18 | * Platform: linux; (Linux-6.12.72-linuxkit-aarch64-with-glibc2.41) |
| 19 | * Python version: 3.11.14 (CPython) |
| 20 | * Sphinx version: 9.0.4 |
| 21 | * Docutils version: 0.22.4 |
| 22 | * Jinja2 version: 3.1.6 |
| 23 | * Pygments version: 2.19.2 |
| 24 | |
| 25 | Last Messages |
| 26 | ============= |
| 27 | |
| 28 | None. |
| 29 | |
| 30 | Loaded Extensions |
| 31 | ================= |
| 32 | |
| 33 | None. |
| 34 | |
| 35 | Traceback |
| 36 | ========= |
| 37 | |
| 38 | Traceback (most recent call last): |
| 39 | File "/workspaces/quibble/.tox/doc/lib/python3.11/site-packages/sphinx/config.py", line 597, in eval_config_file |
| 40 | exec(code, namespace) # NoQA: S102 |
| 41 | ^^^^^^^^^^^^^^^^^^^^^ |
| 42 | File "/workspaces/quibble/doc/source/conf.py", line 6, in <module> |
| 43 | from pkg_resources import get_distribution |
| 44 | ModuleNotFoundError: No module named 'pkg_resources' |
| 45 | |
| 46 | The above exception was the direct cause of the following exception: |
| 47 | |
| 48 | Traceback (most recent call last): |
| 49 | File "/workspaces/quibble/.tox/doc/lib/python3.11/site-packages/sphinx/cmd/build.py", line 414, in build_main |
| 50 | app = Sphinx( |
| 51 | ^^^^^^^ |
| 52 | File "/workspaces/quibble/.tox/doc/lib/python3.11/site-packages/sphinx/application.py", line 273, in __init__ |
| 53 | self.config = Config.read(self.confdir, overrides=overrides, tags=self.tags) |
| 54 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 55 | File "/workspaces/quibble/.tox/doc/lib/python3.11/site-packages/sphinx/config.py", line 353, in read |
| 56 | return _read_conf_py(filename, overrides=overrides, tags=tags) |
| 57 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 58 | File "/workspaces/quibble/.tox/doc/lib/python3.11/site-packages/sphinx/config.py", line 568, in _read_conf_py |
| 59 | namespace = eval_config_file(conf_path, tags) |
| 60 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 61 | File "/workspaces/quibble/.tox/doc/lib/python3.11/site-packages/sphinx/config.py", line 612, in eval_config_file |
| 62 | raise ConfigError(msg % traceback.format_exc()) from exc |
| 63 | sphinx.errors.ConfigError: There is a programmable error in your configuration file: |
| 64 | |
| 65 | Traceback (most recent call last): |
| 66 | File "/workspaces/quibble/.tox/doc/lib/python3.11/site-packages/sphinx/config.py", line 597, in eval_config_file |
| 67 | exec(code, namespace) # NoQA: S102 |
| 68 | ^^^^^^^^^^^^^^^^^^^^^ |
| 69 | File "/workspaces/quibble/doc/source/conf.py", line 6, in <module> |
| 70 | from pkg_resources import get_distribution |
| 71 | ModuleNotFoundError: No module named 'pkg_resources' |
| 72 | |
| 73 | |
| 74 | The full traceback has been saved in: |
| 75 | /tmp/sphinx-err-fo9ja578.log |
| 76 | |
| 77 | To report this error to the developers, please open an issue at <https://github.com/sphinx-doc/sphinx/issues/>. Thanks! |
| 78 | Please also report this if it was a user error, so that a better error message can be provided next time. |
| 79 | doc: exit 2 (0.21 seconds) /workspaces/quibble> sphinx-build -v -W -b html doc/source doc/build/html pid=3987 |
| 80 | doc: FAIL code 2 (12.74=setup[12.53]+cmd[0.21] seconds) |
| 81 | evaluation failed :( (12.97 seconds) |