Jump to solution
Verify

The Fix

Updates the user_preload_options signal documentation to replace the deprecated celery.bin.base.Option with click.option, which is the current standard for adding custom CLI options in Celery.

Based on closed celery/celery issue #10026 · 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.

Jump to Verify Open PR/Commit
@@ -820,22 +820,25 @@ It can be used to add additional command-line arguments to the .. code-block:: python - from celery import Celery - from celery import signals - from celery.bin.base import Option
repro.py
from celery import Celery from celery import signals from click import option app = Celery() app.user_options['preload'].add(option( '--monitoring', action='store_true', help='Enable our external monitoring utility, blahblah', )) @signals.user_preload_options.connect def handle_preload_options(options, **kwargs): if options['monitoring']: enable_monitoring()
verify
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
fix.md
Option A — Apply the official fix\nUpdates the user_preload_options signal documentation to replace the deprecated celery.bin.base.Option with click.option, which is the current standard for adding custom CLI options in Celery.\nWhen NOT to use: This fix should not be used if the documentation is not updated accordingly.\n\n

Why This Fix Works in Production

  • Trigger: - [x] I have included all related issues and possible duplicate issues in this issue
  • Mechanism: The documentation incorrectly referenced a non-existent class, leading to confusion about CLI options
Production impact:
  • 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

  • The documentation incorrectly referenced a non-existent class, leading to confusion about CLI options
  • Production symptom (often without a traceback): - [x] I have included all related issues and possible duplicate issues in this issue

Proof / Evidence

Discussion

High-signal excerpts from the issue thread (symptoms, repros, edge-cases).

“<!-- Please fill this template entirely and do not erase parts of it. We reserve the right to close without a response bug reports which are incomplete. --> # Checklist <!-- To check an item on the list replace [ ] with [x]. --> - [x] I hav”
Issue thread · issue description · source

Failure Signature (Search String)

  • - [x] I have included all related issues and possible duplicate issues in this issue
  • or possible duplicates to this issue as requested by the checklist above.
Copy-friendly signature
signature.txt
Failure Signature ----------------- - [x] I have included all related issues and possible duplicate issues in this issue or possible duplicates to this issue as requested by the checklist above.

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- - [x] I have included all related issues and possible duplicate issues in this issue or possible duplicates to this issue as requested by the checklist above.

Minimal Reproduction

repro.py
from celery import Celery from celery import signals from click import option app = Celery() app.user_options['preload'].add(option( '--monitoring', action='store_true', help='Enable our external monitoring utility, blahblah', )) @signals.user_preload_options.connect def handle_preload_options(options, **kwargs): if options['monitoring']: enable_monitoring()

What Broke

Users encountered errors when trying to use non-existent CLI options in the documentation.

Why It Broke

The documentation incorrectly referenced a non-existent class, leading to confusion about CLI options

Fix Options (Details)

Option A — Apply the official fix

Updates the user_preload_options signal documentation to replace the deprecated celery.bin.base.Option with click.option, which is the current standard for adding custom CLI options in Celery.

When NOT to use: This fix should not be used if the documentation is not updated accordingly.

Fix reference: https://github.com/celery/celery/pull/10056

Last verified: 2026-02-08. Validate in your environment.

Get updates

We publish verified fixes weekly. No spam.

Subscribe

When NOT to Use This Fix

  • This fix should not be used if the documentation is not updated accordingly.

Verify Fix

verify
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.

Related Issues

No related fixes found.

Sources

We don’t republish the full GitHub discussion text. Use the links above for context.