Merge ~pushkarnk/ubuntu/+source/sphinx:fix-2110098 into ubuntu/+source/sphinx:ubuntu/devel

Proposed by Pushkar Kulkarni
Status: Merged
Merged at revision: c058ea2fe6e870fdb1af3966c66eaffcbc25f89e
Proposed branch: ~pushkarnk/ubuntu/+source/sphinx:fix-2110098
Merge into: ubuntu/+source/sphinx:ubuntu/devel
Diff against target: 76 lines (+34/-2)
4 files modified
debian/changelog (+8/-0)
debian/control (+3/-2)
debian/patches/replace_roman_numerals_by_roman.diff (+22/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Dmitry Shachnev (community) Approve
git-ubuntu import Pending
Review via email: mp+485585@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

It’s a bit unfortunate to carry a delta against upstream and Debian, but okay.

I wonder what were the upstream reasons to switch to a new library. Maybe you can file an upstream bug asking about that?

review: Approve
Revision history for this message
Pushkar Kulkarni (pushkarnk) wrote :

Thanks for the review!

It looks like upstream moved [1] to using roman-numerals after docutils.utils removed [2] the roman package.

I started an upstream discussion [3].

[1] https://github.com/sphinx-doc/sphinx/pull/13131
[2] https://sourceforge.net/p/docutils/code/9977/
[3] https://github.com/orgs/sphinx-doc/discussions/13532

Revision history for this message
Pushkar Kulkarni (pushkarnk) wrote (last edit ):

Package built in https://launchpad.net/~pushkarnk/+archive/ubuntu/test-ppa

Autopkgtests:

    + ✅ sphinx on questing for amd64 @ 07.05.25 10:48:16 Log️ 🗒️
    + ✅ sphinx on questing for arm64 @ 07.05.25 10:48:49 Log️ 🗒️
    + ✅ sphinx on questing for armhf @ 07.05.25 10:52:01 Log️ 🗒️
    + ✅ sphinx on questing for i386 @ 07.05.25 10:49:10 Log️ 🗒️
    + ✅ sphinx on questing for ppc64el @ 07.05.25 10:48:40 Log️ 🗒️
    + ❌ sphinx on questing for s390x @ 07.05.25 10:47:22 Log️ 🗒️
      • sphinx-doc SKIP 🟧
      • sphinx-doc SKIP 🟧
      • python3-sphinx FAIL 🟥

The failures on s390x look like infrastructure issues.

https://autopkgtest.ubuntu.com/results/autopkgtest-questing-pushkarnk-test-ppa/questing/s390x/s/sphinx/20250507_145031_b1f1f@/log.gz

Revision history for this message
Pushkar Kulkarni (pushkarnk) wrote :

So, roman-numerals was an intentional upstream choice.

https://github.com/orgs/sphinx-doc/discussions/13532#discussioncomment-13071544

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 69f9669..b763519 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+sphinx (8.2.3-1ubuntu1) questing; urgency=medium
7+
8+ * d/{control, patches}: replace the new python3-roman-numerals
9+ dependency with the existing python3-roman to avoid a component
10+ mismatch (LP: #2110098)
11+
12+ -- Pushkar Kulkarni <pushkar.kulkarni@canonical.com> Wed, 07 May 2025 13:22:48 +0530
13+
14 sphinx (8.2.3-1) experimental; urgency=medium
15
16 * New upstream release.
17diff --git a/debian/control b/debian/control
18index bb92fa1..dea1081 100644
19--- a/debian/control
20+++ b/debian/control
21@@ -1,7 +1,8 @@
22 Source: sphinx
23 Section: python
24 Priority: optional
25-Maintainer: Debian Python Team <team+python@tracker.debian.org>
26+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
27+XSBC-Original-Maintainer: Debian Python Team <team+python@tracker.debian.org>
28 Uploaders: Dmitry Shachnev <mitya57@debian.org>
29 Homepage: https://www.sphinx-doc.org/
30 Build-Depends: debhelper-compat (= 13),
31@@ -36,7 +37,7 @@ Build-Depends-Indep: dpkg-dev (>= 1.17.14),
32 python3-pygments (>= 2.17),
33 python3-pytest (>= 8.0) <!nocheck>,
34 python3-requests (>= 2.30.0),
35- python3-roman-numerals,
36+ python3-roman,
37 python3-setuptools (>= 70.0),
38 python3-snowballstemmer (>= 2.2),
39 python3-sphinxcontrib.websupport <!nodoc>,
40diff --git a/debian/patches/replace_roman_numerals_by_roman.diff b/debian/patches/replace_roman_numerals_by_roman.diff
41new file mode 100644
42index 0000000..cac1a1c
43--- /dev/null
44+++ b/debian/patches/replace_roman_numerals_by_roman.diff
45@@ -0,0 +1,22 @@
46+--- a/sphinx/writers/latex.py
47++++ b/sphinx/writers/latex.py
48+@@ -12,7 +12,7 @@
49+ from typing import TYPE_CHECKING, cast
50+
51+ from docutils import nodes, writers
52+-from roman_numerals import RomanNumeral
53++import roman
54+
55+ from sphinx import addnodes, highlighting
56+ from sphinx.errors import SphinxError
57+@@ -1425,8 +1425,8 @@
58+ return get_nested_level(node.parent)
59+
60+ nested_level = get_nested_level(node)
61+- enum = f'enum{RomanNumeral(nested_level).to_lowercase()}'
62+- enumnext = f'enum{RomanNumeral(nested_level + 1).to_lowercase()}'
63++ enum = f'enum{roman.toRoman(nested_level).lower()}'
64++ enumnext = f'enum{roman.toRoman(nested_level + 1).lower()}'
65+ style = ENUMERATE_LIST_STYLE.get(get_enumtype(node))
66+ prefix = node.get('prefix', '')
67+ suffix = node.get('suffix', '.')
68diff --git a/debian/patches/series b/debian/patches/series
69index 39c8d82..a75dce4 100644
70--- a/debian/patches/series
71+++ b/debian/patches/series
72@@ -5,3 +5,4 @@ use_packaged_mathjax.diff
73 skip_tests_serializinghtml.diff
74 move_sphinxcontrib_to_extras_require.diff
75 intersphinx_local.diff
76+replace_roman_numerals_by_roman.diff

Subscribers

People subscribed via source and target branches