Skip to content

Tests: change-in-output with docutils r10151 (0.22-rc) #13609

Open
@jayaddison

Description

@jayaddison

Describe the bug

Revision r10151 of docutils (aka commit b25db649a5d073d76424e6434e12cdba53ed57e8 in the project's git repository) introduces a change that alters the label identifiers produced in the output of some Sphinx builds.

My understanding is that this should not negatively impact users -- the output documentation is still valid, I believe -- but it does cause a failure in one of our LaTeX test cases, test_latex_labels.

In particular, the expected label identifiers for a figure element and a table element differ; previously they were id1 and id2 respectively - after the docutils revision r10151, they become id2 and id3.

How to Reproduce

$ git clone https://github.com/sphinx-doc/sphinx.git && cd sphinx
$ git checkout 546170754f3f2f96c0d12176b2d2fb5688ca75ab
$ python3 -m venv .venv && source .venv/bin/activate
$ pip install '.[test]'
$ pip install git+https://repo.or.cz/docutils.git@b25db649a5d073d76424e6434e12cdba53ed57e8#subdirectory=docutils
$ pytest tests/test_builders/test_build_latex.py -k test_latex_labels

Environment Information

Platform:              linux; (Linux-6.12.27-rt-amd64-x86_64-with-glibc2.41)
Python version:        3.13.3 (main, Apr 10 2025, 21:38:51) [GCC 14.2.0])
Python implementation: CPython
Sphinx version:        8.3.0+/546170754
Docutils version:      0.22rc3.dev
Jinja2 version:        3.1.6
Pygments version:      2.19.1

Sphinx extensions

N/A

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions