-
Notifications
You must be signed in to change notification settings - Fork 10
Description
Context
requests 2.32.5 has a hardcoded version check in __init__.py that emits a RequestsDependencyWarning when chardet or charset-normalizer are newer than what it recognizes. This is a requests bug — the versions are within the declared constraints (chardet<6, charset_normalizer<4) but fail the runtime string check.
We have chardet 7.2.0 and charset-normalizer 3.4.6 installed. The warning is cosmetic and harmless — chardet isn't even used unless the use-chardet-on-py3 extra is enabled.
What we did
Added PYTHONWARNINGS="ignore:::requests" to the RUN variable in the Makefile (PR #2888). This suppresses all warnings from the requests module during poetry run commands.
When to remove
Remove the suppression when either:
requestsreleases a version that fixes the hardcoded version check- We drop
requestsas a dependency - The chardet/charset-normalizer versions fall back within the hardcoded check's range (unlikely — they only go up)
Monitor: https://github.com/psf/requests/issues (search for "RequestsDependencyWarning")