Skip to content

test_stopServiceNoReconnect fails with twisted >= 26 #33

Description

@sanvila

Hello. As reported to Debian:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1137658

when building this project on a recent Debian unstable system, the build fails due to failing tests:

ERROR: test_stopServiceNoReconnect
(test_component.ComponentTest.test_stopServiceNoReconnect)
When the service is stopped, no reconnect is attempted.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/twisted/trial/_asynctest.py", line 171,
in _deferSetUpAndRun
    await self._run(
        getattr(self, self._testMethodName), self._testMethodName, result
    )
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1188,
in __iter__
    result.raiseException()
    ~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 455, in
raiseException
    raise self.value.with_traceback(self.tb)
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 208, in
maybeDeferred
    result = f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/twisted/internet/utils.py", line 227, in
runWithWarningsSuppressed
    raise exc_info[1].with_traceback(exc_info[2])
  File "/usr/lib/python3/dist-packages/twisted/internet/utils.py", line 223, in
runWithWarningsSuppressed
    result = f(*a, **kw)
  File "/build/reproducible-
path/wokkel-18.0.0/.pybuild/cpython3_3.13/build/test/test_component.py", line
108, in test_stopServiceNoReconnect
    comp.stopService()
    ~~~~~~~~~~~~~~~~^^
  File "/build/reproducible-
path/wokkel-18.0.0/.pybuild/cpython3_3.13/build/wokkel/component.py", line 88,
in stopService
    self.factory.stopTrying()
    ~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3/dist-packages/twisted/internet/protocol.py", line 508,
in stopTrying
    self.connector.stopConnecting()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 1267, in
stopConnecting
    assert self.transport is not None
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError

This is most probably because of the new twisted, now at version 26.4.0.

I managed to fix the test failure by applying this patch:

https://salsa.debian.org/python-team/packages/wokkel/-/raw/master/debian/patches/fix-test-for-twisted-26.patch?ref_type=heads

but of course we would prefer the "official" fix, if any.

Thanks,

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions