From 53ec9b2bc252a13b41eb3e4ec2fdc25184d63152af4c28d0471193a3ba231211 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 30 Sep 2025 16:24:35 +0000 Subject: [PATCH] - Add gh139257-Support-docutils-0.22.patch to fix build with latest docutils (>=0.22) gh#python/cpython#139257 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python310?expand=0&rev=194 --- gh139257-Support-docutils-0.22.patch | 36 ++++++++++++++++++++++++++++ python310.changes | 6 +++++ python310.spec | 2 ++ 3 files changed, 44 insertions(+) create mode 100644 gh139257-Support-docutils-0.22.patch diff --git a/gh139257-Support-docutils-0.22.patch b/gh139257-Support-docutils-0.22.patch new file mode 100644 index 0000000..bc456f1 --- /dev/null +++ b/gh139257-Support-docutils-0.22.patch @@ -0,0 +1,36 @@ +From 19b61747df3d62c822285c488753d6fbdf91e3ac Mon Sep 17 00:00:00 2001 +From: Daniel Garcia Moreno +Date: Tue, 23 Sep 2025 10:20:16 +0200 +Subject: [PATCH 1/2] gh-139257: Support docutils >= 0.22 + +--- + Doc/tools/extensions/pyspecific.py | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +Index: Python-3.10.18/Doc/tools/extensions/pyspecific.py +=================================================================== +--- Python-3.10.18.orig/Doc/tools/extensions/pyspecific.py 2025-09-30 18:24:01.155883150 +0200 ++++ Python-3.10.18/Doc/tools/extensions/pyspecific.py 2025-09-30 18:24:01.192999890 +0200 +@@ -55,11 +55,21 @@ + SOURCE_URI = 'https://github.com/python/cpython/tree/3.10/%s' + + # monkey-patch reST parser to disable alphabetic and roman enumerated lists ++def _disable_alphabetic_and_roman(text): ++ try: ++ # docutils >= 0.22 ++ from docutils.parsers.rst.states import InvalidRomanNumeralError ++ raise InvalidRomanNumeralError(text) ++ except ImportError: ++ # docutils < 0.22 ++ return None ++ ++ + from docutils.parsers.rst.states import Body + Body.enum.converters['loweralpha'] = \ + Body.enum.converters['upperalpha'] = \ + Body.enum.converters['lowerroman'] = \ +- Body.enum.converters['upperroman'] = lambda x: None ++ Body.enum.converters['upperroman'] = _disable_alphabetic_and_roman + + + # Support for marking up and linking to bugs.python.org issues diff --git a/python310.changes b/python310.changes index 193fa70..6ea49ec 100644 --- a/python310.changes +++ b/python310.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Sep 29 06:52:07 UTC 2025 - Daniel Garcia + +- Add gh139257-Support-docutils-0.22.patch to fix build with latest + docutils (>=0.22) gh#python/cpython#139257 + ------------------------------------------------------------------- Thu Sep 18 08:15:31 UTC 2025 - Dominique Leuenberger diff --git a/python310.spec b/python310.spec index 77fd00d..b9af4c2 100644 --- a/python310.spec +++ b/python310.spec @@ -208,6 +208,8 @@ Patch29: CVE-2025-6069-quad-complex-HTMLParser.patch # PATCH-FIX-UPSTREAM CVE-2025-8194-tarfile-no-neg-offsets.patch bsc#1247249 mcepl@suse.com # tarfile now validates archives to ensure member offsets are non-negative Patch30: CVE-2025-8194-tarfile-no-neg-offsets.patch +# PATCH-FIX-OPENSUSE gh139257-Support-docutils-0.22.patch gh#python/cpython#139257 daniel.garcia@suse.com +Patch31: gh139257-Support-docutils-0.22.patch BuildRequires: autoconf-archive BuildRequires: automake BuildRequires: fdupes