@devries-cameron20 / composio Mirror · read-only / commits / 45f4ebd77
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 06:00 UTC

test(py): isolate DNS-pinning tests from inherited proxies (#5290)

This PR: - closes https://github.com/ComposioHQ/composio/issues/5249 - makes `no_inherited_proxy` patch `get_environ_proxies` in both `requests.utils` and `requests.sessions` (which imports it by name), using the real `(url, no_proxy=None)` signature, so the session no longer routes the pinned request through a system, registry, or environment proxy - adds `test_pinning_ignores_an_inherited_proxy`, a real-socket test that runs the rebinding fetch under an unreachable inherited proxy, so Linux CI now catches a regression of the fixture - test-only: `composio/utils/url_safety.py` and the rebinding assertions are unchanged, so no changeset - credits @Siddharth-Dangi (co-author), whose branch identified the session-level lookup; this keeps that part and leaves out the extra `requests.compat`/`urllib.request` patches and the tests that only assert the mocks return `{}`, since the two `get_environ_proxies` names cover every lookup Requests makes ## Verification - `next`, `HTTP_PROXY=http://127.0.0.1:9` exported: 3 pinning tests fail with `ProxyError`; with this PR: 7 passed - Simulated macOS system proxy (patched `urllib.request.getproxies_macosx_sysconf`, no env proxy, no real settings touched): `next` 3 failed, this PR 7 passed - New test fails on the old fixture (`ProxyError ... Unable to connect to proxy`) and passes with the fix - Locked Python 3.12 env: full `python/tests` suite 2488 passed, 215 skipped; ruff check and format pass Co-authored-by: Siddharth-Dangi <mr.siddharthdangi@gmail.com>

Alberto Schiabel committed Nov 11, 2026 at 03:35 UTC 45f4ebd77ff2d1f317fbf906d0652416cdf8d762

No changes.