Bug 1809970
Summary: | python-openstacksdk fails to build in Fedora 32+: AttributeError: 'TestComponentManager' object has no attribute 'assertItemsEqual' | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Miro Hrončok <mhroncok> |
Component: | python-openstacksdk | Assignee: | Javier Peña <jpena> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 32 | CC: | jpena, openstack-sig |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | https://koschei.fedoraproject.org/package/python-openstacksdk | ||
Whiteboard: | |||
Fixed In Version: | python-openstacksdk-0.36.0-4.fc32 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-03-16 20:33:49 UTC | 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: | 1750908, 1785415, 1794222, 1803234 |
Description
Miro Hrončok
2020-03-04 10:23:03 UTC
Hm, looking at the stack trace, it looks like we have an issue in either stestr or testtools. Do we have similar issues in other packages using them? I haven't seen this error elsewhere yet. Trying a scratch build, I'm getting a different error during unit tests: AttributeError: 'TestComponentManager' object has no attribute 'assertItemsEqual' There are several instances of this, all pointing to the absence of assertItemsEqual in a test object. I think this was related to a Python 3.9 deprecation, and it should be replaced with assertCountEqual, is this correct (I haven't been able to find the exact Python bug where it is removed for 3.9)? If so, we will need an upstream patch. Ok, that's getting us somewhere. > AttributeError: 'TestComponentManager' object has no attribute 'assertItemsEqual' This should be 'assertCountEqual' on Python 3. This is related to unittest2 vs unittest. See also: python-osc-lib: bz1809967 python-openstackclient: bz1809969 python-tackerclient: bz1809986 It's taken me a while, but I think I've finally been able to track down the whole issue. So, as you mentioned, it is related to unittest2 vs unitttest. I see that [1] added a Fedora-only patch to remove unittest2 support from python3-testtools, which ultimately triggered the issue. Also, upstream testtools seems to be going to remove unittest2 support [2], so this is coming anyway. I have proposed a patch to openstacksdk [3] explaining the situation. If it goes well, we should follow-up with patches for the rest of the projects. However, I wonder if we should start patching all packages in the meantime, or we could revert [1] until it is done in upstream testtools. If we can't revert it, I would propose to disable %check in the affected packages until the upstream projects include the fixes. [1] - https://src.fedoraproject.org/rpms/python-testtools/c/a9f35e790da9df7278d56e497ece180d8366118a?branch=master [2] - https://github.com/testing-cabal/testtools/issues/286 [3] - https://review.opendev.org/711235 Under normal circumstances I would agree that we should revert [1], however a maintainer pulled the trigger prematurely on one of the unittest2 deps and hence unittest2 no longer installs - the revert chain is very long here and I rather do a handful of "patches forward" than a handful of "patches backwards". The issues here might be solvable by a dirty hotfix sed in %preps. That said, if you disagree, you can unretire python-traceback2. Fair enough. My patch to openstacksdk has been accepted, and I see it applies cleanly, so I've added it to the spec. https://koji.fedoraproject.org/koji/taskinfo?taskID=42186298 includes it, and builds without issues. Should I backport it to the f32 branch as well? Thank you!
> Should I backport it to the f32 branch as well?
As long as you need to be able to build it (I'd assume yes).
FEDORA-2020-47920f69fd has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-47920f69fd python-openstacksdk-0.36.0-4.fc32 has been pushed to the Fedora 32 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-47920f69fd python-openstacksdk-0.36.0-4.fc32 has been pushed to the Fedora 32 stable repository. If problems still persist, please make note of it in this bug report. |