Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1716504

Summary: python-junit_xml fails to build with Python 3.8
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-junit_xmlAssignee: James Hogarth <james.hogarth>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: adrian, james.hogarth, rstoyanov1
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://copr.fedorainfracloud.org/coprs/g/python/python3.8/package/python-junit_xml/
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-11 22:55:43 UTC Type: ---
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: 1750908, 1750909, 1686977    

Description Miro Hrončok 2019-06-03 14:38:38 UTC
See https://copr.fedorainfracloud.org/coprs/g/python/python3.8/package/python-junit_xml/ for actual logs. This report is automated and not very verbose, but feel free to ping me for help.

Comment 1 Miro Hrončok 2019-07-10 13:34:37 UTC
+ /usr/bin/python3 -m pytest --junitxml=./results/junit-py3.xml
============================= test session starts ==============================
platform linux -- Python 3.8.0b2, pytest-4.4.1, py-1.8.0, pluggy-0.12.0
rootdir: /builddir/build/BUILD/junit-xml-1.8
collected 41 items

test_junit_xml.py ................F........................              [100%]

=================================== FAILURES ===================================
______________________ TestSuiteTests.test_to_xml_string _______________________

self = <test_junit_xml.TestSuiteTests testMethod=test_to_xml_string>

    def test_to_xml_string(self):
        test_suites = [TestSuite(name='suite1', test_cases=[TestCase(name='Test1')]),
                       TestSuite(name='suite2', test_cases=[TestCase(name='Test2')])]
        xml_string = TestSuite.to_xml_string(test_suites)
        if PY2:
            self.assertTrue(isinstance(xml_string, unicode))
        expected_xml_string = textwrap.dedent("""
            <?xml version="1.0" ?>
            <testsuites disabled="0" errors="0" failures="0" tests="2" time="0.0">
            \t<testsuite disabled="0" errors="0" failures="0" name="suite1" skipped="0" tests="1" time="0">
            \t\t<testcase name="Test1"/>
            \t</testsuite>
            \t<testsuite disabled="0" errors="0" failures="0" name="suite2" skipped="0" tests="1" time="0">
            \t\t<testcase name="Test2"/>
            \t</testsuite>
            </testsuites>
        """.strip("\n"))  # NOQA
>       self.assertEqual(xml_string, expected_xml_string)
E       AssertionError: '<?xm[27 chars]ites failures="0" errors="0" tests="2" disable[316 chars]s>\n' != '<?xm[27 chars]ites disabled="0" errors="0" failures="0" test[316 chars]s>\n'
E       Diff is 666 characters long. Set self.maxDiff to None to see it.

test_junit_xml.py:272: AssertionError
=============================== warnings summary ===============================
junit_xml/__init__.py:76
  /builddir/build/BUILD/junit-xml-1.8/junit_xml/__init__.py:76: PytestWarning: cannot collect test class 'TestSuite' because it has a __init__ constructor
    class TestSuite(object):

junit_xml/__init__.py:319
  /builddir/build/BUILD/junit-xml-1.8/junit_xml/__init__.py:319: PytestWarning: cannot collect test class 'TestCase' because it has a __init__ constructor
    class TestCase(object):

test_junit_xml.py::TestSuiteTests::test_assertions
  /builddir/build/BUILD/junit-xml-1.8/test_junit_xml.py:250: DeprecationWarning: Please use assertEqual instead.
    self.assertEquals('5',

-- Docs: https://docs.pytest.org/en/latest/warnings.html
- generated xml file: /builddir/build/BUILD/junit-xml-1.8/results/junit-py3.xml -
=============== 1 failed, 40 passed, 3 warnings in 0.24 seconds ================

This seems like attribute order is different here, see https://docs.python.org/3.8/whatsnew/3.8.html#changes-in-the-python-api

The writexml(), toxml() and toprettyxml() methods of the xml.dom.minidom module, and xml.etree now preserve the attribute order specified by the user. (Contributed by Diego Rojas and Raymond Hettinger in https://bugs.python.org/issue34160.)

Comment 2 Ben Cotton 2019-08-13 16:59:03 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to '31'.

Comment 3 Ben Cotton 2019-08-13 19:04:08 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to 31.

Comment 4 Miro Hrončok 2019-08-14 22:24:56 UTC
The coordinated rebuild of Python 3.8 has started in the `f32-python` side tag.

If you figure out how to rebuild this package, please don't rebuild it in regular rawhide, but use the side tag instead:

    on branch master:
    $ fedpkg build --target=f32-python

To wait for a build to show up in the side tag, do:

    $ koji wait-repo f32-python --build=<nvr>

Where <nvr> is name-version-release of the source package, e.g. python-foo-1.1-2.fc32.

An updated mock config is posted at:
http://copr.fedorainfracloud.org/coprs/g/python/python3.8/

Note that it will take a while before the essential packages are rebuilt, so don't expect all your dependencies to be available right away.

Thanks. Let us know if you need up to date info, or if you have any questions.



PS this message is mass posted to all the bugs that block the PYTHON38 bug. If this is also a Fedora 31 FTBFS bug and you manage to fix it, you can do a f31 build as usual:

    on branch f31:
    $ fedpkg build

Comment 5 Miro Hrončok 2019-08-21 16:35:43 UTC
The f32-python side tag has been merged. In order to rebuild the package, do it in regular rawhide, but please wait until python3-3.8 is tagged:

  $ koji wait-repo f32-build --build python3-3.8.0~b3-3.fc32


If your built already started in f32-python, after it is finished, please tag it to rawhide with:

  $ koji tag-build f32-pending <nvr>

For example:

  $ koji tag-build f32-pending libreoffice-6.3.0.4-3.fc32

Thanks!

(This comment is mass posted to all bugzillas blocking the PYTHON38 tracking bug.)

Comment 6 Miro Hrončok 2019-08-21 17:29:40 UTC
(Python 3.8 has landed in the rawhide buildroot.)

Comment 8 Adrian Reber 2019-09-11 22:55:43 UTC
Fixed in rawhide with an adapted upstream patch.