tox -edocs fails starting with tox 4.0.0

Bug #2002566 reported by Cyril Roelandt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Fix Released
Undecided
Cyril Roelandt

Bug Description

Starting with tox 4.0.0, we get the following failure: this blocks the gate.

$ tox -redocs
docs: remove tox env folder /home/cyril/openstack/python-glanceclient/.tox/docs
docs: install_deps> python -I -m pip install -r /home/cyril/openstack/python-glanceclient/doc/requirements.txt
docs: commands[0]> sphinx-build -W -b html doc/source doc/build/html
Running Sphinx v6.1.3
[openstackdocstheme] version: 3.0.1
[openstackdocstheme] connecting html-page-context event handler
[openstackdocstheme] overriding configured project name (python-glanceclient) with name extracted from the package (python-glanceclient); you can disable this behavior with the 'openstackdocs_auto_name' option
[openstackdocstheme] using theme from /home/cyril/openstack/python-glanceclient/.tox/docs/lib/python3.10/site-packages/openstackdocstheme/theme
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.client.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.exc.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.shell.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.common.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.common.exceptions.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.common.http.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.common.https.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.common.progressbar.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.common.utils.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.v1.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.v1.client.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.v1.image_members.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.v1.images.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.v1.shell.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.v1.versions.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.v1.apiclient.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.v1.apiclient.base.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.v1.apiclient.exceptions.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.v1.apiclient.utils.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.v2.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.v2.cache.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.v2.client.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.v2.image_members.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.v2.image_schema.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.v2.image_tags.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.v2.images.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.v2.info.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.v2.metadefs.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.v2.namespace_schema.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.v2.resource_type_schema.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.v2.schemas.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.v2.shell.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.v2.tasks.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/glanceclient.v2.versions.rst.
Creating file /home/cyril/openstack/python-glanceclient/doc/source/reference/api/modules.rst.
building [mo]: targets for 0 po files that are out of date
writing output...
building [html]: targets for 43 source files that are out of date
updating environment: [new config] 43 added, 0 changed, 0 removed
reading sources... [ 2%] cli/details
reading sources... [ 4%] cli/glance
reading sources... [ 6%] cli/index
reading sources... [ 9%] cli/property-keys
reading sources... [ 11%] index
reading sources... [ 13%] reference/api/glanceclient
reading sources... [ 16%] reference/api/glanceclient.client
reading sources... [ 18%] reference/api/glanceclient.common
reading sources... [ 20%] reference/api/glanceclient.common.exceptions
reading sources... [ 23%] reference/api/glanceclient.common.http
reading sources... [ 25%] reference/api/glanceclient.common.https
reading sources... [ 27%] reference/api/glanceclient.common.progressbar
reading sources... [ 30%] reference/api/glanceclient.common.utils
reading sources... [ 32%] reference/api/glanceclient.exc
reading sources... [ 34%] reference/api/glanceclient.shell
reading sources... [ 37%] reference/api/glanceclient.v1
reading sources... [ 39%] reference/api/glanceclient.v1.apiclient
reading sources... [ 41%] reference/api/glanceclient.v1.apiclient.base
reading sources... [ 44%] reference/api/glanceclient.v1.apiclient.exceptions
reading sources... [ 46%] reference/api/glanceclient.v1.apiclient.utils
reading sources... [ 48%] reference/api/glanceclient.v1.client
reading sources... [ 51%] reference/api/glanceclient.v1.image_members
reading sources... [ 53%] reference/api/glanceclient.v1.images
reading sources... [ 55%] reference/api/glanceclient.v1.shell
reading sources... [ 58%] reference/api/glanceclient.v1.versions
reading sources... [ 60%] reference/api/glanceclient.v2
reading sources... [ 62%] reference/api/glanceclient.v2.cache
reading sources... [ 65%] reference/api/glanceclient.v2.client
reading sources... [ 67%] reference/api/glanceclient.v2.image_members
reading sources... [ 69%] reference/api/glanceclient.v2.image_schema
reading sources... [ 72%] reference/api/glanceclient.v2.image_tags
reading sources... [ 74%] reference/api/glanceclient.v2.images
reading sources... [ 76%] reference/api/glanceclient.v2.info
reading sources... [ 79%] reference/api/glanceclient.v2.metadefs
reading sources... [ 81%] reference/api/glanceclient.v2.namespace_schema
reading sources... [ 83%] reference/api/glanceclient.v2.resource_type_schema
reading sources... [ 86%] reference/api/glanceclient.v2.schemas
reading sources... [ 88%] reference/api/glanceclient.v2.shell
reading sources... [ 90%] reference/api/glanceclient.v2.tasks
reading sources... [ 93%] reference/api/glanceclient.v2.versions
reading sources... [ 95%] reference/api/modules
reading sources... [ 97%] reference/apiv2
reading sources... [100%] reference/index

Warning, treated as error:
autodoc: failed to import module 'client' from module 'glanceclient'; the following exception was raised:
No module named 'oslo_utils'
docs: exit 2 (2.21 seconds) /home/cyril/openstack/python-glanceclient> sphinx-build -W -b html doc/source doc/build/html pid=1594171
  docs: FAIL code 2 (10.61=setup[8.39]+cmd[2.21] seconds)
  evaluation failed :( (10.68 seconds)

Revision history for this message
Cyril Roelandt (cyril-roelandt) wrote :

The issue here is that only the explicitely specified doc deps from doc/requirements.txt are installed in the venv, while the glanceclient package itself is not installed (even though we set usedevelop=True).

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-glanceclient (master)
Changed in python-glanceclient:
status: New → In Progress
Changed in python-glanceclient:
assignee: nobody → Cyril Roelandt (cyril-roelandt)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-glanceclient (master)

Reviewed: https://review.opendev.org/c/openstack/python-glanceclient/+/869868
Committed: https://opendev.org/openstack/python-glanceclient/commit/6c95122777c8449056115292b492ec3e1e0d6e50
Submitter: "Zuul (22348)"
Branch: master

commit 6c95122777c8449056115292b492ec3e1e0d6e50
Author: Cyril Roelandt <email address hidden>
Date: Fri Dec 16 04:56:02 2022 +0100

    Fix functional tests and docs generation

    First, fix test_help(). A commit[1], which first appeared in Python
    3.10, changes the output of the help feature of argparse. Options used
    to be in a section named "Optional arguments:", and they are now in a
    section named "Options:".

    Second, tox 4 changes the behaviour of tox, and
    {toxinidir}/requirements.txt is no longer installed automagically in the
    docs virtual environment. This causes autodoc to fail on some imports.
    We explicitely add {toxinidir}/requirements.txt to the list of
    dependencies to fix this issue.

    These issues should be fixed in separate patches, but since they both
    block the CI, they depend on each other.

    [1] https://github.com/python/cpython/pull/23858

    Change-Id: Ia7866390b31f469bdea95624325a13aaf45a496e
    Closes-Bug: #2002566

Changed in python-glanceclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-glanceclient 4.3.0

This issue was fixed in the openstack/python-glanceclient 4.3.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.