Bug 1705475 - pcs FTBFS with Python 3.8
Summary: pcs FTBFS with Python 3.8
Alias: None
Product: Fedora
Classification: Fedora
Component: pcs
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Ondrej Mular
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: PYTHON38
TreeView+ depends on / blocked
Reported: 2019-05-02 11:24 UTC by Miro Hrončok
Modified: 2019-09-10 18:26 UTC (History)
7 users (show)

Fixed In Version: pcs-0.10.3-1.fc32
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-09-10 18:26:04 UTC
Type: Bug

Attachments (Terms of Use)
Full log from Copr (765.39 KB, text/plain)
2019-05-02 11:24 UTC, Miro Hrončok
no flags Details

Description Miro Hrončok 2019-05-02 11:24:55 UTC
Created attachment 1561546 [details]
Full log from Copr

pcs 0.10.1-5.fc31 fails %check with Python 3.8:

FAIL: testAndOrExpression (pcs.test.test_rule.CibBuilderTest)
Traceback (most recent call last):
  File "/builddir/build/BUILD/pcs-0.10.1/pcs/test/test_rule.py", line 1014, in testAndOrExpression
  File "/builddir/build/BUILD/pcs-0.10.1/pcs/test/test_rule.py", line 1246, in assertExpressionXml
  File "/builddir/build/BUILD/pcs-0.10.1/pcs/test/tools/assertions.py", line 28, in ac
    raise AssertionError(
AssertionError: strings not equal:
  <rsc_location id="location-dummy">
-     <rule boolean-op="and" id="location-dummy-rule">
+     <rule id="location-dummy-rule" boolean-op="and">
-         <expression attribute="#uname" id="location-dummy-rule-expr" operation="ne" value="node1"/>
?                    -------------------
+         <expression id="location-dummy-rule-expr" operation="ne" attribute="#uname" value="node1"/>
?                                                                  +++++++++++++++++++
-         <expression attribute="#uname" id="location-dummy-rule-expr-1" operation="ne" value="node2"/>
?                    -------------------
+         <expression id="location-dummy-rule-expr-1" operation="ne" attribute="#uname" value="node2"/>
?                                                                    +++++++++++++++++++

And more... full log attached.

The problem is, XML attribute are no longer sorted. See https://bugs.python.org/issue34160

Comment 1 Miro Hrončok 2019-07-10 10:14:09 UTC
Please respond.

Comment 2 Ondrej Mular 2019-07-10 10:54:04 UTC
Hi Miro,

Thanks for filling this bz. I was looking into this issue few weeks ago and I can confirm that the issue is in export into XML. There is already mechanism in pcs test suite for comparison of XMLs which doesn't depend on an order of XML attributes. We just need to use this mechanism everywhere in the pcs test suite. Till now, we did't have time to fix this, but we are planning to do so in the following weeks.

Let me know if you need anything else.

Comment 3 Miro Hrončok 2019-07-10 10:56:27 UTC
Thanks for the update. Please keep me posted and don't fall back to silence.

Comment 4 Victor Stinner 2019-07-15 10:18:02 UTC
Ondrej Mular: It's a backward incompatible change of Python 3.8. You can find a recipe to sort XML attributes here:

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

Comment 6 Miro Hrončok 2019-08-14 22:24:23 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:

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 7 Miro Hrončok 2019-08-21 16:35:05 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-


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

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

Comment 9 Miro Hrončok 2019-09-10 18:26:04 UTC
This was rebuild with Python 3.8 and I'm closing it in bulk.

In case you wanted to keep this bugzilla open because the fix is not ideal, please reopen. Thanks.

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