snowflakedb / snowflakedb/snowflake-connector-python
SNOW-3559506: RequestsDependencyWarning from vendored requests with chardet 7.x / charset-normalizer 3.x
@sfc-gh-snow-drivers-warsaw-dl is already working on this.
Since May 22, 2026.
- Dominant language
- Python
- Stars
- 730
- Forks
- 574
- Avg merge
- 5h 45m
- Merged PRs (30d)
- 16
Description
Description
snowflake-connector-python 4.5.0 emits a RequestsDependencyWarning at import time because the vendored requests has stale version bounds:
.venv/lib/python3.13/site-packages/snowflake/connector/vendored/requests/__init__.py:113:
RequestsDependencyWarning: urllib3 (2.6.3) or chardet (7.4.3)/charset_normalizer (3.4.7)
doesn't match a supported version!
The vendored check_compatibility() requires chardet >= 3.0.2, < 6.0.0, but chardet is now at 7.x. Since chardet is checked before charset_normalizer, the assertion fails even though charset_normalizer 3.4.7 would pass its own check (>= 2.0.0, < 4.0.0).
This is the same root cause as #1188 (closed in 2022 after the bounds were bumped for chardet 5.x).
Environment
- snowflake-connector-python: 4.5.0
- Python: 3.13
- chardet: 7.4.3
- charset_normalizer: 3.4.7
- urllib3: 2.7.0
- OS: Linux (RHEL 9)
Expected behavior
No warning on import when using current versions of chardet and charset_normalizer.
Suggested fix
Update the version bounds in src/snowflake/connector/vendored/requests/__init__.py (check_compatibility), or re-vendor a newer version of requests that has up-to-date bounds.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.