Bug 1899957 - python-dbusmock fails to build with Python 3.10: TypeError: \'dbus.String\' object cannot be interpreted as an integer
Summary: python-dbusmock fails to build with Python 3.10: TypeError: \'dbus.String\' o...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: python-dbusmock
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Neal Gompa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.10
TreeView+ depends on / blocked
 
Reported: 2020-11-20 13:09 UTC by Tomáš Hrnčiar
Modified: 2021-02-09 16:23 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)

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.


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