Skip to content

SNOW-3559506: RequestsDependencyWarning from vendored requests with chardet 7.x / charset-normalizer 3.x #2883

Description

@ctcjab

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.

Metadata

Metadata

Labels

bugstatus-triage_doneInitial triage done, will be further handled by the driver team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions