nameko: Incompatibility with kombu 4.0

When running the pub/sub example from the docs, I get the following error:

AttributeError: 'Connection' object has no attribute 'exchange_declare'

Full traceback is here:

https://gist.github.com/adwhit/5007a304d68891ead581e4c9035db205

Nameko version 2.4.2, Kombu version 4.0.0

If I drop down to Kombu 3.0.37, it works. Therefore I assume the problem is either with Kombu or the Nameko-Kombu interface.

Edit - I see you have recently updated setup.py to use a version < 4. Feel free to close this issue! I note that every other feature seemed to be working correctly so hopefully there will not be too much work to get 4.0 working.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 20 (12 by maintainers)

Most upvoted comments

The incompatibility is with pyamqp 2.x. They are not major, but fixing them required feature sniffing to keep supporting the older version of the library so we didn’t.

2.x has been out for long enough now though that I would be happy to upgrade and drop support for older versions.

Are you using both Celery and Nameko in the same process? If not, can’t you run them from different environments?

I don’t know if my problem deserves separate issue, but I have a problem now, which seems to be related to this topic. I have latest celery (4.1.0) in project which depends on kombu 4.1.0. Since I have also nameko, I can’t use pytest (and probably code that invokes calls to the nameko microservice, haven’t tested yet), it just fails with:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/pluggy/__init__.py", line 397, in load_setuptools_entrypoints
    plugin = ep.load()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2404, in load
    self.require(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2427, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 875, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (kombu 4.1.0 (/usr/lib/python3.6/site-packages), Requirement.parse('kombu<4,>=3.0.1'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/pytest", line 11, in <module>
    sys.exit(main())
  File "/usr/lib/python3.6/site-packages/_pytest/config.py", line 50, in main
    config = _prepareconfig(args, plugins)
  File "/usr/lib/python3.6/site-packages/_pytest/config.py", line 160, in _prepareconfig
    pluginmanager=pluginmanager, args=args)
  File "/usr/lib/python3.6/site-packages/pluggy/__init__.py", line 617, in __call__
    return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
  File "/usr/lib/python3.6/site-packages/pluggy/__init__.py", line 222, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/usr/lib/python3.6/site-packages/pluggy/__init__.py", line 216, in <lambda>
    firstresult=hook.spec_opts.get('firstresult'),
  File "/usr/lib/python3.6/site-packages/pluggy/callers.py", line 196, in _multicall
    gen.send(outcome)
  File "/usr/lib/python3.6/site-packages/_pytest/helpconfig.py", line 68, in pytest_cmdline_parse
    config = outcome.get_result()
  File "/usr/lib/python3.6/site-packages/pluggy/callers.py", line 76, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/usr/lib/python3.6/site-packages/pluggy/callers.py", line 180, in _multicall
    res = hook_impl.function(*args)
  File "/usr/lib/python3.6/site-packages/_pytest/config.py", line 943, in pytest_cmdline_parse
    self.parse(args)
  File "/usr/lib/python3.6/site-packages/_pytest/config.py", line 1108, in parse
    self._preparse(args, addopts=addopts)
  File "/usr/lib/python3.6/site-packages/_pytest/config.py", line 1071, in _preparse
    self.pluginmanager.load_setuptools_entrypoints('pytest11')
  File "/usr/lib/python3.6/site-packages/pluggy/__init__.py", line 402, in load_setuptools_entrypoints
    "Plugin %r could not be loaded: %s!" % (ep.name, e))
pluggy.PluginValidationError: Plugin 'pytest_nameko' could not be loaded: (kombu 4.1.0 (/usr/lib/python3.6/site-packages), Requirement.parse('kombu<4,>=3.0.1'))!

When lowering down kombu to 3.0.17 i get error from celery (something about imports and other errors as well).

Am I missing something obvious or I just can’t use nameko and celery in one project due to kombu versions mismatch (can you suggest something in this case)?