Skip to content

test(sdk-anthropic): patch the bedrock signer where anthropic 2.7 imports it - #221

Merged
aikins01 merged 1 commit into
mainfrom
fix/sdk-anthropic-bedrock-signer-patch
Nov 10, 2026
Merged

aikins01 merged 1 commit into
mainfrom
fix/sdk-anthropic-bedrock-signer-patch

Conversation

@aikins01

Copy link
Copy Markdown
Contributor

The python-dependency-bounds (sdks/python-anthropic) job fails on every PR since anthropic 2.7. That release moved the Bedrock signer to anthropic.lib.aws._auth and imports it into anthropic.lib.bedrock._client when the module loads, so the tests' patch of anthropic.lib.bedrock._auth.get_auth_headers raised ModuleNotFoundError. The tests now patch the client module when it holds the signer, and the old location for anthropic 0.116 to 2.6.

Tests: bash .github/scripts/python_dependency_bounds.sh sdks/python-anthropic (anthropic 0.116.0 and 2.8.0), ruff, and pyright in sdks/python-anthropic.

…orts it

anthropic 2.7 moved the Bedrock signer to anthropic.lib.aws._auth and
imports it into anthropic.lib.bedrock._client when the module loads, so
patching anthropic.lib.bedrock._auth failed with ModuleNotFoundError in
the highest dependency-bounds run. The test now patches the client
module when it holds the signer and the old location otherwise.
@aikins01 aikins01 self-assigned this Nov 10, 2026
@aikins01
aikins01 merged commit c5ffdcf into main Nov 10, 2026
10 checks passed
@aikins01
aikins01 deleted the fix/sdk-anthropic-bedrock-signer-patch branch November 10, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant