dev-python/celery-2.5.3 in its mongodb backend import the module pymongo.binary but this module was deprecated since pymongo 1.9 in favor of bson.binary and was finally removed in pymongo 2.2. (http://api.mongodb.org/python/1.9/api/pymongo/binary.html) Since there is no version limitation in the ebuild (and also no dependency to pymongo outside of the test use flag), an update to the last version of pymongo breaks celery tasks using the mongodb backend. Reproducible: Always Steps to Reproduce: 1. Start a celeryd server 2. Run a celery task which uses the mongodb backend Actual Results: There is the traceback of this import error: Traceback (most recent call last): File "/usr/lib64/python2.7/site-packages/celery/execute/trace.py", line 206, in trace_task store_result(uuid, retval, SUCCESS) File "/usr/lib64/python2.7/site-packages/celery/backends/base.py", line 229, in store_result return self._store_result(task_id, result, status, traceback, **kwargs) File "/usr/lib64/python2.7/site-packages/celery/backends/mongodb.py", line 112, in _store_result from pymongo.binary import Binary ImportError: No module named binary Expected Results: No import error. Task runnning normally
actually, no + # For some reason uses import pymongo.binary but system has bson.binary sed -e 's:from pymongo import binary:from bson import binary:' -i celery/tests/test_backends/test_mongodb.py || die sed -e 's:pymongo.binary:bson.binary:' -i celery/backends/mongodb.py || die from my home's patches/celery.patch
oops, wrong
hmm; but this module was deprecated since pymongo 1.9 in favor of bson.binary so this is known. sed -e 's:pymongo.binary:bson.binary:' -i celery/backends/mongodb.py || die from 422661 adjusts celery's mongodb.py directly to use bson. 422661 is yet to be actioned. enough said. iksaif will sort them.
Thanks