Hello friends,
I cloned the master branch oslo.messaging and run tox -e py27.
it reports a lot of import errors (like below):
FAIL: oslo_messaging.tests.test_target.TargetReprTestCase.test_repr(fanout)
tags: worker-0
----------------------------------------------------------------------
Empty attachments:
stderr
stdout
Traceback (most recent call last):
File "oslo_messaging/tests/utils.py", line 38, in setUp
self.messaging_conf = self.useFixture(conffixture.ConfFixture(conf))
File "oslo_messaging/conffixture.py", line 50, in __init__
'oslo_messaging_rabbit')
File "oslo_messaging/conffixture.py", line 25, in _import_opts
__import__(module)
File "oslo_messaging/_drivers/impl_rabbit.py", line 30, in <module>
import kombu.connection
File "/opt/stack/oslo.messaging/.tox/py27/local/lib/python2.7/site-packages/kombu/connection.py", line 15, in <module>
from kombu import exceptions
File "/opt/stack/oslo.messaging/.tox/py27/local/lib/python2.7/site-packages/kombu/exceptions.py", line 8, in <module>
from kombu.five import python_2_unicode_compatible
File "/opt/stack/oslo.messaging/.tox/py27/local/lib/python2.7/site-packages/kombu/five.py", line 6, in <module>
import vine.five
ImportError: No module named vine.five
And some error like this:
FAIL: oslo_messaging.tests.drivers.test_impl_rabbit.TestRabbitPublisher.test_declared_queue_publisher
tags: worker-0
----------------------------------------------------------------------
Empty attachments:
stderr
stdout
Traceback (most recent call last):
File "oslo_messaging/tests/drivers/test_impl_rabbit.py", line 282, in test_declared_queue_publisher
self.assertRaises(exc, try_send, e_passive)
File "/opt/stack/oslo.messaging/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 485, in assertRaises
self.assertThat(our_callable, matcher)
File "/opt/stack/oslo.messaging/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 496, in assertThat
mismatch_error = self._matchHelper(matchee, matcher, message, verbose)
File "/opt/stack/oslo.messaging/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 547, in _matchHelper
mismatch = matcher.match(matchee)
File "/opt/stack/oslo.messaging/.tox/py27/local/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 108, in match
mismatch = self.exception_matcher.match(exc_info)
File "/opt/stack/oslo.messaging/.tox/py27/local/lib/python2.7/site-packages/testtools/matchers/_higherorder.py", line 62, in match
mismatch = matcher.match(matchee)
File "/opt/stack/oslo.messaging/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 475, in match
reraise(*matchee)
File "/opt/stack/oslo.messaging/.tox/py27/local/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 101, in match
result = matchee()
File "/opt/stack/oslo.messaging/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 1049, in __call__
return self._callable_object(*self._args, **self._kwargs)
File "oslo_messaging/tests/drivers/test_impl_rabbit.py", line 278, in try_send
exchange, {}, routing_key='foobar')
File "oslo_messaging/_drivers/impl_rabbit.py", line 1170, in _ensure_publishing
self.ensure(method, retry=retry, error_callback=_error_callback)
File "oslo_messaging/_drivers/impl_rabbit.py", line 817, in ensure
ret, channel = autoretry_method()
File "/opt/stack/oslo.messaging/.tox/py27/local/lib/python2.7/site-packages/kombu/connection.py", line 527, in _ensured
errback and errback(exc, 0)
File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/opt/stack/oslo.messaging/.tox/py27/local/lib/python2.7/site-packages/kombu/connection.py", line 419, in _reraise_as_library_errors
sys.exc_info()[2])
File "/opt/stack/oslo.messaging/.tox/py27/local/lib/python2.7/site-packages/kombu/connection.py", line 414, in _reraise_as_library_errors
yield
File "/opt/stack/oslo.messaging/.tox/py27/local/lib/python2.7/site-packages/kombu/connection.py", line 494, in _ensured
return fun(*args, **kwargs)
File "/opt/stack/oslo.messaging/.tox/py27/local/lib/python2.7/site-packages/kombu/connection.py", line 570, in __call__
return fun(*args, channel=channels[0], **kwargs), channels[0]
File "oslo_messaging/_drivers/impl_rabbit.py", line 793, in execute_method
method()
File "oslo_messaging/_drivers/impl_rabbit.py", line 1234, in _publish_and_creates_default_queue
queue.declare()
File "/opt/stack/oslo.messaging/.tox/py27/local/lib/python2.7/site-packages/kombu/entity.py", line 604, in declare
self._create_exchange(nowait=nowait, channel=channel)
File "/opt/stack/oslo.messaging/.tox/py27/local/lib/python2.7/site-packages/kombu/entity.py", line 611, in _create_exchange
self.exchange.declare(nowait=nowait, channel=channel)
File "/opt/stack/oslo.messaging/.tox/py27/local/lib/python2.7/site-packages/kombu/entity.py", line 185, in declare
nowait=nowait, passive=passive,
File "/opt/stack/oslo.messaging/.tox/py27/local/lib/python2.7/site-packages/kombu/transport/virtual/base.py", line 496, in exchange_declare
(50, 10), 'Channel.exchange_declare', '404',
kombu.exceptions.OperationalError: Channel.exchange_declare: (404) NOT_FOUND - no exchange 'foobar' in vhost u'/'
======================================================================
FAIL: oslo_messaging.tests.drivers.test_impl_rabbit.TestRabbitPublisher.test_send_with_timeout
tags: worker-0
----------------------------------------------------------------------
Empty attachments:
stdout
stderr: {{{
/opt/stack/oslo.messaging/.tox/py27/local/lib/python2.7/site-packages/pkg_resources/__init__.py:187: RuntimeWarning: You have iterated over the result of pkg_resources.parse_version. This is a legacy behavior which is inconsistent with the new version class introduced in setuptools 8.0. In most cases, conversion to a tuple is unnecessary. For comparison of versions, sort the Version instances directly. If you have another use case requiring the tuple, please file a bug with the setuptools project describing that need.
stacklevel=1,
}}}
Traceback (most recent call last):
File "/opt/stack/oslo.messaging/.tox/py27/local/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
return func(*args, **keywargs)
File "oslo_messaging/tests/drivers/test_impl_rabbit.py", line 238, in test_send_with_timeout
routing_key='routing_key')
File "/opt/stack/oslo.messaging/.tox/py27/local/lib/python2.7/site-packages/mock/mock.py", line 937, in assert_called_with
six.raise_from(AssertionError(_error_message(cause)), cause)
File "/opt/stack/oslo.messaging/.tox/py27/local/lib/python2.7/site-packages/six.py", line 718, in raise_from
raise value
AssertionError: Expected call: publish('msg', compression=None, exchange=<Mock id='140097101839760'>, expiration=1000, routing_key='routing_key')
Actual call: publish('msg', compression=None, exchange=<Mock id='140097101839760'>, expiration=1, routing_key='routing_key')
======================================================================
FAIL: oslo_messaging.tests.drivers.zmq.test_zmq_ttl_cache.TestZmqTTLCache.test_in_operator_with_executor
tags: worker-0
----------------------------------------------------------------------
Empty attachments:
stderr
stdout
Traceback (most recent call last):
File "oslo_messaging/tests/drivers/zmq/test_zmq_ttl_cache.py", line 86, in test_in_operator_with_executor
self._test_in_operator()
File "oslo_messaging/tests/drivers/zmq/test_zmq_ttl_cache.py", line 77, in _test_in_operator
self.assertIn(2, self.cache)
File "/opt/stack/oslo.messaging/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 417, in assertIn
self.assertThat(haystack, Contains(needle), message)
File "/opt/stack/oslo.messaging/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 498, in assertThat
raise mismatch_error
testtools.matchers._impl.MismatchError: 2 not in <oslo_messaging._drivers.zmq_driver.server.zmq_ttl_cache.TTLCache object at 0x7f6ae416ac50>
Ran 1981 (+315) tests in 263.460s (+202.463s)
FAILED (id=1, failures=7 (-1626), skips=35)
error: testr failed (1)
ERROR: InvocationError: '/opt/stack/oslo.messaging/.tox/py27/bin/python setup.py testr --slowest --testr-args='
_______________________________________________ summary _______________________________________________
ERROR: py27: commands failed
I did not change any code on the master branch. just run tox -e py27. I am a bit confused why it happened, or I did something wrong?
I'm seeing this too in a different project. I thought it may be related to this bug: https:/ /bugs.launchpad .net/oslo. messaging/ +bug/1587763
However, in my project, the amqp getting installed is 1.4.9. Which should be OK according to that bug.