Bug 2479749

Summary: python-genshi fails to build with Python 3.15: TypeError: ast.Expression.__init__ missing 1 required positional argument: 'body'
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-genshiAssignee: Felix Schwarz <fschwarz>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: fschwarz, ksurma, mhroncok, python-packagers-sig
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-genshi-0.7.11-2.fc45 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-06-02 06:06:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2412434    

Description Karolina Surma 2026-05-19 08:08:00 UTC
python-genshi fails to build with Python 3.15.0b1.

331 tests fail with (almost?) all having the same traceback:

__________________ NewTextTemplateTestCase.test_unicode_input __________________

self = <genshi.template.tests.test_text.NewTextTemplateTestCase testMethod=test_unicode_input>

    def test_unicode_input(self):
        text = u'$foo\xf6$bar'
>       tmpl = NewTextTemplate(text)
               ^^^^^^^^^^^^^^^^^^^^^

genshi/template/tests/test_text.py:157: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
genshi/template/text.py:137: in __init__
    Template.__init__(self, source, filepath=filepath, filename=filename,
genshi/template/base.py:418: in __init__
    self._stream = self._parse(source, encoding)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
genshi/template/text.py:230: in _parse
    for kind, data, pos in interpolate(text, self.filepath, lineno,
genshi/template/interpolation.py:76: in interpolate
    expr = Expression(chunk.strip(), pos[0], pos[1],
genshi/template/eval.py:69: in __init__
    self.code = _compile(node, self.source, mode=self.mode,
genshi/template/eval.py:432: in _compile
    tree = xform().visit(node)
           ^^^^^^^^^^^^^^^^^^^
genshi/template/astutil.py:802: in visit
    return visitor(node)
           ^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <genshi.template.eval.ExpressionASTTransformer object at 0x7fced2a7e530>
node = Expression(body=Name(id='foo', ctx=Load()))

    def _clone(self, node):
>       clone = node.__class__()
                ^^^^^^^^^^^^^^^^
E       TypeError: ast.Expression.__init__ missing 1 required positional argument: 'body'


https://docs.python.org/3.15/whatsnew/3.15.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.15-b1/fedora-rawhide-x86_64/10477929-python-genshi/

For all our attempts to build python-genshi with Python 3.15, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.15-b1/package/python-genshi/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.15:
https://copr.fedorainfracloud.org/coprs/g/python/python3.15-b1/

Let us know here if you have any questions.

Python 3.15 is planned to be included in Fedora 45.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.15.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Felix Schwarz 2026-05-19 19:27:06 UTC
Likely fixed by upstream in https://github.com/edgewall/genshi/pull/93

Comment 2 Lukáš Zachar 2026-05-21 14:49:54 UTC
It indeed fixes the problem with python3.15, I took the liberty to try it in https://src.fedoraproject.org/rpms/python-genshi/pull-request/5 and build succeeded: https://copr.fedorainfracloud.org/coprs/g/python/python3.15-b1/build/10492764/

Comment 3 Fedora Update System 2026-06-02 06:13:44 UTC
FEDORA-2026-8917982790 (python-genshi-0.7.11-2.fc45) has been submitted as an update to Fedora 45.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-8917982790

Comment 4 Fedora Update System 2026-06-02 06:17:25 UTC
FEDORA-2026-8917982790 (python-genshi-0.7.11-2.fc45) has been pushed to the Fedora 45 stable repository.
If problem still persists, please make note of it in this bug report.