Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-Genshi for openSUSE:Factory checked in at 2026-07-09 22:18:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-Genshi (Old) and /work/SRC/openSUSE:Factory/.python-Genshi.new.1991 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-Genshi" Thu Jul 9 22:18:10 2026 rev:30 rq:1364408 version:0.7.11 Changes: -------- --- /work/SRC/openSUSE:Factory/python-Genshi/python-Genshi.changes 2026-07-02 20:11:17.845223227 +0200 +++ /work/SRC/openSUSE:Factory/.python-Genshi.new.1991/python-Genshi.changes 2026-07-09 22:18:21.980057490 +0200 @@ -1,0 +2,5 @@ +Tue Jul 7 22:07:16 UTC 2026 - Dirk Müller <[email protected]> + +- add py315-fixes.patch to fix build with python 3.15 + +------------------------------------------------------------------- New: ---- py315-fixes.patch ----------(New B)---------- New: - add py315-fixes.patch to fix build with python 3.15 ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-Genshi.spec ++++++ --- /var/tmp/diff_new_pack.bhot2D/_old 2026-07-09 22:18:22.472074178 +0200 +++ /var/tmp/diff_new_pack.bhot2D/_new 2026-07-09 22:18:22.476074314 +0200 @@ -26,6 +26,8 @@ Group: Development/Languages/Python URL: https://genshi.edgewall.org/ Source: https://files.pythonhosted.org/packages/source/g/genshi/genshi-%{version}.tar.gz +# PATCH-FIX-UPSTREAM: https://github.com/edgewall/genshi/pull/93/ +Patch1: py315-fixes.patch BuildRequires: %{python_module Babel} BuildRequires: %{python_module devel} BuildRequires: %{python_module pip} ++++++ py315-fixes.patch ++++++ >From 0bcd1eeefaa58d49441ad1d82d0852c049154811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= <[email protected]> Date: Mon, 12 May 2025 00:28:42 +0200 Subject: [PATCH 1/4] Fix deprecation warning when creating AST node without required fields Python 3.13 added the warning which will become an error in Python 3.15 (see https://github.com/python/cpython/pull/105880) Index: genshi-0.7.11/genshi/template/astutil.py =================================================================== --- genshi-0.7.11.orig/genshi/template/astutil.py +++ genshi-0.7.11/genshi/template/astutil.py @@ -802,7 +802,7 @@ class ASTTransformer(object): return visitor(node) def _clone(self, node): - clone = node.__class__() + clone = construct_ast_class(node.__class__) for name in getattr(clone, '_attributes', ()): try: setattr(clone, name, getattr(node, name)) @@ -887,3 +887,18 @@ class ASTTransformer(object): visit_Index = _clone del _clone + + +def construct_ast_class(cls): + kwargs = {} + if hasattr(cls, '__annotations__'): + for name, typ in cls.__annotations__.items(): + if typ is str: + kwargs[name] = 'foo' + elif typ is int: + kwargs[name] = 42 + elif typ is object: + kwargs[name] = b'foo' + elif isinstance(typ, type) and issubclass(typ, _ast.AST): + kwargs[name] = construct_ast_class(typ) + return cls(**kwargs) Index: genshi-0.7.11/genshi/template/eval.py =================================================================== --- genshi-0.7.11.orig/genshi/template/eval.py +++ genshi-0.7.11/genshi/template/eval.py @@ -18,7 +18,8 @@ from types import CodeType from genshi.compat import builtins, exec_, string_types, text_type from genshi.core import Markup -from genshi.template.astutil import ASTTransformer, ASTCodeGenerator, parse +from genshi.template.astutil import ( + ASTTransformer, ASTCodeGenerator, parse, construct_ast_class) from genshi.template.base import TemplateRuntimeError from genshi.util import flatten @@ -59,11 +60,9 @@ class Code(object): 'Expected string or AST node, but got %r' % source self.source = '?' if self.mode == 'eval': - node = _ast.Expression() - node.body = source + node = _ast.Expression(body=source) else: - node = _ast.Module() - node.body = [source] + node = _ast.Module(body=[source]) self.ast = node self.code = _compile(node, self.source, mode=self.mode, @@ -454,7 +453,7 @@ def _compile(node, source=None, mode='ev def _new(class_, *args, **kwargs): - ret = class_() + ret = construct_ast_class(class_) for attr, value in zip(ret._fields, args): if attr in kwargs: raise ValueError('Field set both in args and kwargs')
