Bug 2576593 - python-kajiki fails to build with Python 3.16: test_parser: xml.parsers.expat.ExpatError: duplicate attribute: line 1, column 36
Summary: python-kajiki fails to build with Python 3.16: test_parser: xml.parsers.expat...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: python-kajiki
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fedora Infrastructure SIG
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.16
TreeView+ depends on / blocked
 
Reported: 2026-11-19 13:05 UTC by Karolina Surma
Modified: 2026-11-19 13:05 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.