Update dependency resolution#23159
Merged
Kyle-Neale merged 1 commit intomasterfrom Apr 3, 2026
Merged
Conversation
Kyle-Neale
approved these changes
Apr 3, 2026
mwdd146980
added a commit
that referenced
this pull request
Apr 5, 2026
* Update dependency resolution (#23159) Co-authored-by: Kyle-Neale <37895372+Kyle-Neale@users.noreply.github.com> * Swap mock_http_response fixture from MockResponse to MockHTTPResponse Replace the requests-coupled MockResponse with the library-agnostic MockHTTPResponse in the mock_response fixture, decoupling ~102 test files from the requests library without touching individual test code. - Swap mock_response fixture to yield MockHTTPResponse - Fix mock_http_response_per_endpoint fallback to use fixture parameter - Remove sonatype_nexus local fixture override (now redundant) - Update match strings in 9 integrations from requests.exceptions.HTTPError to HTTPStatusError (our own shared exception class) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Add parameter order comment + fix sonatype_nexus test bug Document that MockHTTPResponse has a different parameter order than MockResponse (all callers use keyword args, so not a compatibility concern). Fix test_successful_metrics_collection which was passing vacuously: dict.update() returns None so json_data was always None, the check's json decode failed silently, no metrics were submitted, and assert_all_metrics_covered() trivially passed. Provide complete mock data for both API calls and add individual metric assertions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Re-add _CaseInsensitiveDict to MockHTTPResponse for step3b fixture swap Step3b will make MockHTTPResponse the backing for all mock_http_response fixture users (~102 test files). Production code accesses headers with original-case keys (e.g. response.headers['Content-Type']), which would KeyError or silently return wrong values with the plain lowered-key dict. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Address PR 3b review: harden _CaseInsensitiveDict, fix test redundancy - Add missing dict methods (__delitem__, pop, update, setdefault) to _CaseInsensitiveDict so tests won't silently break if production code uses them on response headers - Make isinstance guards consistent across all methods - Replace redundant `assert in` checks with mixed-case .get() per reviewer suggestion; add tests for new dict methods - Add TODO(httpx-migration) comment on per-endpoint fixture default Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Fix response.raw and response.url on MockHTTPResponse Make raw.read delegate to BytesIO stream so json.load(r.raw) works (fixes kubelet_base test regression). Add url attribute with default '' (fixes sonatype_nexus test_timeout_error accessing response.url). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Address agint-review nits: fix iterable update, add url test, remove dead args - Fix _CaseInsensitiveDict.update() to lowercase keys from iterable-of-pairs - Add test_mock_response_url() for MockHTTPResponse url parameter - Remove dead URL positional args from 7 sonatype_nexus test calls Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Address review round 2: revert test churn, extract mock method constant - Revert unnecessary Content-Type → content-type case change in test - Extract _DEFAULT_MOCK_METHOD constant for requests.Session.get default Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: datadog-agent-integrations-bot[bot] <159767151+datadog-agent-integrations-bot[bot]@users.noreply.github.com> Co-authored-by: Kyle-Neale <37895372+Kyle-Neale@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
Direct dependencies were updated in f1bc291 (triggered by PR #23124).
Additional Notes
This PR was automatically generated by the following workflow:
https://github.com/DataDog/integrations-core/actions/runs/23950769511