The Fix
pip install requests==2.28.2
Based on closed psf/requests issue #6288 · PR/commit linked
Production note: Most teams hit this during upgrades or environment changes. Roll out with a canary and smoke critical endpoints (health, OpenAPI/docs) before 100%.
@@ -80,8 +80,8 @@ def check_compatibility(urllib3_version, chardet_version, charset_normalizer_ver
major, minor, patch = charset_normalizer_version.split(".")[:3]
major, minor, patch = int(major), int(minor), int(patch)
- # charset_normalizer >= 2.0.0 < 3.0.0
- assert (2, 0, 0) <= (major, minor, patch) < (3, 0, 0)
+ # charset_normalizer >= 2.0.0 < 4.0.0
% pip install --upgrade charset-normalizer
Requirement already satisfied: charset-normalizer in /usr/local/lib/python3.10/site-packages (3.0.0)
Collecting charset-normalizer
Downloading charset_normalizer-3.0.1-cp310-cp310-macosx_10_9_x86_64.whl (124 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 124.2/124.2 kB 2.5 MB/s eta 0:00:00
Installing collected packages: charset-normalizer
Attempting uninstall: charset-normalizer
Found existing installation: charset-normalizer 3.0.0
Uninstalling charset-normalizer-3.0.0:
Successfully uninstalled charset-normalizer-3.0.0
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
requests 2.28.1 requires charset-normalizer<3,>=2, but you have charset-normalizer 3.0.1 which is incompatible.
Successfully installed charset-normalizer-3.0.1
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
Option A — Upgrade to fixed release\npip install requests==2.28.2\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: ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following…
- Mechanism: Allows charset-normalizer version 3.x to be used with requests, addressing compatibility issues.
- Why the fix works: Allows charset-normalizer version 3.x to be used with requests, addressing compatibility issues. (first fixed release: 2.28.2).
- 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.10 in real deployments (not just unit tests).
- Surfaces as: ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
Proof / Evidence
- GitHub issue: #6288
- Fix PR: https://github.com/psf/requests/pull/6261
- First fixed release: 2.28.2
- 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.39
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“This is addressed in https://github.com/psf/requests/pull/6261 but hasn't been released yet. For what it's worth, this is on the 2.29.0 milestone.”
Failure Signature (Search String)
- ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
Error Message
Stack trace
Error Message
-------------
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
Minimal Reproduction
% pip install --upgrade charset-normalizer
Requirement already satisfied: charset-normalizer in /usr/local/lib/python3.10/site-packages (3.0.0)
Collecting charset-normalizer
Downloading charset_normalizer-3.0.1-cp310-cp310-macosx_10_9_x86_64.whl (124 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 124.2/124.2 kB 2.5 MB/s eta 0:00:00
Installing collected packages: charset-normalizer
Attempting uninstall: charset-normalizer
Found existing installation: charset-normalizer 3.0.0
Uninstalling charset-normalizer-3.0.0:
Successfully uninstalled charset-normalizer-3.0.0
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
requests 2.28.1 requires charset-normalizer<3,>=2, but you have charset-normalizer 3.0.1 which is incompatible.
Successfully installed charset-normalizer-3.0.1
Environment
- Python: 3.10
Fix Options (Details)
Option A — Upgrade to fixed release Safe default (recommended)
pip install requests==2.28.2
Use when you can deploy the upstream fix. It is usually lower-risk than long-lived workarounds.
Fix reference: https://github.com/psf/requests/pull/6261
First fixed release: 2.28.2
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
- Add a TLS smoke test that performs a real handshake in CI (include CA bundle validation and hostname checks).
- Alert on handshake failures by error string and endpoint to catch cert/CA changes quickly.
Version Compatibility Table
| Version | Status |
|---|---|
| 2.28.2 | Fixed |
Related Issues
No related fixes found.
Sources
We don’t republish the full GitHub discussion text. Use the links above for context.