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 1809970 - python-openstacksdk fails to build in Fedora 32+: AttributeError: 'TestComponentManager' object has no attribute 'assertItemsEqual'
Summary: python-openstacksdk fails to build in Fedora 32+: AttributeError: 'TestCompon...
Alias: None
Product: Fedora
Classification: Fedora
Component: python-openstacksdk
Version: 32
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Javier Peña
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: F32FTBFS PYTHON39 1794222 F33FTBFS
TreeView+ depends on / blocked
Reported: 2020-03-04 10:23 UTC by Miro Hrončok
Modified: 2020-03-16 20:33 UTC (History)
2 users (show)

Fixed In Version: python-openstacksdk-0.36.0-4.fc32
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-03-16 20:33:49 UTC
Type: Bug

Attachments (Terms of Use)

Description Miro Hrončok 2020-03-04 10:23:03 UTC
Description of problem:
Package python-openstacksdk fails to build from source in Fedora 32 and rawhide:

Traceback (most recent call last):
  File "/usr/bin/stestr-3", line 10, in <module>
  File "/usr/lib/python3.8/site-packages/stestr/", line 118, in main
  File "/usr/lib/python3.8/site-packages/cliff/", line 281, in run
    result = self.run_subcommand(remainder)
  File "/usr/lib/python3.8/site-packages/cliff/", line 401, in run_subcommand
    result =
  File "/usr/lib/python3.8/site-packages/cliff/", line 185, in run
    return_code = self.take_action(parsed_args) or 0
  File "/usr/lib/python3.8/site-packages/stestr/commands/", line 231, in take_action
    result = run_command(
  File "/usr/lib/python3.8/site-packages/stestr/commands/", line 533, in run_command
    return _run_tests(cmd, until_failure,
  File "/usr/lib/python3.8/site-packages/stestr/commands/", line 609, in _run_tests
    return run_tests()
  File "/usr/lib/python3.8/site-packages/stestr/commands/", line 599, in run_tests
    return load.load((None, None), in_streams=run_procs,
  File "/usr/lib/python3.8/site-packages/stestr/commands/", line 243, in load
    retval = _load_case(inserter, repo, case, subunit_out, pretty_out,
  File "/usr/lib/python3.8/site-packages/stestr/commands/", line 278, in _load_case
  File "/usr/lib/python3.8/site-packages/testtools/", line 169, in run
  File "/usr/lib/python3.8/site-packages/testtools/testresult/", line 468, in status
    _strict_map(methodcaller('status', *args, **kwargs), self.targets)
  File "/usr/lib/python3.8/site-packages/testtools/testresult/", line 443, in _strict_map
    return list(map(function, *sequences))
  File "/usr/lib/python3.8/site-packages/testtools/testresult/", line 570, in status
  File "/usr/lib/python3.8/site-packages/testtools/testresult/", line 468, in status
    _strict_map(methodcaller('status', *args, **kwargs), self.targets)
  File "/usr/lib/python3.8/site-packages/testtools/testresult/", line 443, in _strict_map
    return list(map(function, *sequences))
  File "/usr/lib/python3.8/site-packages/testtools/testresult/", line 909, in status
    self._hook.status(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/testtools/testresult/", line 826, in status
  File "/usr/lib/python3.8/site-packages/testtools/testresult/", line 901, in _handle_test
  File "/usr/lib/python3.8/site-packages/stestr/", line 192, in show_outcome
    print_attachments(stream, test, all_channels=True)
  File "/usr/lib/python3.8/site-packages/stestr/", line 120, in print_attachments
    if (all_channels or name in channels) and detail.as_text():
  File "/usr/lib/python3.8/site-packages/testtools/", line 91, in as_text
    return _u('').join(self.iter_text())
  File "/usr/lib/python3.8/site-packages/testtools/", line 107, in iter_text
    raise ValueError("Not a text type %r" % self.content_type)
ValueError: Not a text type application/octet-stream

Version-Release number of selected component (if applicable):

Steps to Reproduce:
fedpkg build

Additional info:
This package is tracked by Koschei. See:

This blocks the Python 3.9 rebuild.

Comment 1 Javier Peña 2020-03-04 11:39:19 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?

Comment 2 Miro Hrončok 2020-03-04 11:52:30 UTC
I haven't seen this error elsewhere yet.

Comment 3 Javier Peña 2020-03-04 13:46:49 UTC
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.

Comment 4 Miro Hrončok 2020-03-04 14:32:22 UTC
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

Comment 5 Javier Peña 2020-03-04 15:21:59 UTC
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] -
[2] -
[3] -

Comment 6 Miro Hrončok 2020-03-04 15:35:46 UTC
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.

Comment 7 Javier Peña 2020-03-04 16:24:22 UTC
Fair enough. My patch to openstacksdk has been accepted, and I see it applies cleanly, so I've added it to the spec. includes it, and builds without issues.

Should I backport it to the f32 branch as well?

Comment 8 Miro Hrončok 2020-03-04 23:19:53 UTC
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).

Comment 9 Fedora Update System 2020-03-05 08:38:16 UTC
FEDORA-2020-47920f69fd has been submitted as an update to Fedora 32.

Comment 10 Fedora Update System 2020-03-05 19:36:28 UTC
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 for
instructions on how to install test updates.
You can provide feedback for this update here:

Comment 11 Fedora Update System 2020-03-16 20:33:49 UTC
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.

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