Bug 2576593

Summary: python-kajiki fails to build with Python 3.16: test_parser: xml.parsers.expat.ExpatError: duplicate attribute: line 1, column 36
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-kajikiAssignee: Fedora Infrastructure SIG <infra-sig>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: infra-sig, kevin, ksurma, mhroncok, ondrejj
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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: 2567340    

Description Karolina Surma 2026-11-19 13:05:42 UTC
python-kajiki fails to build with Python 3.16.0a1.

____________________________ TestParser.test_parser ____________________________

self = <test_xml.TestParser testMethod=test_parser>

        def test_parser(self):
            doc = kajiki.xml_template._Parser(
                "<string>",
                """<?xml version="1.0"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" \
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <div xmlns="http://www.w3.org/1999/xhtml"
       xmlns:py="http://genshi.edgewall.org/"
       xmlns:xi="http://www.w3.org/2001/XInclude">
      <?py import os ?>
      <!-- This is a comment -->
      <py:for each="x in range(5)">
        Hello, $name &lt;&nbsp;&gt; $x
      </py:for>
    </div>""",
            ).parse()
>           xml.dom.minidom.parseString(doc.toxml().encode("utf-8"))

tests/test_xml.py:41: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.16/xml/dom/minidom.py:2276: in parseString
    return expatbuilder.parseString(string)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib64/python3.16/xml/dom/expatbuilder.py:927: in parseString
    return builder.parseString(string)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <xml.dom.expatbuilder.ExpatBuilderNS object at 0x7ff707ba0ad0>
string = b'<?xml version="1.0" ?><div xmlns="" xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://genshi.edgewall.org/" xmln...s is a comment -->\n  <py:for each="x in range(5)">\n    Hello, $name &amp;lt;\xc2\xa0&amp;gt; $x\n  </py:for>\n</div>'

    def parseString(self, string):
        """Parse a document from a string, returning the document node."""
        parser = self.getParser()
        try:
>           parser.Parse(string, True)
E           xml.parsers.expat.ExpatError: duplicate attribute: line 1, column 36

/usr/lib64/python3.16/xml/dom/expatbuilder.py:220: ExpatError

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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.16/fedora-rawhide-x86_64/11359659-python-kajiki/

For all our attempts to build python-kajiki with Python 3.16, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.16/package/python-kajiki/

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.16:
https://copr.fedorainfracloud.org/coprs/g/python/python3.16/

Let us know here if you have any questions.

Python 3.16 is planned to be included in Fedora 47.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.16.
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.