[PKG-Openstack-devel] Bug#848888: python-testtools: The testtools.deferredruntest module is not importable

Free Ekanayaka freee at debian.org
Tue Dec 20 15:07:26 UTC 2016


Package: python-testtools
Version: 1.8.0-4
Severity: important

Trying to import the Twisted-related test machinery fails:

~$ python -c "import testtools.deferredruntest"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/testtools/deferredruntest.py", line 31, in <module>
    from twisted.trial.unittest import _LogObserver
ImportError: cannot import name _LogObserver


This breaks any existing consumer of the above module.

The issue has been fixed upstream, but it affects the current version
in Debian.

A backport for the upstream fix is trivial and would look like:

--- deferredruntest.py.orig     2016-12-20 15:06:12.984177176 +0000
+++ deferredruntest.py  2016-12-20 15:06:19.332664421 +0000
@@ -28,7 +28,10 @@
 
 from twisted.internet import defer
 from twisted.python import log
-from twisted.trial.unittest import _LogObserver
+try:
+    from twisted.trial.unittest import _LogObserver
+except ImportError:
+    from twisted.trial._synctest import _LogObserver
 
 
 class _DeferredRunTest(RunTest):

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.4.0-53-lowlatency (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages python-testtools depends on:
ii  python-extras         0.0.3-3
ii  python-linecache2     1.0.0-3
ii  python-mimeparse      0.1.4-1
ii  python-pbr            1.10.0-1
ii  python-pkg-resources  32.0.0-1
ii  python-traceback2     1.4.0-4
ii  python-unittest2      1.1.0-6.1
pn  python:any            <none>

Versions of packages python-testtools recommends:
ii  python-fixtures  3.0.0-2

Versions of packages python-testtools suggests:
pn  python-testtools-doc  <none>
ii  python-twisted        16.6.0-2

-- no debconf information



More information about the Openstack-devel mailing list