Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'Values' object has no attribute 'section_self_link' #9825

Closed
jaraco opened this issue Nov 7, 2021 · 3 comments
Closed

AttributeError: 'Values' object has no attribute 'section_self_link' #9825

jaraco opened this issue Nov 7, 2021 · 3 comments
Labels
docutils Tags upstream Docutils issues type:question

Comments

@jaraco
Copy link

jaraco commented Nov 7, 2021

Describe the bug

In the pytest-checkdocs project, I'm running tox -e docs and the run fails with this output:

pytest-checkdocs main $ tox -e docs
docs recreate: /Users/jaraco/code/main/pytest-checkdocs/.tox/docs
docs develop-inst: /Users/jaraco/code/main/pytest-checkdocs
docs installed: alabaster==0.7.12,attrs==21.2.0,Babel==2.9.1,black==21.10b0,certifi==2021.10.8,charset-normalizer==2.0.7,click==8.0.3,coverage==6.1.1,docutils==0.18,filelock==3.3.2,flake8==4.0.1,idna==3.3,imagesize==1.2.0,importlib-metadata==4.8.1,iniconfig==1.1.1,jaraco.context==4.1.1,jaraco.functools==3.4.0,jaraco.packaging==8.2.1,Jinja2==3.0.2,MarkupSafe==2.0.1,mccabe==0.6.1,more-itertools==8.10.0,mypy==0.910,mypy-extensions==0.4.3,packaging==21.2,pathspec==0.9.0,pep517==0.12.0,platformdirs==2.4.0,pluggy==1.0.0,py==1.11.0,pycodestyle==2.8.0,pyflakes==2.4.0,Pygments==2.10.0,pyparsing==2.4.7,pytest==6.2.5,pytest-black==0.3.12,-e git+gh://jaraco/pytest-checkdocs@c82fa84f5a2f3be536b78accf5b5a6abf7a5930e#egg=pytest_checkdocs,pytest-cov==3.0.0,pytest-enabler==1.2.0,pytest-flake8==1.0.7,pytest-mypy==0.8.1,python-dateutil==2.8.2,pytz==2021.3,regex==2021.11.2,requests==2.26.0,rst.linker==2.2.0,six==1.16.0,snowballstemmer==2.1.0,Sphinx==4.2.0,sphinxcontrib-applehelp==1.0.2,sphinxcontrib-devhelp==1.0.2,sphinxcontrib-htmlhelp==2.0.0,sphinxcontrib-jsmath==1.0.1,sphinxcontrib-qthelp==1.0.3,sphinxcontrib-serializinghtml==1.1.5,toml==0.10.2,tomli==1.2.2,types-docutils==0.17.1,typing-extensions==3.10.0.2,urllib3==1.26.7,zipp==3.6.0
docs run-test-pre: PYTHONHASHSEED='3071227022'
docs run-test: commands[0] | python -m sphinx -W --keep-going . /Users/jaraco/code/main/pytest-checkdocs/build/html
Running Sphinx v4.2.0
WARNING: while setting up extension sphinx.addnodes: node class 'meta' is already registered, its visitors will be overridden
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 2 source files that are out of date
updating environment: [new config] 2 added, 0 changed, 0 removed
reading sources... [ 50%] history
reading sources... [100%] index

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [ 50%] history

Exception occurred:
  File "/Users/jaraco/code/main/pytest-checkdocs/.tox/docs/lib/python3.10/site-packages/docutils/writers/html5_polyglot/__init__.py", line 445, in section_title_tags
    if (ids and self.settings.section_self_link
AttributeError: 'Values' object has no attribute 'section_self_link'
The full traceback has been saved in /var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/sphinx-err-rpueg1co.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
ERROR: InvocationError for command /Users/jaraco/code/main/pytest-checkdocs/.tox/docs/bin/python -m sphinx -W --keep-going . /Users/jaraco/code/main/pytest-checkdocs/build/html (exited with code 2)
______________________________________________________________________________ summary ______________________________________________________________________________
ERROR:   docs: commands failed

Full traceback is here:

pytest-checkdocs main $ cat /var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/sphinx-err-rpueg1co.log
# Sphinx version: 4.2.0
# Python version: 3.10.0 (CPython)
# Docutils version: 0.18 release
# Jinja2 version: 3.0.2
# Last messages:
#   
#   looking for now-outdated files...
#   none found
#   pickling environment...
#   done
#   checking consistency...
#   done
#   preparing documents...
#   done
#   writing output... [ 50%] history
# Loaded extensions:
#   sphinx.ext.mathjax (4.2.0) from /Users/jaraco/code/main/pytest-checkdocs/.tox/docs/lib/python3.10/site-packages/sphinx/ext/mathjax.py
#   sphinxcontrib.applehelp (1.0.2) from /Users/jaraco/code/main/pytest-checkdocs/.tox/docs/lib/python3.10/site-packages/sphinxcontrib/applehelp/__init__.py
#   sphinxcontrib.devhelp (1.0.2) from /Users/jaraco/code/main/pytest-checkdocs/.tox/docs/lib/python3.10/site-packages/sphinxcontrib/devhelp/__init__.py
#   sphinxcontrib.htmlhelp (2.0.0) from /Users/jaraco/code/main/pytest-checkdocs/.tox/docs/lib/python3.10/site-packages/sphinxcontrib/htmlhelp/__init__.py
#   sphinxcontrib.serializinghtml (1.1.5) from /Users/jaraco/code/main/pytest-checkdocs/.tox/docs/lib/python3.10/site-packages/sphinxcontrib/serializinghtml/__init__.py
#   sphinxcontrib.qthelp (1.0.3) from /Users/jaraco/code/main/pytest-checkdocs/.tox/docs/lib/python3.10/site-packages/sphinxcontrib/qthelp/__init__.py
#   alabaster (0.7.12) from /Users/jaraco/code/main/pytest-checkdocs/.tox/docs/lib/python3.10/site-packages/alabaster/__init__.py
#   sphinx.ext.autodoc.preserve_defaults (1.0) from /Users/jaraco/code/main/pytest-checkdocs/.tox/docs/lib/python3.10/site-packages/sphinx/ext/autodoc/preserve_defaults.py
#   sphinx.ext.autodoc.type_comment (4.2.0) from /Users/jaraco/code/main/pytest-checkdocs/.tox/docs/lib/python3.10/site-packages/sphinx/ext/autodoc/type_comment.py
#   sphinx.ext.autodoc (4.2.0) from /Users/jaraco/code/main/pytest-checkdocs/.tox/docs/lib/python3.10/site-packages/sphinx/ext/autodoc/__init__.py
#   jaraco.packaging.sphinx (8.2.1) from /Users/jaraco/code/main/pytest-checkdocs/.tox/docs/lib/python3.10/site-packages/jaraco/packaging/sphinx.py
#   rst.linker (2.2.0) from /Users/jaraco/code/main/pytest-checkdocs/.tox/docs/lib/python3.10/site-packages/rst/linker.py
#   sphinx.ext.intersphinx (4.2.0) from /Users/jaraco/code/main/pytest-checkdocs/.tox/docs/lib/python3.10/site-packages/sphinx/ext/intersphinx.py
Traceback (most recent call last):
  File "/Users/jaraco/code/main/pytest-checkdocs/.tox/docs/lib/python3.10/site-packages/sphinx/cmd/build.py", line 280, in build_main
    app.build(args.force_all, filenames)
  File "/Users/jaraco/code/main/pytest-checkdocs/.tox/docs/lib/python3.10/site-packages/sphinx/application.py", line 343, in build
    self.builder.build_update()
  File "/Users/jaraco/code/main/pytest-checkdocs/.tox/docs/lib/python3.10/site-packages/sphinx/builders/__init__.py", line 293, in build_update
    self.build(to_build,
  File "/Users/jaraco/code/main/pytest-checkdocs/.tox/docs/lib/python3.10/site-packages/sphinx/builders/__init__.py", line 357, in build
    self.write(docnames, list(updated_docnames), method)
  File "/Users/jaraco/code/main/pytest-checkdocs/.tox/docs/lib/python3.10/site-packages/sphinx/builders/__init__.py", line 531, in write
    self._write_serial(sorted(docnames))
  File "/Users/jaraco/code/main/pytest-checkdocs/.tox/docs/lib/python3.10/site-packages/sphinx/builders/__init__.py", line 541, in _write_serial
    self.write_doc(docname, doctree)
  File "/Users/jaraco/code/main/pytest-checkdocs/.tox/docs/lib/python3.10/site-packages/sphinx/builders/html/__init__.py", line 626, in write_doc
    self.docwriter.write(doctree, destination)
  File "/Users/jaraco/code/main/pytest-checkdocs/.tox/docs/lib/python3.10/site-packages/docutils/writers/__init__.py", line 78, in write
    self.translate()
  File "/Users/jaraco/code/main/pytest-checkdocs/.tox/docs/lib/python3.10/site-packages/sphinx/writers/html.py", line 70, in translate
    self.document.walkabout(visitor)
  File "/Users/jaraco/code/main/pytest-checkdocs/.tox/docs/lib/python3.10/site-packages/docutils/nodes.py", line 199, in walkabout
    if child.walkabout(visitor):
  File "/Users/jaraco/code/main/pytest-checkdocs/.tox/docs/lib/python3.10/site-packages/docutils/nodes.py", line 199, in walkabout
    if child.walkabout(visitor):
  File "/Users/jaraco/code/main/pytest-checkdocs/.tox/docs/lib/python3.10/site-packages/docutils/nodes.py", line 191, in walkabout
    visitor.dispatch_visit(self)
  File "/Users/jaraco/code/main/pytest-checkdocs/.tox/docs/lib/python3.10/site-packages/sphinx/util/docutils.py", line 477, in dispatch_visit
    method(node)
  File "/Users/jaraco/code/main/pytest-checkdocs/.tox/docs/lib/python3.10/site-packages/sphinx/writers/html5.py", line 375, in visit_title
    super().visit_title(node)
  File "/Users/jaraco/code/main/pytest-checkdocs/.tox/docs/lib/python3.10/site-packages/docutils/writers/_html_base.py", line 1661, in visit_title
    start_tag, close_tag = self.section_title_tags(node)
  File "/Users/jaraco/code/main/pytest-checkdocs/.tox/docs/lib/python3.10/site-packages/docutils/writers/html5_polyglot/__init__.py", line 445, in section_title_tags
    if (ids and self.settings.section_self_link
AttributeError: 'Values' object has no attribute 'section_self_link'

The issue is new to Sphinx 4.2. If I run the tests on Python 3.9 and Sphinx 4.1.2, the docs build, though with a warning:

/Users/jaraco/code/main/pytest-checkdocs/pytest_checkdocs/__init__.py:docstring of pytest_checkdocs.CheckdocsItem:1: WARNING: py:class reference target not found: _pytest.nodes.Item

That warning is just a nitpick.

Docs are building on other projects, so there must be something unique about this project that's triggering the failure.

How to Reproduce

$ git clone https://github.com/jaraco/pytest-checkdocs
$ cd pytest-checkdocs
$ git checkout b4153a403388c4944c5a4f883b68bfa5531b1617
$ tox -e docs

Expected behavior

Docs should build or provide an actionable error message.

Your project

https://github.com/jaraco/pytest-checkdocs

Screenshots

No response

OS

macOS 12

Python version

3.9

Sphinx version

4.2

Sphinx extensions

'sphinx.ext.autodoc', 'jaraco.packaging.sphinx', 'rst.linker', 'sphinx.ext.intersphinx'

Extra tools

No response

Additional context

No response

@jaraco jaraco added the type:bug label Nov 7, 2021
jaraco added a commit to jaraco/pytest-checkdocs that referenced this issue Nov 7, 2021
@tk0miya
Copy link
Member

tk0miya commented Nov 7, 2021

That's strange. How did you install docutils-0.18? Sphinx-4.2.0 depends docutils < 0.18. So it seems your environment is inconsistent. Please downgrade docutils to 0.17.1.
https://github.com/sphinx-doc/sphinx/blob/v4.2.0/setup.py#L26

@tk0miya tk0miya added docutils Tags upstream Docutils issues type:question and removed type:bug labels Nov 7, 2021
@jaraco
Copy link
Author

jaraco commented Nov 8, 2021

I installed everything using tox. Tox is using pip to install .[docs,testing].

When I create my own virtualenv and install .[docs,testing], it works fine.

pytest-checkdocs main $ virtualenv .tox/cleandocs
created virtual environment CPython3.10.0.final.0-64 in 394ms
  creator CPython3Posix(dest=/Users/jaraco/code/main/pytest-checkdocs/.tox/cleandocs, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/jaraco/Library/Application Support/virtualenv)
    added seed packages: pip==21.3.1, setuptools==58.3.0, wheel==0.37.0
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
pytest-checkdocs main $ .tox/cleandocs/bin/pip install -e '.[docs,testing]'
Obtaining file:///Users/jaraco/code/main/pytest-checkdocs
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting docutils>=0.15
  Using cached docutils-0.18-py2.py3-none-any.whl (569 kB)
Collecting pep517
  Using cached pep517-0.12.0-py2.py3-none-any.whl (19 kB)
Collecting importlib-metadata>=4
  Using cached importlib_metadata-4.8.1-py3-none-any.whl (17 kB)
Collecting jaraco.packaging>=8.2
  Using cached jaraco.packaging-8.2.1-py3-none-any.whl (7.5 kB)
Collecting rst.linker>=1.9
  Using cached rst.linker-2.2.0-py3-none-any.whl (5.3 kB)
Collecting sphinx
  Using cached Sphinx-4.2.0-py3-none-any.whl (3.1 MB)
Collecting pytest-enabler>=1.0.1
  Using cached pytest_enabler-1.2.0-py3-none-any.whl (4.1 kB)
Collecting types-docutils
  Using cached types_docutils-0.17.1-py3-none-any.whl (9.5 kB)
Collecting pytest-black>=0.3.7
  Using cached pytest_black-0.3.12-py3-none-any.whl
Collecting pytest>=6
  Using cached pytest-6.2.5-py3-none-any.whl (280 kB)
Collecting pytest-flake8
  Using cached pytest_flake8-1.0.7-py2.py3-none-any.whl (6.4 kB)
Collecting pytest-cov
  Using cached pytest_cov-3.0.0-py3-none-any.whl (20 kB)
Collecting pytest-mypy
  Using cached pytest_mypy-0.8.1-py3-none-any.whl (6.7 kB)
Collecting zipp>=0.5
  Using cached zipp-3.6.0-py3-none-any.whl (5.3 kB)
Requirement already satisfied: setuptools in ./.tox/cleandocs/lib/python3.10/site-packages (from jaraco.packaging>=8.2->pytest-checkdocs==2.7.2.dev9+gaa1c71c) (58.3.0)
Collecting py>=1.8.2
  Using cached py-1.11.0-py2.py3-none-any.whl (98 kB)
Collecting iniconfig
  Using cached iniconfig-1.1.1-py2.py3-none-any.whl (5.0 kB)
Collecting toml
  Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting pluggy<2.0,>=0.12
  Using cached pluggy-1.0.0-py2.py3-none-any.whl (13 kB)
Collecting attrs>=19.2.0
  Using cached attrs-21.2.0-py2.py3-none-any.whl (53 kB)
Collecting packaging
  Using cached packaging-21.2-py3-none-any.whl (40 kB)
Collecting black
  Using cached black-21.10b0-py3-none-any.whl (150 kB)
Collecting jaraco.context
  Using cached jaraco.context-4.1.1-py3-none-any.whl (4.4 kB)
Collecting jaraco.functools
  Using cached jaraco.functools-3.4.0-py3-none-any.whl (6.9 kB)
Collecting more-itertools
  Using cached more_itertools-8.10.0-py3-none-any.whl (51 kB)
Collecting python-dateutil
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting tomli>=1.1.0
  Using cached tomli-1.2.2-py3-none-any.whl (12 kB)
Collecting coverage[toml]>=5.2.1
  Using cached coverage-6.1.1-cp310-cp310-macosx_10_9_x86_64.whl (179 kB)
Collecting flake8>=3.5
  Using cached flake8-4.0.1-py2.py3-none-any.whl (64 kB)
Collecting filelock>=3.0
  Using cached filelock-3.3.2-py3-none-any.whl (9.7 kB)
Collecting mypy>=0.780
  Using cached mypy-0.910-py3-none-any.whl (2.1 MB)
Collecting sphinxcontrib-qthelp
  Using cached sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl (90 kB)
Collecting Pygments>=2.0
  Using cached Pygments-2.10.0-py3-none-any.whl (1.0 MB)
Collecting babel>=1.3
  Using cached Babel-2.9.1-py2.py3-none-any.whl (8.8 MB)
Collecting Jinja2>=2.3
  Using cached Jinja2-3.0.2-py3-none-any.whl (133 kB)
Collecting alabaster<0.8,>=0.7
  Using cached alabaster-0.7.12-py2.py3-none-any.whl (14 kB)
Collecting snowballstemmer>=1.1
  Using cached snowballstemmer-2.1.0-py2.py3-none-any.whl (93 kB)
Collecting sphinxcontrib-serializinghtml>=1.1.5
  Using cached sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl (94 kB)
Collecting requests>=2.5.0
  Using cached requests-2.26.0-py2.py3-none-any.whl (62 kB)
Collecting docutils>=0.15
  Using cached docutils-0.17.1-py2.py3-none-any.whl (575 kB)
Collecting sphinxcontrib-htmlhelp>=2.0.0
  Using cached sphinxcontrib_htmlhelp-2.0.0-py2.py3-none-any.whl (100 kB)
Collecting sphinxcontrib-devhelp
  Using cached sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl (84 kB)
Collecting sphinxcontrib-jsmath
  Using cached sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl (5.1 kB)
Collecting imagesize
  Using cached imagesize-1.2.0-py2.py3-none-any.whl (4.8 kB)
Collecting sphinxcontrib-applehelp
  Using cached sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl (121 kB)
Collecting pytz>=2015.7
  Using cached pytz-2021.3-py2.py3-none-any.whl (503 kB)
Collecting pyflakes<2.5.0,>=2.4.0
  Using cached pyflakes-2.4.0-py2.py3-none-any.whl (69 kB)
Collecting mccabe<0.7.0,>=0.6.0
  Using cached mccabe-0.6.1-py2.py3-none-any.whl (8.6 kB)
Collecting pycodestyle<2.9.0,>=2.8.0
  Using cached pycodestyle-2.8.0-py2.py3-none-any.whl (42 kB)
Collecting MarkupSafe>=2.0
  Using cached MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl (14 kB)
Collecting mypy-extensions<0.5.0,>=0.4.3
  Using cached mypy_extensions-0.4.3-py2.py3-none-any.whl (4.5 kB)
Collecting typing-extensions>=3.7.4
  Using cached typing_extensions-3.10.0.2-py3-none-any.whl (26 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
Collecting charset-normalizer~=2.0.0
  Using cached charset_normalizer-2.0.7-py3-none-any.whl (38 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.3-py3-none-any.whl (61 kB)
Collecting urllib3<1.27,>=1.21.1
  Using cached urllib3-1.26.7-py2.py3-none-any.whl (138 kB)
Collecting regex>=2020.1.8
  Using cached regex-2021.11.2-cp310-cp310-macosx_10_9_x86_64.whl (288 kB)
Collecting pathspec<1,>=0.9.0
  Using cached pathspec-0.9.0-py2.py3-none-any.whl (31 kB)
Collecting click>=7.1.2
  Using cached click-8.0.3-py3-none-any.whl (97 kB)
Collecting platformdirs>=2
  Using cached platformdirs-2.4.0-py3-none-any.whl (14 kB)
Collecting pyparsing<3,>=2.0.2
  Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Collecting six>=1.5
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Installing collected packages: pyparsing, zipp, urllib3, typing-extensions, tomli, toml, six, regex, pytz, pyflakes, pycodestyle, py, pluggy, platformdirs, pathspec, packaging, mypy-extensions, more-itertools, mccabe, MarkupSafe, iniconfig, idna, coverage, click, charset-normalizer, certifi, attrs, sphinxcontrib-serializinghtml, sphinxcontrib-qthelp, sphinxcontrib-jsmath, sphinxcontrib-htmlhelp, sphinxcontrib-devhelp, sphinxcontrib-applehelp, snowballstemmer, requests, python-dateutil, pytest, Pygments, pep517, mypy, Jinja2, jaraco.functools, jaraco.context, importlib-metadata, imagesize, flake8, filelock, docutils, black, babel, alabaster, types-docutils, sphinx, rst.linker, pytest-mypy, pytest-flake8, pytest-enabler, pytest-cov, pytest-checkdocs, pytest-black, jaraco.packaging
  Running setup.py develop for pytest-checkdocs
Successfully installed Jinja2-3.0.2 MarkupSafe-2.0.1 Pygments-2.10.0 alabaster-0.7.12 attrs-21.2.0 babel-2.9.1 black-21.10b0 certifi-2021.10.8 charset-normalizer-2.0.7 click-8.0.3 coverage-6.1.1 docutils-0.17.1 filelock-3.3.2 flake8-4.0.1 idna-3.3 imagesize-1.2.0 importlib-metadata-4.8.1 iniconfig-1.1.1 jaraco.context-4.1.1 jaraco.functools-3.4.0 jaraco.packaging-8.2.1 mccabe-0.6.1 more-itertools-8.10.0 mypy-0.910 mypy-extensions-0.4.3 packaging-21.2 pathspec-0.9.0 pep517-0.12.0 platformdirs-2.4.0 pluggy-1.0.0 py-1.11.0 pycodestyle-2.8.0 pyflakes-2.4.0 pyparsing-2.4.7 pytest-6.2.5 pytest-black-0.3.12 pytest-checkdocs-2.7.2.dev9+gaa1c71c pytest-cov-3.0.0 pytest-enabler-1.2.0 pytest-flake8-1.0.7 pytest-mypy-0.8.1 python-dateutil-2.8.2 pytz-2021.3 regex-2021.11.2 requests-2.26.0 rst.linker-2.2.0 six-1.16.0 snowballstemmer-2.1.0 sphinx-4.2.0 sphinxcontrib-applehelp-1.0.2 sphinxcontrib-devhelp-1.0.2 sphinxcontrib-htmlhelp-2.0.0 sphinxcontrib-jsmath-1.0.1 sphinxcontrib-qthelp-1.0.3 sphinxcontrib-serializinghtml-1.1.5 toml-0.10.2 tomli-1.2.2 types-docutils-0.17.1 typing-extensions-3.10.0.2 urllib3-1.26.7 zipp-3.6.0

But somehow when I run tox, it installs docutils 0.18.

pytest-checkdocs HEAD $ tox -e docs -v --notest
using tox.ini: /Users/jaraco/code/main/pytest-checkdocs/tox.ini (pid 1468)
using tox-3.24.3 from /Users/jaraco/.local/pipx/venvs/tox/lib/python3.10/site-packages/tox/__init__.py (pid 1468)
docs cannot reuse: no previous config /Users/jaraco/code/main/pytest-checkdocs/.tox/docs/.tox-config1
docs create: /Users/jaraco/code/main/pytest-checkdocs/.tox/docs
[1470] /Users/jaraco/code/main/pytest-checkdocs/.tox$ /Users/jaraco/.local/pipx/venvs/tox/bin/python -m virtualenv --no-download --python /Users/jaraco/.local/pipx/venvs/tox/bin/python docs >docs/log/docs-0.log
docs develop-inst: /Users/jaraco/code/main/pytest-checkdocs
write config to /Users/jaraco/code/main/pytest-checkdocs/.tox/docs/.tox-config1 as '09e2b2534307fa0a5f9ae8975ab12ee3d9c2a78fc1952b6945f79ca0b6feb853 /Users/jaraco/.local/pipx/venvs/tox/bin/python\n3.24.3 0 1 0'
[1472] /Users/jaraco/code/main/pytest-checkdocs$ /Users/jaraco/code/main/pytest-checkdocs/.tox/docs/bin/python -m pip install --exists-action w -e '/Users/jaraco/code/main/pytest-checkdocs[docs,testing]' >.tox/docs/log/docs-1.log
[1510] /Users/jaraco/code/main/pytest-checkdocs$ /Users/jaraco/code/main/pytest-checkdocs/.tox/docs/bin/python -m pip freeze >.tox/docs/log/docs-2.log
docs installed: alabaster==0.7.12,attrs==21.2.0,Babel==2.9.1,black==21.10b0,certifi==2021.10.8,charset-normalizer==2.0.7,click==8.0.3,coverage==6.1.1,docutils==0.18,filelock==3.3.2,flake8==4.0.1,idna==3.3,imagesize==1.2.0,importlib-metadata==4.8.1,iniconfig==1.1.1,jaraco.context==4.1.1,jaraco.functools==3.4.0,jaraco.packaging==8.2.1,Jinja2==3.0.2,MarkupSafe==2.0.1,mccabe==0.6.1,more-itertools==8.10.0,mypy==0.910,mypy-extensions==0.4.3,packaging==21.2,pathspec==0.9.0,pep517==0.12.0,platformdirs==2.4.0,pluggy==1.0.0,py==1.11.0,pycodestyle==2.8.0,pyflakes==2.4.0,Pygments==2.10.0,pyparsing==2.4.7,pytest==6.2.5,pytest-black==0.3.12,-e git+gh://jaraco/pytest-checkdocs@b4153a403388c4944c5a4f883b68bfa5531b1617#egg=pytest_checkdocs,pytest-cov==3.0.0,pytest-enabler==1.2.0,pytest-flake8==1.0.7,pytest-mypy==0.8.1,python-dateutil==2.8.2,pytz==2021.3,regex==2021.11.2,requests==2.26.0,rst.linker==2.2.0,six==1.16.0,snowballstemmer==2.1.0,Sphinx==4.2.0,sphinxcontrib-applehelp==1.0.2,sphinxcontrib-devhelp==1.0.2,sphinxcontrib-htmlhelp==2.0.0,sphinxcontrib-jsmath==1.0.1,sphinxcontrib-qthelp==1.0.3,sphinxcontrib-serializinghtml==1.1.5,toml==0.10.2,tomli==1.2.2,types-docutils==0.17.1,typing-extensions==3.10.0.2,urllib3==1.26.7,zipp==3.6.0
______________________________________________________________________________ summary ______________________________________________________________________________
  docs: skipped tests
  congratulations :)
pytest-checkdocs HEAD $ cat .tox/docs/log/docs-1.log
action: docs, msg: developpkg
cwd: /Users/jaraco/code/main/pytest-checkdocs
cmd: /Users/jaraco/code/main/pytest-checkdocs/.tox/docs/bin/python -m pip install --exists-action w -e '/Users/jaraco/code/main/pytest-checkdocs[docs,testing]'
Obtaining file:///Users/jaraco/code/main/pytest-checkdocs
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Installing backend dependencies: started
  Installing backend dependencies: finished with status 'done'
    Preparing wheel metadata: started
    Preparing wheel metadata: finished with status 'done'
Collecting importlib-metadata>=4
  Using cached importlib_metadata-4.8.1-py3-none-any.whl (17 kB)
Collecting docutils>=0.15
  Using cached docutils-0.18-py2.py3-none-any.whl (569 kB)
Collecting pep517
  Using cached pep517-0.12.0-py2.py3-none-any.whl (19 kB)
Collecting rst.linker>=1.9; extra == "docs"
  Using cached rst.linker-2.2.0-py3-none-any.whl (5.3 kB)
Collecting jaraco.packaging>=8.2; extra == "docs"
  Using cached jaraco.packaging-8.2.1-py3-none-any.whl (7.5 kB)
Collecting sphinx; extra == "docs"
  Using cached Sphinx-4.2.0-py3-none-any.whl (3.1 MB)
Collecting pytest-enabler>=1.0.1; extra == "testing"
  Using cached pytest_enabler-1.2.0-py3-none-any.whl (4.1 kB)
Processing /Users/jaraco/Library/Caches/pip/wheels/d1/5b/f7/6fb24525d8710b80c9bee578a05d3c211c8cf25e570135f1ae/pytest_black-0.3.12-py3-none-any.whl
Collecting pytest-cov; extra == "testing"
  Using cached pytest_cov-3.0.0-py3-none-any.whl (20 kB)
Collecting pytest-flake8; extra == "testing"
  Using cached pytest_flake8-1.0.7-py2.py3-none-any.whl (6.4 kB)
Collecting pytest-mypy; platform_python_implementation != "PyPy" and extra == "testing"
  Using cached pytest_mypy-0.8.1-py3-none-any.whl (6.7 kB)
Collecting types-docutils; extra == "testing"
  Using cached types_docutils-0.17.1-py3-none-any.whl (9.5 kB)
Collecting pytest>=6; extra == "testing"
  Using cached pytest-6.2.5-py3-none-any.whl (280 kB)
Collecting zipp>=0.5
  Using cached zipp-3.6.0-py3-none-any.whl (5.3 kB)
Collecting tomli>=1.1.0; python_version >= "3.6"
  Using cached tomli-1.2.2-py3-none-any.whl (12 kB)
Collecting python-dateutil
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Requirement already satisfied: setuptools in ./.tox/docs/lib/python3.10/site-packages (from jaraco.packaging>=8.2; extra == "docs"->pytest-checkdocs==2.7.2.dev8+gb4153a4) (58.2.0)
Collecting sphinxcontrib-jsmath
  Using cached sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl (5.1 kB)
Collecting imagesize
  Using cached imagesize-1.2.0-py2.py3-none-any.whl (4.8 kB)
Collecting Jinja2>=2.3
  Using cached Jinja2-3.0.2-py3-none-any.whl (133 kB)
Collecting sphinxcontrib-htmlhelp>=2.0.0
  Using cached sphinxcontrib_htmlhelp-2.0.0-py2.py3-none-any.whl (100 kB)
Collecting sphinxcontrib-qthelp
  Using cached sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl (90 kB)
Collecting packaging
  Using cached packaging-21.2-py3-none-any.whl (40 kB)
Collecting sphinxcontrib-serializinghtml>=1.1.5
  Using cached sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl (94 kB)
Collecting babel>=1.3
  Using cached Babel-2.9.1-py2.py3-none-any.whl (8.8 MB)
Collecting alabaster<0.8,>=0.7
  Using cached alabaster-0.7.12-py2.py3-none-any.whl (14 kB)
Collecting sphinxcontrib-applehelp
  Using cached sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl (121 kB)
Collecting snowballstemmer>=1.1
  Using cached snowballstemmer-2.1.0-py2.py3-none-any.whl (93 kB)
Collecting sphinxcontrib-devhelp
  Using cached sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl (84 kB)
Collecting Pygments>=2.0
  Using cached Pygments-2.10.0-py3-none-any.whl (1.0 MB)
Collecting requests>=2.5.0
  Using cached requests-2.26.0-py2.py3-none-any.whl (62 kB)
Collecting jaraco.context
  Using cached jaraco.context-4.1.1-py3-none-any.whl (4.4 kB)
Collecting jaraco.functools
  Using cached jaraco.functools-3.4.0-py3-none-any.whl (6.9 kB)
Collecting more-itertools
  Using cached more_itertools-8.10.0-py3-none-any.whl (51 kB)
Collecting toml
  Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting black; python_version >= "3.6"
  Using cached black-21.10b0-py3-none-any.whl (150 kB)
Collecting coverage[toml]>=5.2.1
  Using cached coverage-6.1.1-cp310-cp310-macosx_10_9_x86_64.whl (179 kB)
Collecting flake8>=3.5
  Using cached flake8-4.0.1-py2.py3-none-any.whl (64 kB)
Collecting filelock>=3.0
  Using cached filelock-3.3.2-py3-none-any.whl (9.7 kB)
Collecting attrs>=19.0
  Using cached attrs-21.2.0-py2.py3-none-any.whl (53 kB)
Collecting mypy>=0.780; python_version >= "3.9"
  Using cached mypy-0.910-py3-none-any.whl (2.1 MB)
Collecting pluggy<2.0,>=0.12
  Using cached pluggy-1.0.0-py2.py3-none-any.whl (13 kB)
Collecting py>=1.8.2
  Using cached py-1.11.0-py2.py3-none-any.whl (98 kB)
Collecting iniconfig
  Using cached iniconfig-1.1.1-py2.py3-none-any.whl (5.0 kB)
Collecting six>=1.5
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting MarkupSafe>=2.0
  Using cached MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl (14 kB)
Collecting pyparsing<3,>=2.0.2
  Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Collecting pytz>=2015.7
  Using cached pytz-2021.3-py2.py3-none-any.whl (503 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
Collecting urllib3<1.27,>=1.21.1
  Using cached urllib3-1.26.7-py2.py3-none-any.whl (138 kB)
Collecting idna<4,>=2.5; python_version >= "3"
  Using cached idna-3.3-py3-none-any.whl (61 kB)
Collecting charset-normalizer~=2.0.0; python_version >= "3"
  Using cached charset_normalizer-2.0.7-py3-none-any.whl (38 kB)
Collecting platformdirs>=2
  Using cached platformdirs-2.4.0-py3-none-any.whl (14 kB)
Collecting click>=7.1.2
  Using cached click-8.0.3-py3-none-any.whl (97 kB)
Collecting regex>=2020.1.8
  Using cached regex-2021.11.2-cp310-cp310-macosx_10_9_x86_64.whl (288 kB)
Collecting pathspec<1,>=0.9.0
  Using cached pathspec-0.9.0-py2.py3-none-any.whl (31 kB)
Collecting typing-extensions!=3.10.0.1; python_version >= "3.10"
  Using cached typing_extensions-3.10.0.2-py3-none-any.whl (26 kB)
Collecting mypy-extensions>=0.4.3
  Using cached mypy_extensions-0.4.3-py2.py3-none-any.whl (4.5 kB)
Collecting mccabe<0.7.0,>=0.6.0
  Using cached mccabe-0.6.1-py2.py3-none-any.whl (8.6 kB)
Collecting pyflakes<2.5.0,>=2.4.0
  Using cached pyflakes-2.4.0-py2.py3-none-any.whl (69 kB)
Collecting pycodestyle<2.9.0,>=2.8.0
  Using cached pycodestyle-2.8.0-py2.py3-none-any.whl (42 kB)
Installing collected packages: zipp, importlib-metadata, docutils, tomli, pep517, six, python-dateutil, rst.linker, jaraco.packaging, sphinxcontrib-jsmath, imagesize, MarkupSafe, Jinja2, sphinxcontrib-htmlhelp, sphinxcontrib-qthelp, pyparsing, packaging, sphinxcontrib-serializinghtml, pytz, babel, alabaster, sphinxcontrib-applehelp, snowballstemmer, sphinxcontrib-devhelp, Pygments, certifi, urllib3, idna, charset-normalizer, requests, sphinx, jaraco.context, more-itertools, jaraco.functools, toml, pytest-enabler, platformdirs, click, regex, pathspec, typing-extensions, mypy-extensions, black, pluggy, py, attrs, iniconfig, pytest, pytest-black, coverage, pytest-cov, mccabe, pyflakes, pycodestyle, flake8, pytest-flake8, filelock, mypy, pytest-mypy, types-docutils, pytest-checkdocs
  Running setup.py develop for pytest-checkdocs
ERROR: pip's legacy dependency resolver does not consider dependency conflicts when selecting packages. This behaviour is the source of the following dependency conflicts.
sphinx 4.2.0 requires docutils<0.18,>=0.14, but you'll have docutils 0.18 which is incompatible.
Successfully installed Jinja2-3.0.2 MarkupSafe-2.0.1 Pygments-2.10.0 alabaster-0.7.12 attrs-21.2.0 babel-2.9.1 black-21.10b0 certifi-2021.10.8 charset-normalizer-2.0.7 click-8.0.3 coverage-6.1.1 docutils-0.18 filelock-3.3.2 flake8-4.0.1 idna-3.3 imagesize-1.2.0 importlib-metadata-4.8.1 iniconfig-1.1.1 jaraco.context-4.1.1 jaraco.functools-3.4.0 jaraco.packaging-8.2.1 mccabe-0.6.1 more-itertools-8.10.0 mypy-0.910 mypy-extensions-0.4.3 packaging-21.2 pathspec-0.9.0 pep517-0.12.0 platformdirs-2.4.0 pluggy-1.0.0 py-1.11.0 pycodestyle-2.8.0 pyflakes-2.4.0 pyparsing-2.4.7 pytest-6.2.5 pytest-black-0.3.12 pytest-checkdocs-2.7.2.dev8+gb4153a4 pytest-cov-3.0.0 pytest-enabler-1.2.0 pytest-flake8-1.0.7 pytest-mypy-0.8.1 python-dateutil-2.8.2 pytz-2021.3 regex-2021.11.2 requests-2.26.0 rst.linker-2.2.0 six-1.16.0 snowballstemmer-2.1.0 sphinx-4.2.0 sphinxcontrib-applehelp-1.0.2 sphinxcontrib-devhelp-1.0.2 sphinxcontrib-htmlhelp-2.0.0 sphinxcontrib-jsmath-1.0.1 sphinxcontrib-qthelp-1.0.3 sphinxcontrib-serializinghtml-1.1.5 toml-0.10.2 tomli-1.2.2 types-docutils-0.17.1 typing-extensions-3.10.0.2 urllib3-1.26.7 zipp-3.6.0
WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.
You should consider upgrading via the '/Users/jaraco/code/main/pytest-checkdocs/.tox/docs/bin/python -m pip install --upgrade pip' command.

Aha, so the clue is in the message:

ERROR: pip's legacy dependency resolver does not consider dependency conflicts when selecting packages. This behaviour is the source of the following dependency conflicts.
sphinx 4.2.0 requires docutils<0.18,>=0.14, but you'll have docutils 0.18 which is incompatible.

So pip is telling me it knows it's installed incompatible versions and it can't do anything about it. But why does it do that only when invoked by tox?

Strangely, even when I run those same commands on my own, I'm unable to replicate the behavior that I see when running under tox.

pytest-checkdocs HEAD $ virtualenv --no-download .tox/docs
created virtual environment CPython3.10.0.final.0-64 in 225ms
  creator CPython3Posix(dest=/Users/jaraco/code/main/pytest-checkdocs/.tox/docs, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/jaraco/Library/Application Support/virtualenv)
    added seed packages: pip==21.3.1, setuptools==58.3.0, wheel==0.37.0
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
pytest-checkdocs HEAD $ .tox/docs/bin/pip install -e .
Obtaining file:///Users/jaraco/code/main/pytest-checkdocs
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting pep517
  Using cached pep517-0.12.0-py2.py3-none-any.whl (19 kB)
Collecting docutils>=0.15
  Using cached docutils-0.18-py2.py3-none-any.whl (569 kB)
Collecting importlib-metadata>=4
  Using cached importlib_metadata-4.8.1-py3-none-any.whl (17 kB)
Collecting zipp>=0.5
  Using cached zipp-3.6.0-py3-none-any.whl (5.3 kB)
Collecting tomli>=1.1.0
  Using cached tomli-1.2.2-py3-none-any.whl (12 kB)
Installing collected packages: zipp, tomli, pep517, importlib-metadata, docutils, pytest-checkdocs
  Running setup.py develop for pytest-checkdocs
Successfully installed docutils-0.18 importlib-metadata-4.8.1 pep517-0.12.0 pytest-checkdocs-2.7.2.dev8+gb4153a4 tomli-1.2.2 zipp-3.6.0
pytest-checkdocs HEAD $ /Users/jaraco/code/main/pytest-checkdocs/.tox/docs/bin/python -m pip install --exists-action w -e '/Users/jaraco/code/main/pytest-checkdocs[d
ocs,testing]'
Obtaining file:///Users/jaraco/code/main/pytest-checkdocs
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: docutils>=0.15 in ./.tox/docs/lib/python3.10/site-packages (from pytest-checkdocs==2.7.2.dev8+gb4153a4) (0.18)
Requirement already satisfied: pep517 in ./.tox/docs/lib/python3.10/site-packages (from pytest-checkdocs==2.7.2.dev8+gb4153a4) (0.12.0)
Requirement already satisfied: importlib-metadata>=4 in ./.tox/docs/lib/python3.10/site-packages (from pytest-checkdocs==2.7.2.dev8+gb4153a4) (4.8.1)
Collecting pytest-black>=0.3.7
  Using cached pytest_black-0.3.12-py3-none-any.whl
Collecting pytest-cov
  Using cached pytest_cov-3.0.0-py3-none-any.whl (20 kB)
Collecting pytest-flake8
  Using cached pytest_flake8-1.0.7-py2.py3-none-any.whl (6.4 kB)
Collecting pytest-mypy
  Using cached pytest_mypy-0.8.1-py3-none-any.whl (6.7 kB)
Collecting pytest>=6
  Using cached pytest-6.2.5-py3-none-any.whl (280 kB)
Collecting pytest-enabler>=1.0.1
  Using cached pytest_enabler-1.2.0-py3-none-any.whl (4.1 kB)
Collecting types-docutils
  Using cached types_docutils-0.17.1-py3-none-any.whl (9.5 kB)
Collecting sphinx
  Using cached Sphinx-4.2.0-py3-none-any.whl (3.1 MB)
Collecting jaraco.packaging>=8.2
  Using cached jaraco.packaging-8.2.1-py3-none-any.whl (7.5 kB)
Collecting rst.linker>=1.9
  Using cached rst.linker-2.2.0-py3-none-any.whl (5.3 kB)
Requirement already satisfied: zipp>=0.5 in ./.tox/docs/lib/python3.10/site-packages (from importlib-metadata>=4->pytest-checkdocs==2.7.2.dev8+gb4153a4) (3.6.0)
Requirement already satisfied: setuptools in ./.tox/docs/lib/python3.10/site-packages (from jaraco.packaging>=8.2->pytest-checkdocs==2.7.2.dev8+gb4153a4) (58.3.0)
Collecting packaging
  Using cached packaging-21.2-py3-none-any.whl (40 kB)
Collecting py>=1.8.2
  Using cached py-1.11.0-py2.py3-none-any.whl (98 kB)
Collecting iniconfig
  Using cached iniconfig-1.1.1-py2.py3-none-any.whl (5.0 kB)
Collecting pluggy<2.0,>=0.12
  Using cached pluggy-1.0.0-py2.py3-none-any.whl (13 kB)
Collecting attrs>=19.2.0
  Using cached attrs-21.2.0-py2.py3-none-any.whl (53 kB)
Collecting toml
  Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting black
  Using cached black-21.10b0-py3-none-any.whl (150 kB)
Collecting more-itertools
  Using cached more_itertools-8.10.0-py3-none-any.whl (51 kB)
Collecting jaraco.context
  Using cached jaraco.context-4.1.1-py3-none-any.whl (4.4 kB)
Collecting jaraco.functools
  Using cached jaraco.functools-3.4.0-py3-none-any.whl (6.9 kB)
Collecting python-dateutil
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Requirement already satisfied: tomli>=1.1.0 in ./.tox/docs/lib/python3.10/site-packages (from pep517->pytest-checkdocs==2.7.2.dev8+gb4153a4) (1.2.2)
Collecting coverage[toml]>=5.2.1
  Using cached coverage-6.1.1-cp310-cp310-macosx_10_9_x86_64.whl (179 kB)
Collecting flake8>=3.5
  Using cached flake8-4.0.1-py2.py3-none-any.whl (64 kB)
Collecting filelock>=3.0
  Using cached filelock-3.3.2-py3-none-any.whl (9.7 kB)
Collecting mypy>=0.780
  Using cached mypy-0.910-py3-none-any.whl (2.1 MB)
Collecting sphinxcontrib-devhelp
  Using cached sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl (84 kB)
Collecting sphinxcontrib-qthelp
  Using cached sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl (90 kB)
Collecting imagesize
  Using cached imagesize-1.2.0-py2.py3-none-any.whl (4.8 kB)
Collecting sphinxcontrib-serializinghtml>=1.1.5
  Using cached sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl (94 kB)
Collecting snowballstemmer>=1.1
  Using cached snowballstemmer-2.1.0-py2.py3-none-any.whl (93 kB)
Collecting Pygments>=2.0
  Using cached Pygments-2.10.0-py3-none-any.whl (1.0 MB)
Collecting sphinxcontrib-applehelp
  Using cached sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl (121 kB)
Collecting babel>=1.3
  Using cached Babel-2.9.1-py2.py3-none-any.whl (8.8 MB)
Collecting alabaster<0.8,>=0.7
  Using cached alabaster-0.7.12-py2.py3-none-any.whl (14 kB)
Collecting sphinxcontrib-jsmath
  Using cached sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl (5.1 kB)
Collecting requests>=2.5.0
  Using cached requests-2.26.0-py2.py3-none-any.whl (62 kB)
Collecting sphinxcontrib-htmlhelp>=2.0.0
  Using cached sphinxcontrib_htmlhelp-2.0.0-py2.py3-none-any.whl (100 kB)
Collecting docutils>=0.15
  Using cached docutils-0.17.1-py2.py3-none-any.whl (575 kB)
Collecting Jinja2>=2.3
  Using cached Jinja2-3.0.2-py3-none-any.whl (133 kB)
Collecting pytz>=2015.7
  Using cached pytz-2021.3-py2.py3-none-any.whl (503 kB)
Collecting pyflakes<2.5.0,>=2.4.0
  Using cached pyflakes-2.4.0-py2.py3-none-any.whl (69 kB)
Collecting pycodestyle<2.9.0,>=2.8.0
  Using cached pycodestyle-2.8.0-py2.py3-none-any.whl (42 kB)
Collecting mccabe<0.7.0,>=0.6.0
  Using cached mccabe-0.6.1-py2.py3-none-any.whl (8.6 kB)
Collecting MarkupSafe>=2.0
  Using cached MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl (14 kB)
Collecting typing-extensions>=3.7.4
  Using cached typing_extensions-3.10.0.2-py3-none-any.whl (26 kB)
Collecting mypy-extensions<0.5.0,>=0.4.3
  Using cached mypy_extensions-0.4.3-py2.py3-none-any.whl (4.5 kB)
Collecting charset-normalizer~=2.0.0
  Using cached charset_normalizer-2.0.7-py3-none-any.whl (38 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.3-py3-none-any.whl (61 kB)
Collecting urllib3<1.27,>=1.21.1
  Using cached urllib3-1.26.7-py2.py3-none-any.whl (138 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
Collecting platformdirs>=2
  Using cached platformdirs-2.4.0-py3-none-any.whl (14 kB)
Collecting regex>=2020.1.8
  Using cached regex-2021.11.2-cp310-cp310-macosx_10_9_x86_64.whl (288 kB)
Collecting pathspec<1,>=0.9.0
  Using cached pathspec-0.9.0-py2.py3-none-any.whl (31 kB)
Collecting click>=7.1.2
  Using cached click-8.0.3-py3-none-any.whl (97 kB)
Collecting pyparsing<3,>=2.0.2
  Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Collecting six>=1.5
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Installing collected packages: pyparsing, urllib3, typing-extensions, toml, six, regex, pytz, pyflakes, pycodestyle, py, pluggy, platformdirs, pathspec, packaging, mypy-extensions, more-itertools, mccabe, MarkupSafe, iniconfig, idna, coverage, click, charset-normalizer, certifi, attrs, sphinxcontrib-serializinghtml, sphinxcontrib-qthelp, sphinxcontrib-jsmath, sphinxcontrib-htmlhelp, sphinxcontrib-devhelp, sphinxcontrib-applehelp, snowballstemmer, requests, python-dateutil, pytest, Pygments, mypy, Jinja2, jaraco.functools, jaraco.context, imagesize, flake8, filelock, docutils, black, babel, alabaster, types-docutils, sphinx, rst.linker, pytest-mypy, pytest-flake8, pytest-enabler, pytest-cov, pytest-checkdocs, pytest-black, jaraco.packaging
  Attempting uninstall: docutils
    Found existing installation: docutils 0.18
    Uninstalling docutils-0.18:
      Successfully uninstalled docutils-0.18
  Attempting uninstall: pytest-checkdocs
    Found existing installation: pytest-checkdocs 2.7.2.dev8+gb4153a4
    Uninstalling pytest-checkdocs-2.7.2.dev8+gb4153a4:
      Successfully uninstalled pytest-checkdocs-2.7.2.dev8+gb4153a4
  Running setup.py develop for pytest-checkdocs
Successfully installed Jinja2-3.0.2 MarkupSafe-2.0.1 Pygments-2.10.0 alabaster-0.7.12 attrs-21.2.0 babel-2.9.1 black-21.10b0 certifi-2021.10.8 charset-normalizer-2.0.7 click-8.0.3 coverage-6.1.1 docutils-0.17.1 filelock-3.3.2 flake8-4.0.1 idna-3.3 imagesize-1.2.0 iniconfig-1.1.1 jaraco.context-4.1.1 jaraco.functools-3.4.0 jaraco.packaging-8.2.1 mccabe-0.6.1 more-itertools-8.10.0 mypy-0.910 mypy-extensions-0.4.3 packaging-21.2 pathspec-0.9.0 platformdirs-2.4.0 pluggy-1.0.0 py-1.11.0 pycodestyle-2.8.0 pyflakes-2.4.0 pyparsing-2.4.7 pytest-6.2.5 pytest-black-0.3.12 pytest-checkdocs-2.7.2.dev8+gb4153a4 pytest-cov-3.0.0 pytest-enabler-1.2.0 pytest-flake8-1.0.7 pytest-mypy-0.8.1 python-dateutil-2.8.2 pytz-2021.3 regex-2021.11.2 requests-2.26.0 rst.linker-2.2.0 six-1.16.0 snowballstemmer-2.1.0 sphinx-4.2.0 sphinxcontrib-applehelp-1.0.2 sphinxcontrib-devhelp-1.0.2 sphinxcontrib-htmlhelp-2.0.0 sphinxcontrib-jsmath-1.0.1 sphinxcontrib-qthelp-1.0.3 sphinxcontrib-serializinghtml-1.1.5 toml-0.10.2 types-docutils-0.17.1 typing-extensions-3.10.0.2 urllib3-1.26.7

My best guess at this point is virtualenv is passing parameters to pip in secret (such as through environment variables) that are somehow triggering the use of the legacy resolver.

Perhaps the fact that the project under test (pytest-checkdocs) depends on docutils is a factor.

In any case, thanks for pointing to the cause and helping me discover the issue. I'll follow up with the tox project to figure out why the legacy resolver is being used.

@dimit999
Copy link

confirm - update lib to sphinx==4.3.0 version - it will fix your issue

Robpol86 added a commit to Robpol86/sphinxext-opengraph that referenced this issue Nov 15, 2021
While working on another PR I ran into this bug on my test website. I
had a test document with only an
HTML code block and found out unescaped HTML was added to the meta tag:

```html
<meta property="og:description" content="<meta property="og:image" content="_images/normal.jpg" /> <img alt="_images/normal.jpg" src="_images/normal.jpg" />" />
<meta property="og:image" content="_images/normal.jpg" />
```

Fixing this by skipping literal blocks.

Also fixed docs build. I was getting the exception:
`AttributeError: 'Values' object has no attribute 'section_self_link'`

This was caused by sphinx-doc/sphinx#9825.
Updating dependencies fixed the issue.
Daltz333 pushed a commit to wpilibsuite/sphinxext-opengraph that referenced this issue Nov 20, 2021
While working on another PR I ran into this bug on my test website. I
had a test document with only an
HTML code block and found out unescaped HTML was added to the meta tag:

```html
<meta property="og:description" content="<meta property="og:image" content="_images/normal.jpg" /> <img alt="_images/normal.jpg" src="_images/normal.jpg" />" />
<meta property="og:image" content="_images/normal.jpg" />
```

Fixing this by skipping literal blocks.

Also fixed docs build. I was getting the exception:
`AttributeError: 'Values' object has no attribute 'section_self_link'`

This was caused by sphinx-doc/sphinx#9825.
Updating dependencies fixed the issue.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
docutils Tags upstream Docutils issues type:question
Projects
None yet
Development

No branches or pull requests

3 participants