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
Bug 1915256 - freeipa-healthcheck fails to build with Python 3.10: Result.__init__() repr has changed
Summary: freeipa-healthcheck fails to build with Python 3.10: Result.__init__() repr h...
Alias: None
Product: Fedora
Classification: Fedora
Component: freeipa-healthcheck
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: François Cami
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: PYTHON3.10
TreeView+ depends on / blocked
Reported: 2021-01-12 10:59 UTC by Tomáš Hrnčiar
Modified: 2021-06-07 17:47 UTC (History)
9 users (show)

Fixed In Version: freeipa-healthcheck-0.8-1.fc34
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2021-06-07 17:47:43 UTC
Type: Bug

Attachments (Terms of Use)

Description Tomáš Hrnčiar 2021-01-12 10:59:28 UTC
freeipa-healthcheck fails to build with Python 3.10.0a4.

tests/ FEFEFEFEFEFEFEFEFE                                 [ 33%]

For the build logs, see:

For all our attempts to build freeipa-healthcheck with Python 3.10, see:

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.10:

Let us know here if you have any questions.

Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
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.

Comment 1 Miro Hrončok 2021-01-12 11:06:46 UTC
Many errors are:

    def no_exceptions(results):
        """Given Results ensure that an except was not raised"""
>       for result in results.results:
E       AttributeError: 'NoneType' object has no attribute 'results'


E           AttributeError: <module 'ipaserver.dns_data_management' from '/usr/lib/python3.10/site-packages/ipaserver/'> does not have the attribute 'resolve_rrsets'

One is:

E       assert "Result.__ini... and 'result'" == "__init__() m... and 'result'"
E         - __init__() missing 2 required positional arguments: 'plugin' and 'result'
E         + Result.__init__() missing 2 required positional arguments: 'plugin' and 'result'
E         ? +++++++

Comment 2 Christian Heimes 2021-01-12 11:16:24 UTC
Tests are failing because removed import of resolve_rrsets

________________ TestDNSSystemRecords.test_dnsrecords_bad_realm ________________
/usr/lib64/python3.10/unittest/ in patched
    with self.decoration_helper(patched,
/usr/lib64/python3.10/ in __enter__
    return next(self.gen)
/usr/lib64/python3.10/unittest/ in decoration_helper
    arg = exit_stack.enter_context(patching)
/usr/lib64/python3.10/ in enter_context
    result = _cm_type.__enter__(cm)
/usr/lib64/python3.10/unittest/ in __enter__
    original, local = self.get_original()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <unittest.mock._patch object at 0x7f47ce41ecd0>
    def get_original(self):
        target = self.getter()
        name = self.attribute
        original = DEFAULT
        local = False
            original = target.__dict__[name]
        except (AttributeError, KeyError):
            original = getattr(target, name, DEFAULT)
            local = True
        if name in _builtins and isinstance(target, ModuleType):
            self.create = True
        if not self.create and original is DEFAULT:
>           raise AttributeError(
                "%s does not have the attribute %r" % (target, name)
E           AttributeError: <module 'ipaserver.dns_data_management' from '/usr/lib/python3.10/site-packages/ipaserver/'> does not have the attribute 'resolve_rrsets'
/usr/lib64/python3.10/unittest/ AttributeError

Comment 3 Rob Crittenden 2021-01-12 15:02:06 UTC
The resolve_rrsets issue should already be handled by which is in freeipa-healthcheck-0.7 in rawhide.

I'll take a look.

Comment 4 Rob Crittenden 2021-01-12 16:09:44 UTC
I've reproduced additional failures in rawhide using python 3.9 that I need to get through first.

It looks related to data new validations added to python3-dns-2.1.0-1. The test is doing the absolute minimum to fake a DNS response and that is no longer sufficient for python3-dns.

Comment 5 Rob Crittenden 2021-01-12 18:40:11 UTC
The 0.7 tarball doesn't match the upstream 0.7 tag by two commits. The resolve_rrsets change is one of them :/

I'm not sure how this happened or what I want to do about it.

Comment 6 Rob Crittenden 2021-01-12 20:16:13 UTC
I'm going to do another upstream release to fix the missing commit issue in addition to PR which will fix test execution with python3-dns-2.1.0.

Comment 7 Tomáš Hrnčiar 2021-01-14 07:06:27 UTC

thank you for the fix. Sadly, there is still one more test failing.
For complete log see:

=================================== FAILURES ===================================
_________________________________ test_Result __________________________________

    def test_Result():
        Test the `ipahealthcheck.plugin.Result` class
        registry = Registry()
        p = Plugin(registry)
        # Standard case of passing plugin to Result
        r = Result(p, constants.SUCCESS)
        kw = dict(key='value')
        r = Result(p, constants.SUCCESS, **kw)
        e = raises(TypeError, Result)
>       assert str(e) == "__init__() missing 2 required positional arguments: " \
                         "'plugin' and 'result'"
E       assert "Result.__ini... and 'result'" == "__init__() m... and 'result'"
E         - __init__() missing 2 required positional arguments: 'plugin' and 'result'
E         + Result.__init__() missing 2 required positional arguments: 'plugin' and 'result'
E         ? +++++++

tests/ AssertionError
=========================== short test summary info ============================
FAILED tests/ - assert "Result.__ini... and 'resu...
======================== 1 failed, 120 passed in 1.93s =========================

Comment 8 Rob Crittenden 2021-01-14 18:48:04 UTC
Ok I see the problem. Looks like python 3.10 is adding the class name to the exception. I have a fix, do you need a build or is pushing the patch to distgit sufficient?

Comment 9 Miro Hrončok 2021-01-14 19:43:58 UTC
Pushing the patch to distgit is sufficient.

If you open a PR, the copr repo will attempt to build it in<pr_number>

Comment 10 Rob Crittenden 2021-01-14 20:54:50 UTC
I'm not sure how to do that against copr. I created a PR against the healthcheck dist-git, maybe you can cherry-pick that?

Comment 11 Miro Hrončok 2021-01-14 21:06:33 UTC
That's it, your build is in and it is a success.
When you merge the PR, it will be built in the copr's main directory.

Comment 12 Ben Cotton 2021-02-09 15:39:54 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 13 Miro Hrončok 2021-06-04 20:14:47 UTC
This is a mass-posted update. Sorry if it is not 100% accurate to this bugzilla.

The Python 3.10 rebuild is in progress in a Koji side tag. If you manage to fix the problem, please commit the fix in the rawhide branch, but don't build the package in regular rawhide.

You can either build the package in the side tag, with:

    $ fedpkg build --target=f35-python

Or you can the build and we will eventually build it for you.

Note that the rebuild is still in progress, so not all (build) dependencies of this package might be available right away.


See also

If you have general questions about the rebuild, please use this mailing list thread:

Comment 14 Rob Crittenden 2021-06-07 17:47:43 UTC
This fix was merged but the BZ never closed.

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