Accepting request 1308661 from devel:languages:python:Factory

- Add gh139257-Support-docutils-0.22.patch to fix build with latest
  docutils (>=0.22) gh#python/cpython#139257

- Drop AppStream: this results in a different cycle than
  appstream-glib. As the appdata.xml is controlled by ourselves, we
  can get away with just manually validating it when changing it.

- Require AppStream to validate appdata file instead of deprecated
  appstream-glib.
- Update idle3.appdata.xml to pass the more pedantic appstreamcli.

OBS-URL: https://build.opensuse.org/request/show/1308661
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python312?expand=0&rev=38
This commit is contained in:
2025-10-03 13:42:41 +00:00
committed by Git OBS Bridge
4 changed files with 89 additions and 18 deletions

View File

@@ -0,0 +1,36 @@
From 19b61747df3d62c822285c488753d6fbdf91e3ac Mon Sep 17 00:00:00 2001
From: Daniel Garcia Moreno <daniel.garcia@suse.com>
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.12.11/Doc/tools/extensions/pyspecific.py
===================================================================
--- Python-3.12.11.orig/Doc/tools/extensions/pyspecific.py 2025-06-03 17:41:47.000000000 +0200
+++ Python-3.12.11/Doc/tools/extensions/pyspecific.py 2025-09-30 18:16:55.089412381 +0200
@@ -25,11 +25,21 @@
SOURCE_URI = 'https://github.com/python/cpython/tree/3.12/%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
class PyAwaitableMixin(object):

View File

@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2017 Zbigniew Jędrzejewski-Szmek --> <component type="desktop-application">
<application> <id>org.python.IDLE3</id>
<id type="desktop">idle3.desktop</id> <launchable type="desktop-id">idle3.desktop</launchable>
<name>IDLE3</name> <name>IDLE3</name>
<metadata_licence>CC0</metadata_licence>
<project_license>Python-2.0</project_license>
<summary>Python 3 Integrated Development and Learning Environment</summary> <summary>Python 3 Integrated Development and Learning Environment</summary>
<description> <description>
<p> <p>
IDLE is Pythons Integrated Development and Learning Environment. IDLE is Pythons Integrated Development and Learning Environment.
The GUI is uniform between Windows, Unix, and Mac OS X. The GUI is uniform between Windows, Unix, and macOS.
IDLE provides an easy way to start writing, running, and debugging IDLE provides an easy way to start writing, running, and debugging
Python code. Python code.
</p> </p>
@@ -19,17 +19,33 @@
It provides: It provides:
</p> </p>
<ul> <ul>
<li>a Python shell window (interactive interpreter) with colorizing of code input, output, and error messages,</li> <li>a Python shell window (interactive interpreter) with colorizing of code input, output, and error messages,</li>
<li>a multi-window text editor with multiple undo, Python colorizing, smart indent, call tips, auto completion, and other features,</li> <li>a multi-window text editor with multiple undo, Python colorizing, smart indent, call tips, auto completion, and other features,</li>
<li>search within any window, replace within editor windows, and search through multiple files (grep),</li> <li>search within any window, replace within editor windows, and search through multiple files (grep),</li>
<li>a debugger with persistent breakpoints, stepping, and viewing of global and local namespaces.</li> <li>a debugger with persistent breakpoints, stepping, and viewing of global and local namespaces.</li>
</ul> </ul>
</description> </description>
<developer id="org.python">
<name>Python Software Foundation</name>
</developer>
<url type="homepage">https://docs.python.org/3/library/idle.html</url> <url type="homepage">https://docs.python.org/3/library/idle.html</url>
<screenshots> <screenshots>
<screenshot type="default">http://in.waw.pl/~zbyszek/fedora/idle3-appdata/idle3-main-window.png</screenshot> <screenshot type="default">
<screenshot>http://in.waw.pl/~zbyszek/fedora/idle3-appdata/idle3-class-browser.png</screenshot> <image>https://in.waw.pl/~zbyszek/fedora/idle3-appdata/idle3-main-window.png</image>
<screenshot>http://in.waw.pl/~zbyszek/fedora/idle3-appdata/idle3-code-viewer.png</screenshot> </screenshot>
<screenshot>
<image>https://in.waw.pl/~zbyszek/fedora/idle3-appdata/idle3-class-browser.png</image>
</screenshot>
<screenshot>
<image>https://in.waw.pl/~zbyszek/fedora/idle3-appdata/idle3-code-viewer.png</image>
</screenshot>
</screenshots> </screenshots>
<project_license>Python-2.0</project_license>
<metadata_license>CC0-1.0</metadata_license>
<update_contact>zbyszek@in.waw.pl</update_contact> <update_contact>zbyszek@in.waw.pl</update_contact>
</application> </component>

View File

@@ -1,3 +1,23 @@
-------------------------------------------------------------------
Mon Sep 29 06:52:07 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com>
- Add gh139257-Support-docutils-0.22.patch to fix build with latest
docutils (>=0.22) gh#python/cpython#139257
-------------------------------------------------------------------
Mon Sep 22 06:41:53 UTC 2025 - Dominique Leuenberger <dimstar@opensuse.org>
- Drop AppStream: this results in a different cycle than
appstream-glib. As the appdata.xml is controlled by ourselves, we
can get away with just manually validating it when changing it.
-------------------------------------------------------------------
Thu Sep 18 08:15:31 UTC 2025 - Dominique Leuenberger <dimstar@opensuse.org>
- Require AppStream to validate appdata file instead of deprecated
appstream-glib.
- Update idle3.appdata.xml to pass the more pedantic appstreamcli.
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Aug 1 20:09:24 UTC 2025 - Matej Cepl <mcepl@cepl.eu> Fri Aug 1 20:09:24 UTC 2025 - Matej Cepl <mcepl@cepl.eu>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python312 # spec file for package python312
# #
# Copyright (c) 2025 SUSE LLC # Copyright (c) 2025 SUSE LLC and contributors
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -193,6 +193,8 @@ Patch46: CVE-2025-6069-quad-complex-HTMLParser.patch
# PATCH-FIX-UPSTREAM CVE-2025-8194-tarfile-no-neg-offsets.patch bsc#1247249 mcepl@suse.com # 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 # tarfile now validates archives to ensure member offsets are non-negative
Patch47: CVE-2025-8194-tarfile-no-neg-offsets.patch Patch47: 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
Patch48: gh139257-Support-docutils-0.22.patch
BuildRequires: autoconf-archive BuildRequires: autoconf-archive
BuildRequires: automake BuildRequires: automake
BuildRequires: fdupes BuildRequires: fdupes
@@ -229,8 +231,6 @@ BuildRequires: python3-dataclasses
%endif %endif
%endif %endif
%if %{with general} %if %{with general}
# required for idle3 (.desktop and .appdata.xml files)
BuildRequires: appstream-glib
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: gdbm-devel BuildRequires: gdbm-devel
BuildRequires: gettext BuildRequires: gettext
@@ -698,7 +698,6 @@ install -m 644 -D -t %{buildroot}%{_datadir}/applications idle%{python_version}.
cp %{SOURCE20} idle%{python_version}.appdata.xml cp %{SOURCE20} idle%{python_version}.appdata.xml
sed -i -e 's:idle3.desktop:idle%{python_version}.desktop:g' idle%{python_version}.appdata.xml sed -i -e 's:idle3.desktop:idle%{python_version}.desktop:g' idle%{python_version}.appdata.xml
install -m 644 -D -t %{buildroot}%{_datadir}/metainfo idle%{python_version}.appdata.xml install -m 644 -D -t %{buildroot}%{_datadir}/metainfo idle%{python_version}.appdata.xml
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/idle%{python_version}.appdata.xml
%fdupes %{buildroot}/%{_libdir}/python%{python_version} %fdupes %{buildroot}/%{_libdir}/python%{python_version}
%endif %endif