Bugzilla – Bug 1211603
ImportError starting celery
Last modified: 2023-08-15 14:13:02 UTC
Updating celery to 5.2.7-lp154.3.1 and later breaks compatibility with python3-billiard. After the update, starting celery yields the following traceback: Traceback (most recent call last): File "/usr/bin/celery", line 11, in <module> load_entry_point('celery==5.2.7', 'console_scripts', 'celery')() File "/usr/lib/python3.6/site-packages/celery/__main__.py", line 14, in main from celery.bin.celery import main as _main File "/usr/lib/python3.6/site-packages/celery/bin/celery.py", line 23, in <module> from celery.bin.control import control, inspect, status File "/usr/lib/python3.6/site-packages/celery/bin/control.py", line 12, in <module> from celery.worker.control import Panel File "/usr/lib/python3.6/site-packages/celery/worker/control.py", line 17, in <module> from .request import Request File "/usr/lib/python3.6/site-packages/celery/worker/request.py", line 13, in <module> from billiard.einfo import ExceptionWithTraceback ImportError: cannot import name 'ExceptionWithTraceback' The installed version for billiard is the latest available python3-billiard-3.6.4.0-lp154.2.10.noarch, which does not include this export. As far as I traced it, this seems to be due to the applied patch 879af6341974c3778077d8212d78f093b2d77a4f.patch, which seems to correlate with the upstream change to billiard >= 4. The latter one's build currently seems broken due to an unsatisfied python3-psutil dependency.
Hm, I see that you took celery from devel:languages:python, but you kept the old billiard from the official Leap repo. The packages in devel:languages:python are meant for Tumbleweedand as such are moving much faster than Leap and are not guaranteed to be compatible with other Leap packages (notice that the celery tests didn't build because of old versions). You would have to update billiard, the newest version doesn't build for Leap at the moment (frankly because we don't really care for the 15.5 target in d:l:py), but you can try to build it yourself (I would probably branch it, skip the tests [danger zone, but with the new celery you are in it already] and see). TL;DR: this scenario is not supported, celery in Leap is still v4
But thank you for the report, I have to adjust the celery requirements.
If the packages are for Tumbleweed, then why is there a build in backports (or was it d:l:p at the time - I cannot recall) for Leap 15.4? I'm not installing a Tumbleweed package here. Anyways, I think at the time of reporting, the newer python3-billiard didn't build in backports because of the psutil dependency so there was no newer version that could be switched to. But that has been resolved in the meantime. Certainly updating the requirements prevents this. Thanks.
Hi, does it mean that now it works for you?
Yes it does. Backports now contains matching builds (for newer Python versions) for both celery and billiard. Thus the "fallback" to an older billiard version is not an issue.
Great, thus closing. Thank you!