Bug 1899957

Summary: python-dbusmock fails to build with Python 3.10: TypeError: \'dbus.String\' object cannot be interpreted as an integer
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: python-dbusmockAssignee: Neal Gompa <ngompa13>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: mhroncok, ngompa13, thrnciar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-14 14:23:25 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: 1890881, 1927309, 1927313    

Description Tomáš Hrnčiar 2020-11-20 13:09:45 UTC
python-dbusmock fails to build with Python 3.10.0a2.

======================================================================
FAIL: test_methods_type_mismatch (test_api.TestAPI)
calling methods with wrong arguments
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-dbusmock-0.18.3/tests/test_api.py", line 189, in check
    self.dbus_test.Do(*args)
  File "/usr/lib64/python3.10/site-packages/dbus/proxies.py", line 141, in __call__
    return self._connection.call_blocking(self._named_service,
dbus.exceptions.DBusException: org.freedesktop.DBus.Python.TypeError: Traceback (most recent call last):
  File "/usr/lib64/python3.10/site-packages/dbus/service.py", line 711, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/builddir/build/BUILD/python-dbusmock-0.18.3/dbusmock/mockobject.py", line 332, in <lambda>
    method = lambda self, *args, **kwargs: DBusMockObject.mock_method(
  File "/builddir/build/BUILD/python-dbusmock-0.18.3/dbusmock/mockobject.py", line 562, in mock_method
    m.append(signature=in_signature, *args)
TypeError: 'dbus.String' object cannot be interpreted as an integer


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/python-dbusmock-0.18.3/tests/test_api.py", line 205, in test_methods_type_mismatch
    check('i', ['hello'], 'TypeError: an integer is required')
  File "/builddir/build/BUILD/python-dbusmock-0.18.3/tests/test_api.py", line 193, in check
    self.assertIn(err, str(e))
AssertionError: 'TypeError: an integer is required' not found in 'org.freedesktop.DBus.Python.TypeError: Traceback (most recent call last):\n  File "/usr/lib64/python3.10/site-packages/dbus/service.py", line 711, in _message_cb\n    retval = candidate_method(self, *args, **keywords)\n  File "/builddir/build/BUILD/python-dbusmock-0.18.3/dbusmock/mockobject.py", line 332, in <lambda>\n    method = lambda self, *args, **kwargs: DBusMockObject.mock_method(\n  File "/builddir/build/BUILD/python-dbusmock-0.18.3/dbusmock/mockobject.py", line 562, in mock_method\n    m.append(signature=in_signature, *args)\nTypeError: \'dbus.String\' object cannot be interpreted as an integer\n'

======================================================================
FAIL: test_signals_type_mismatch (test_api.TestAPI)
emitting signals with wrong arguments
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-dbusmock-0.18.3/tests/test_api.py", line 477, in check
    self.dbus_mock.EmitSignal('', 's', signature, args)
  File "/usr/lib64/python3.10/site-packages/dbus/proxies.py", line 141, in __call__
    return self._connection.call_blocking(self._named_service,
dbus.exceptions.DBusException: org.freedesktop.DBus.Python.TypeError: Traceback (most recent call last):
  File "/usr/lib64/python3.10/site-packages/dbus/service.py", line 711, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/builddir/build/BUILD/python-dbusmock-0.18.3/dbusmock/mockobject.py", line 487, in EmitSignal
    m.append(signature=signature, *args)
TypeError: 'dbus.String' object cannot be interpreted as an integer


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/python-dbusmock-0.18.3/tests/test_api.py", line 493, in test_signals_type_mismatch
    check('i', ['hello'], 'TypeError: an integer is required')
  File "/builddir/build/BUILD/python-dbusmock-0.18.3/tests/test_api.py", line 481, in check
    self.assertIn(err, str(e))
AssertionError: 'TypeError: an integer is required' not found in 'org.freedesktop.DBus.Python.TypeError: Traceback (most recent call last):\n  File "/usr/lib64/python3.10/site-packages/dbus/service.py", line 711, in _message_cb\n    retval = candidate_method(self, *args, **keywords)\n  File "/builddir/build/BUILD/python-dbusmock-0.18.3/dbusmock/mockobject.py", line 487, in EmitSignal\n    m.append(signature=signature, *args)\nTypeError: \'dbus.String\' object cannot be interpreted as an integer\n'

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01774196-python-dbusmock/

For all our attempts to build python-dbusmock with Python 3.10, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/python-dbusmock/

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:
https://copr.fedorainfracloud.org/coprs/g/python/python3.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 Ben Cotton 2021-02-09 15:26:44 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 2 Miro Hrončok 2021-06-04 20:13:16 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.

Thanks.

See also https://fedoraproject.org/wiki/Changes/Python3.10

If you have general questions about the rebuild, please use this mailing list thread: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/G47SGOYIQLRDTWGOSLSWERZSSHXDEDH5/

Comment 3 Miro Hrončok 2021-06-07 22:58:07 UTC
The f35-python side tag has been merged to Rawhide. From now on, build as you would normally build.

Comment 4 Miro Hrončok 2021-06-08 11:23:44 UTC
*** Bug 1968949 has been marked as a duplicate of this bug. ***

Comment 5 Miro Hrončok 2021-06-14 14:23:25 UTC
Hello,

Please note that this comment was generated automatically. If you feel that this output has mistakes, please contact me via email (mhroncok).

All subpackages of a package against which this bug was filled are now installable or removed from Fedora 35.

Thanks for taking care of it!