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 1808722 - python-sushy fails to build with Python 3.9: TypeError: 'NoneType' object is not callable
Summary: python-sushy fails to build with Python 3.9: TypeError: 'NoneType' object is ...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-sushy
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dmitry Tantsur
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON39
TreeView+ depends on / blocked
 
Reported: 2020-02-29 17:27 UTC by Miro Hrončok
Modified: 2020-05-26 12:31 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-26 12:31:22 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2020-02-29 17:27:27 UTC
python-sushy fails to build with Python 3.9.0a4.

======================================================================
ERROR: test__parse_attributes_missing_timeout (sushy.tests.unit.resources.sessionservice.test_sessionservice.SessionServiceTestCase)
sushy.tests.unit.resources.sessionservice.test_sessionservice.SessionServiceTestCase.test__parse_attributes_missing_timeout
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/builddir/build/BUILD/sushy-2.0.0/sushy/tests/unit/resources/sessionservice/test_sessionservice.py", line 61, in test__parse_attributes_missing_timeout
    self.assertRaisesRegex(
  File "/usr/lib64/python3.9/unittest/case.py", line 1340, in assertRaisesRegex
    return context.handle('assertRaisesRegex', args, kwargs)
  File "/usr/lib64/python3.9/unittest/case.py", line 202, in handle
    callable_obj(*args, **kwargs)
TypeError: 'NoneType' object is not callable
----------------------------------------------------------------------
Ran 353 tests in 3.149s
FAILED (errors=1)

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01260424-python-sushy/

For all our attempts to build python-sushy with Python 3.9, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/python-sushy/

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.9:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/

Let us know here if you have any questions.

Python 3.9 will be included in Fedora 33. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.9.
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 Karthikeyan Singaravelan 2020-03-01 05:43:29 UTC
This could be due to https://bugs.python.org/issue34318

Comment 2 Dmitry Tantsur 2020-03-02 15:35:36 UTC
I cannot even run stestr, to be honest:

Traceback (most recent call last):
  File "/home/dtantsur/Projects/sushy/.tox/py39/bin/stestr", line 10, in <module>
    sys.exit(main())
  File "/home/dtantsur/Projects/sushy/.tox/py39/lib/python3.9/site-packages/stestr/cli.py", line 118, in main
    return cli.run(argv)
  File "/home/dtantsur/Projects/sushy/.tox/py39/lib/python3.9/site-packages/cliff/app.py", line 281, in run
    result = self.run_subcommand(remainder)
  File "/home/dtantsur/Projects/sushy/.tox/py39/lib/python3.9/site-packages/cliff/app.py", line 364, in run_subcommand
    subcommand = self.command_manager.find_command(argv)
  File "/home/dtantsur/Projects/sushy/.tox/py39/lib/python3.9/site-packages/cliff/commandmanager.py", line 124, in find_command
    cmd_factory = cmd_ep.resolve()
  File "/home/dtantsur/Projects/sushy/.tox/py39/lib/python3.9/site-packages/pkg_resources/__init__.py", line 2449, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/dtantsur/Projects/sushy/.tox/py39/lib/python3.9/site-packages/stestr/commands/__init__.py", line 13, in <module>
    from stestr.commands.failing import failing as failing_command
  File "/home/dtantsur/Projects/sushy/.tox/py39/lib/python3.9/site-packages/stestr/commands/failing.py", line 18, in <module>
    import testtools
  File "/home/dtantsur/Projects/sushy/.tox/py39/lib/python3.9/site-packages/testtools/__init__.py", line 71, in <module>
    from testtools.testcase import (
  File "/home/dtantsur/Projects/sushy/.tox/py39/lib/python3.9/site-packages/testtools/testcase.py", line 31, in <module>
    unittest = try_imports(['unittest2', 'unittest'])
  File "/home/dtantsur/Projects/sushy/.tox/py39/lib/python3.9/site-packages/extras/__init__.py", line 92, in try_imports
    module = try_import(module_name, error_callback=error_callback)
  File "/home/dtantsur/Projects/sushy/.tox/py39/lib/python3.9/site-packages/extras/__init__.py", line 50, in try_import
    __import__(module_name)
  File "/home/dtantsur/Projects/sushy/.tox/py39/lib/python3.9/site-packages/unittest2/__init__.py", line 40, in <module>
    from unittest2.collector import collector
  File "/home/dtantsur/Projects/sushy/.tox/py39/lib/python3.9/site-packages/unittest2/collector.py", line 3, in <module>
    from unittest2.loader import defaultTestLoader
  File "/home/dtantsur/Projects/sushy/.tox/py39/lib/python3.9/site-packages/unittest2/loader.py", line 13, in <module>
    from unittest2 import case, suite, util
  File "/home/dtantsur/Projects/sushy/.tox/py39/lib/python3.9/site-packages/unittest2/case.py", line 18, in <module>
    from unittest2 import result
  File "/home/dtantsur/Projects/sushy/.tox/py39/lib/python3.9/site-packages/unittest2/result.py", line 10, in <module>
    from unittest2.compatibility import wraps
  File "/home/dtantsur/Projects/sushy/.tox/py39/lib/python3.9/site-packages/unittest2/compatibility.py", line 143, in <module>
    class ChainMap(collections.MutableMapping):
AttributeError: module 'collections' has no attribute 'MutableMapping'


Has it been patched in Fedora already?

Comment 3 Dmitry Tantsur 2020-03-02 15:43:10 UTC
Anyway, I think I've figured it: https://review.opendev.org/#/c/710802/

Comment 4 Miro Hrončok 2020-03-02 16:22:49 UTC
> AttributeError: module 'collections' has no attribute 'MutableMapping'

You should not see this with 3.9.0a4. The Fedora build of python39 3.9.0a4 is coming to updates-testing as we speak.

Comment 5 Miro Hrončok 2020-05-25 13:01:17 UTC
This comment is mass posted to all bugs blocking the Python 3.9 tracker, sorry if it is not 100 % relevant. When in doubt, please ask.


The Python 3.9 rebuild is in progress in a Koji side tag.

If you fix this bug, please don't rebuild the package in regular rawhide, but do it in the side tag with:

    $ fedpkg build --target=f33-python

The rebuild is progressing slowly and it is possible this package won't have all the required build dependencies yet. If that's the case, please just leave the fix committed and pushed and we will eventually rebuild it for you.

You are not asked to go and try rebuild all the missing dependencies yourself. If you know there is a bootstrap loop in the dependencies, let me know and we can untangle it together.

If you want to test your fix or reproduce the failure, you can still use the Copr repo mentioned in the initial comment of this bug: https://copr.fedorainfracloud.org/coprs/g/python/python3.9/

Comment 6 Dmitry Tantsur 2020-05-25 16:20:23 UTC
Hi Miro,

The fix has been included in an upstream release. Should we just update the version in rawhide or is something else required?

Comment 7 Miro Hrončok 2020-05-25 17:08:32 UTC
> Should we just update the version in rawhide

Yes. Except don't build it in rawhide, only push it. Thanks.

Comment 8 Dmitry Tantsur 2020-05-26 10:09:55 UTC
Pushed 2.0.3 (a bit conservative to avoid a major bump right now).

Comment 9 Miro Hrončok 2020-05-26 12:31:22 UTC
Thanks.


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