The Fix
pip install celery==4.4.3
Based on closed celery/celery issue #6035 · 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.
@@ -204,7 +204,7 @@ def run_tests(self):
platforms=['any'],
install_requires=install_requires(),
- python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*,",
+ python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",
tests_require=reqs('test.txt'),
>> import platform
>> import pkg_resources
>>
>> your_python_requires_str = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*,"
>> pkg_resources.Requirement.parse("python_version%s" % your_python_requires_str)
.....
pkg_resources.RequirementParseError: Invalid requirement, parse error at "','"
>>
>> valid_python_requires_str = your_python_requires_str.rstrip(',')
>> pkg_resources.Requirement.parse("python_version%s" % valid_python_requires_str)
Requirement.parse('python_version!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7')
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==4.4.3\nWhen NOT to use: Do not use if it changes public behavior or if the failure cannot be reproduced.\n\n
Why This Fix Works in Production
- Trigger: >> import platform
- Mechanism: Updates the 'python_requires' string in setup.py to a valid format.
- Why the fix works: Updates the 'python_requires' string in setup.py to a valid format. (first fixed release: 4.4.3).
- 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
- Surfaces as: >> import platform
Proof / Evidence
- GitHub issue: #6035
- Fix PR: https://github.com/celery/celery/pull/6063
- First fixed release: 4.4.3
- 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.35
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“Thanks for the report @brot. Would you like to open a PR to address this issue?”
“https://github.com/celery/celery/pull/6063”
Failure Signature (Search String)
- >> import platform
Error Message
Stack trace
Error Message
-------------
>> import platform
>> import pkg_resources
>>
>> your_python_requires_str = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*,"
>> pkg_resources.Requirement.parse("python_version%s" % your_python_requires_str)
.....
pkg_resources.RequirementParseError: Invalid requirement, parse error at "','"
>>
>> valid_python_requires_str = your_python_requires_str.rstrip(',')
>> pkg_resources.Requirement.parse("python_version%s" % valid_python_requires_str)
Requirement.parse('python_version!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7')
Minimal Reproduction
>> import platform
>> import pkg_resources
>>
>> your_python_requires_str = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*,"
>> pkg_resources.Requirement.parse("python_version%s" % your_python_requires_str)
.....
pkg_resources.RequirementParseError: Invalid requirement, parse error at "','"
>>
>> valid_python_requires_str = your_python_requires_str.rstrip(',')
>> pkg_resources.Requirement.parse("python_version%s" % valid_python_requires_str)
Requirement.parse('python_version!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7')
What Broke
Users encountered installation issues due to invalid Python version specifications.
Fix Options (Details)
Option A — Upgrade to fixed release Safe default (recommended)
pip install celery==4.4.3
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/6063
First fixed release: 4.4.3
Last verified: 2026-02-09. Validate in your environment.
When NOT to Use This Fix
- Do not use if it changes public behavior or if the failure cannot be reproduced.
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 |
|---|---|
| 4.4.3 | Fixed |
Related Issues
No related fixes found.
Sources
We don’t republish the full GitHub discussion text. Use the links above for context.