This repository was archived by the owner on Oct 30, 2026. It is now read-only.
Repository navigation
Use requests-mock for requests interception - #3576
Closed
adamtheturtle wants to merge 2 commits into
Closed
adamtheturtle wants to merge 2 commits into
adamtheturtle wants to merge 2 commits into
Conversation
adamtheturtle
had a problem deploying
to
development
September 8, 2026 09:17 — with
GitHub Actions
Failure
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 09:19 — with
GitHub Actions
Inactive
This was referenced Sep 8, 2026
Member
Author
|
Closing because we decided to keep the existing responses backend. No consumer migration is needed; the remaining typing mismatch will be addressed upstream in getsentry/responses. |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
requestsinterceptor fromresponsestorequests-mock(status, headers, body)route callbacks torequests-mockresponse contextsreal_http, and the existing unmatched-requestConnectionErrorbehaviormock-response-delay's newrequests-mockcallback wrapper, which reads the publicrequest.timeoutattribute directlyresponsesfrom runtime dependencies to the dev extra, where unrelated response-fixture tests still use itThis is the consumer migration for adamtheturtle/mock-response-delay#7. Until that change is released, the dependency is an exact direct reference to its green commit. Using a project dependency rather than a
tool.uv.sourcesoverride is intentional: this repository's documentation and Docker workflows install the project with pip, which does not read uv source overrides. Replace the direct reference with the released version floor before making this PR ready to merge.The underlying
requests-mocktimeout annotation is also being corrected upstream in jamielennox/requests-mock#276. This branch does not need a patched wheel to run: its callback boundary is structurally typed at runtime and usesrequests-mock's public stub types during static checking.Compatibility details
requests-mockhas two relevant behavioral differences fromresponses:contentmust return bytes. The adapter therefore UTF-8 encodes string route bodies and leaves existing byte bodies untouched.requests_mock.exceptions.NoMockAddress. Whenreal_http=False, this branch registers a lowest-priority catch-all which raisesrequests.exceptions.ConnectionError, preserving the behavior callers and tests already observe. Real HTTP passthrough remains controlled byMocker(real_http=True).Route registrations are added after the catch-all because
requests-mockevaluates matchers in reverse registration order, so Vuforia routes retain precedence.Validation
uv run --extra dev prek run --all-files --hook-stage pre-commituv run --extra dev prek run --all-files --hook-stage pre-pushtests/mock_vws/test_requests_mock_usage.py --skip-backend=realwith example credentials: 107 passed, 2 skipped.[dev], resolvingmock-response-delayfrom the exact Git commitgit diff --checkThe all-files local pylint run also reports the pre-existing spelling finding for "subclasses" in
tests/mock_vws/utils/retries.py; the same exactmainSHA has a successful GitHub Lint workflow, and pylint passes for every file changed by this PR.