Bug 2578221

Summary: python-gpxpy fails to build with Python 3.16: xml.dom.WrongDocumentErr: <DOM Element: wpt at 0x7f0fa1029440> was created by a different document
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-gpxpyAssignee: Elliott Sales de Andrade <quantum.analyst>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: ksurma, mhroncok, python-packagers-sig, quantum.analyst
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-20 13:42:36 UTC
python-gpxpy fails to build with Python 3.16.0a2.

======================================================================
ERROR: test_join_gpx_xml_files (__main__.GPXTests.test_join_gpx_xml_files)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-gpxpy-1.6.2-build/gpxpy-1.6.2/test.py", line 3342, in test_join_gpx_xml_files
    result_xml = gpxpy.gpxxml.join_gpxs(xmls)
  File "/builddir/build/BUILD/python-gpxpy-1.6.2-build/gpxpy-1.6.2/gpxpy/gpxxml.py", line 54, in join_gpxs
    gpx_node.appendChild(wpt_element)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  File "/usr/lib64/python3.16/xml/dom/minidom.py", line 142, in appendChild
    self._check_new_child(node)
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/usr/lib64/python3.16/xml/dom/minidom.py", line 92, in _check_new_child
    raise xml.dom.WrongDocumentErr(
        "%s was created by a different document" % repr(newChild))
xml.dom.WrongDocumentErr: <DOM Element: wpt at 0x7f0fa1029440> was created by a different document

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/11359649-python-gpxpy/

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

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.