Files
maigret/tests
faeba71e9b Route the database auto-update through --proxy (#3109)
resolve_db_path() runs before the first site check and fetched db_meta.json
and data.json with bare requests.get() calls, so a run started with --proxy
still reached raw.githubusercontent.com from the real address once every 24
hours. Auto-update is on by default, and only HTTP_PROXY / HTTPS_PROXY were
honoured, by accident of requests reading them itself.

Thread the proxy into both requests and into force_update(), normalising the
scheme for PySocks the way the other two transports already are. An explicit
proxies mapping also wins over the environment, so NO_PROXY cannot bypass it.

When the proxy is unreachable requests raises and the existing handler
reports the update as failed and keeps the local database. There is
deliberately no retry without the proxy: that would put the leak back on the
failure path.

Fixes #3108

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-10-10 23:31:40 +03:00
..
2021-01-02 00:23:58 +03:00