Jump to solution
Verify

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.

Jump to Verify Open PR/Commit
@@ -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'),
repro.py
>> 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')
verify
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
fix.md
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).
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

  • 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?”
@georgepsarakis · 2020-04-20 · source
“https://github.com/celery/celery/pull/6063”
@auvipy · 2020-05-01 · source

Failure Signature (Search String)

  • >> import platform

Error Message

Stack trace
error.txt
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

repro.py
>> 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

When NOT to use: Do not use if it changes public behavior or if the failure cannot be reproduced.

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.

Get updates

We publish verified fixes weekly. No spam.

Subscribe

When NOT to Use This Fix

  • Do not use if it changes public behavior or if the failure cannot be reproduced.

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.

Version Compatibility Table

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