sphinx-doc / sphinx

The Sphinx documentation generator
https://www.sphinx-doc.org/
Other
6.61k stars 2.13k forks source link

ci: docutils.roman module no longer exists in docutils HEAD #13124

Closed jayaddison closed 1 week ago

jayaddison commented 1 week ago

Describe the bug

With a recent modification in the upstream docutils codebase (git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@9977 929543f6-e4f2-0310-98a6-ba3bd3dd1d04), the docutils.roman module has been removed, superseded by an alternative implementation in docutils.utils._roman_numerals.

We rely on the former to provide an implementation of toRoman in the Sphinx sphinx.writers.latex module, with the roman package -- a non-vendored implementation of the code found in docutils.roman, with some updated releases since the version(s) used in docutils -- as a fallback.

The removal of the module causes our LaTeX writer tests to fail, as evident in a recent GitHub Actions docutils HEAD workflow failure.

How to Reproduce

Environment Information

Platform:              linux; (Linux-6.11.5-rt-amd64-x86_64-with-glibc2.40)
Python version:        3.12.7 (main, Nov  8 2024, 17:55:36) [GCC 14.2.0])
Python implementation: CPython
Sphinx version:        8.1.3
Docutils version:      0.22b.dev
Jinja2 version:        3.1.4
Pygments version:      2.18.0

Sphinx extensions

N/A

Additional context

N/A

Edit: clarification about the relationship between roman and the implementation that exists/existed in docutils.roman.

jayaddison commented 1 week ago

The removal of the module causes our LaTeX writer tests to fail, as evident in a recent GitHub Actions docutils HEAD workflow failure.

Strictly speaking this failure only occurs unless the roman Python package is available on the system already, since we will use that as a fallback when available: https://github.com/sphinx-doc/sphinx/blob/a1510de4777eaa2e569435f95b05f6f3293d7035/sphinx/writers/latex.py#L29-L31

AA-Turner commented 1 week ago

Yep, we discussed this on the DU tracker recently. I'll prepare a fix.

A

AA-Turner commented 1 week ago

Closed in #13131 (a pleasing PR number).

A