The Fix
pip install celery==5.5.0
Based on closed celery/celery issue #9451 · 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.
@@ -535,6 +535,8 @@ def apply_async(self, args=None, kwargs=None, task_id=None, producer=None,
headers (Dict): Message headers to be included in the message.
+ The headers can be used as an overlay for custom labeling
+ using the :ref:`canvas-stamping` feature.
Option A — Upgrade to fixed release\npip install celery==5.5.0\nWhen NOT to use: This fix should not be applied if the documentation is already accurate.\n\n
Why This Fix Works in Production
- Trigger: - [x] I have included all related issues and possible duplicate issues in this issue.
- Mechanism: Documentation incorrectly referred to the function as revoke_by_stamped_header instead of revoke_by_stamped_headers
- Why the fix works: Fixes the documentation issues related to the function name and adds examples for using stamped headers in task revocation. (first fixed release: 5.5.0).
- If left unfixed, retries/timeouts can trigger duplicate external side-effects (double charges, duplicate emails, repeated writes).
Why This Breaks in Prod
- Documentation incorrectly referred to the function as revoke_by_stamped_header instead of revoke_by_stamped_headers
- Production symptom (often without a traceback): - [x] I have included all related issues and possible duplicate issues in this issue.
Proof / Evidence
- GitHub issue: #9451
- Fix PR: https://github.com/celery/celery/pull/9578
- First fixed release: 5.5.0
- Reproduced locally: No (not executed)
- Last verified: 2026-02-09
- Confidence: 0.95
- Did this fix it?: Yes (upstream fix exists)
- Own content ratio: 0.72
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“# Checklist - [x] I have checked the issues list for similar or identical bug reports. - [x] I have checked the pull requests list for existing proposed fixes. - [x] I have checked the commit log to find out if the bug was already fixed in”
Failure Signature (Search String)
- - [x] I have included all related issues and possible duplicate issues in this issue.
- 1. Function Name Mismatch:
Copy-friendly signature
Failure Signature
-----------------
- [x] I have included all related issues and possible duplicate issues in this issue.
1. Function Name Mismatch:
Error Message
Signature-only (no traceback captured)
Error Message
-------------
- [x] I have included all related issues and possible duplicate issues in this issue.
1. Function Name Mismatch:
What Broke
Users faced confusion and errors due to incorrect function name in documentation.
Why It Broke
Documentation incorrectly referred to the function as revoke_by_stamped_header instead of revoke_by_stamped_headers
Fix Options (Details)
Option A — Upgrade to fixed release Safe default (recommended)
pip install celery==5.5.0
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/9578
First fixed release: 5.5.0
Last verified: 2026-02-09. Validate in your environment.
When NOT to Use This Fix
- This fix should not be applied if the documentation is already accurate.
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.5.0 | Fixed |
Related Issues
No related fixes found.
Sources
We don’t republish the full GitHub discussion text. Use the links above for context.