The Fix
pip install celery==5.0.1
Based on closed celery/celery issue #6399 · PR/commit linked
Production note: This usually shows up under retries/timeouts. Treat it as a side-effect risk until you can verify behavior with a canary + real traffic.
@@ -168,7 +168,7 @@ class CommaSeparatedList(ParamType):
def convert(self, value, param, ctx):
- return set(text.str_to_list(value))
+ return text.str_to_list(value)
Traceback (most recent call last):
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/bin/celery", line 8, in <module>
sys.exit(main())
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/lib/python3.8/site-packages/celery/__main__.py", line 15, in main
sys.exit(_main())
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/lib/python3.8/site-packages/celery/bin/celery.py", line 150, in main
return celery(auto_envvar_prefix="CELERY")
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/lib/python3.8/site-packages/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/lib/python3.8/site-packages/celery/bin/control.py", line 125, in inspect
replies = ctx.obj.app.control.inspect(timeout=timeout,
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/lib/python3.8/site-packages/celery/app/control.py", line 97, in _request
return self._prepare(self.app.control.broadcast(
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/lib/python3.8/site-packages/celery/app/control.py", line 477, in broadcast
return self.mailbox(conn)._broadcast(
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/lib/python3.8/site-packages/kombu/pidbox.py", line 319, in _broadcast
raise ValueError(
ValueError: destination must be a list/tuple not <class 'set'>
Sentry is attempting to send 0 pending error messages
Waiting up to 2 seconds
Press Ctrl-C to quit
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
Option A — Upgrade to fixed release\npip install celery==5.0.1\nWhen NOT to use: This fix should not be applied if the application relies on set behavior for CommaSeparatedList.\n\n
Why This Fix Works in Production
- Trigger: sys.exit(main())
- Mechanism: CommaSeparatedList returns a set instead of a list, causing compatibility issues
- Why the fix works: Fixes the issue by returning a list instead of a set in the CommaSeparatedList class, addressing compatibility with the _broadcast method of kombu Mailbox. (first fixed release: 5.0.1).
- If left unfixed, the same config can fail only in production (env differences), causing startup failures or partial feature outages.
Why This Breaks in Prod
- Shows up under Python 3.8 in real deployments (not just unit tests).
- CommaSeparatedList returns a set instead of a list, causing compatibility issues
- Surfaces as: Traceback (most recent call last):
Proof / Evidence
- GitHub issue: #6399
- Fix PR: https://github.com/celery/celery/pull/6400
- First fixed release: 5.0.1
- Reproduced locally: No (not executed)
- Last verified: 2026-02-09
- Confidence: 0.85
- Did this fix it?: Yes (upstream fix exists)
- Own content ratio: 0.29
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“https://github.com/celery/celery/blob/8a92b7128bc921d4332fe01486accc243115aba8/celery/bin/base.py#L171 CommaSeparatedList return set instead list”
Failure Signature (Search String)
- sys.exit(main())
Error Message
Stack trace
Error Message
-------------
Traceback (most recent call last):
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/bin/celery", line 8, in <module>
sys.exit(main())
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/lib/python3.8/site-packages/celery/__main__.py", line 15, in main
sys.exit(_main())
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/lib/python3.8/site-packages/celery/bin/celery.py", line 150, in main
return celery(auto_envvar_prefix="CELERY")
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(sel
... (truncated) ...
Minimal Reproduction
Traceback (most recent call last):
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/bin/celery", line 8, in <module>
sys.exit(main())
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/lib/python3.8/site-packages/celery/__main__.py", line 15, in main
sys.exit(_main())
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/lib/python3.8/site-packages/celery/bin/celery.py", line 150, in main
return celery(auto_envvar_prefix="CELERY")
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/lib/python3.8/site-packages/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/lib/python3.8/site-packages/celery/bin/control.py", line 125, in inspect
replies = ctx.obj.app.control.inspect(timeout=timeout,
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/lib/python3.8/site-packages/celery/app/control.py", line 97, in _request
return self._prepare(self.app.control.broadcast(
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/lib/python3.8/site-packages/celery/app/control.py", line 477, in broadcast
return self.mailbox(conn)._broadcast(
File "/Users/aszubarev/Library/Caches/pypoetry/virtualenvs/service-notification-py-xHAuYcng-py3.8/lib/python3.8/site-packages/kombu/pidbox.py", line 319, in _broadcast
raise ValueError(
ValueError: destination must be a list/tuple not <class 'set'>
Sentry is attempting to send 0 pending error messages
Waiting up to 2 seconds
Press Ctrl-C to quit
Environment
- Python: 3.8
What Broke
Users cannot inspect tasks with the destination option, leading to operational disruptions.
Why It Broke
CommaSeparatedList returns a set instead of a list, causing compatibility issues
Fix Options (Details)
Option A — Upgrade to fixed release Safe default (recommended)
pip install celery==5.0.1
Use when you can deploy the upstream fix. It is usually lower-risk than long-lived workarounds.
Fix reference: https://github.com/celery/celery/pull/6400
First fixed release: 5.0.1
Last verified: 2026-02-09. Validate in your environment.
When NOT to Use This Fix
- This fix should not be applied if the application relies on set behavior for CommaSeparatedList.
Verify Fix
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
Did This Fix Work in Your Case?
Quick signal helps us prioritize which fixes to verify and improve.
Prevention
- Capture the exact failing error string in logs and tests so you can reproduce via a minimal script.
- Pin production dependencies and upgrade only with a reproducible test that hits the failing path.
Version Compatibility Table
| Version | Status |
|---|---|
| 5.0.1 | Fixed |
Related Issues
No related fixes found.
Sources
We don’t republish the full GitHub discussion text. Use the links above for context.