Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-anthropic for
openSUSE:Factory checked in at 2026-07-22 19:06:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-anthropic (Old)
and /work/SRC/openSUSE:Factory/.python-anthropic.new.24530 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-anthropic"
Wed Jul 22 19:06:30 2026 rev:5 rq:1367132 version:0.117.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-anthropic/python-anthropic.changes
2026-07-17 18:50:13.926780517 +0200
+++
/work/SRC/openSUSE:Factory/.python-anthropic.new.24530/python-anthropic.changes
2026-07-22 19:08:36.064242058 +0200
@@ -1,0 +2,7 @@
+Wed Jul 22 13:24:33 UTC 2026 - Martin Pluskal <[email protected]>
+
+- Update to 0.117.1:
+ * Handle AWS credentials correctly when using AnthropicAWS.copy()
+ * Add support for new refusal category
+
+-------------------------------------------------------------------
Old:
----
anthropic-0.117.0.tar.gz
New:
----
anthropic-0.117.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-anthropic.spec ++++++
--- /var/tmp/diff_new_pack.gofNQG/_old 2026-07-22 19:08:36.612260834 +0200
+++ /var/tmp/diff_new_pack.gofNQG/_new 2026-07-22 19:08:36.612260834 +0200
@@ -18,7 +18,7 @@
%{?sle15_python_module_pythons}
Name: python-anthropic
-Version: 0.117.0
+Version: 0.117.1
Release: 0
Summary: The official Python library for the Anthropic API
License: MIT
++++++ anthropic-0.117.0.tar.gz -> anthropic-0.117.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/anthropic-0.117.0/.release-please-manifest.json
new/anthropic-0.117.1/.release-please-manifest.json
--- old/anthropic-0.117.0/.release-please-manifest.json 2020-02-02
01:00:00.000000000 +0100
+++ new/anthropic-0.117.1/.release-please-manifest.json 2020-02-02
01:00:00.000000000 +0100
@@ -1,3 +1,3 @@
{
- ".": "0.117.0"
+ ".": "0.117.1"
}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/anthropic-0.117.0/CHANGELOG.md
new/anthropic-0.117.1/CHANGELOG.md
--- old/anthropic-0.117.0/CHANGELOG.md 2020-02-02 01:00:00.000000000 +0100
+++ new/anthropic-0.117.1/CHANGELOG.md 2020-02-02 01:00:00.000000000 +0100
@@ -1,5 +1,24 @@
# Changelog
+## 0.117.1 (2026-07-21)
+
+Full Changelog:
[v0.117.0...v0.117.1](https://github.com/anthropics/anthropic-sdk-python/compare/v0.117.0...v0.117.1)
+
+### Bug Fixes
+
+* **aws:** handle credentials correctly when using AnthropicAWS.copy()
([85d3881](https://github.com/anthropics/anthropic-sdk-python/commit/85d3881b2e178dd30b30f9ac4c462f20ea88693d))
+
+
+### Chores
+
+* **api:** add support for new refusal category
([d1dea0b](https://github.com/anthropics/anthropic-sdk-python/commit/d1dea0b51164c859de1e05a78468f5be2b6a67de))
+* **client:** docs updates
([b14f94c](https://github.com/anthropics/anthropic-sdk-python/commit/b14f94c231f9adc6bb2ad96eddfc27cc1a4cfea7))
+* **deps:** bump http-snapshot to 0.1.9
([#275](https://github.com/anthropics/anthropic-sdk-python/issues/275))
([434b657](https://github.com/anthropics/anthropic-sdk-python/commit/434b65772633f1c0d1899de64d40a67b7cb943fe))
+* **deps:** pin httpx_aiohttp major version
([#271](https://github.com/anthropics/anthropic-sdk-python/issues/271))
([924487f](https://github.com/anthropics/anthropic-sdk-python/commit/924487f7c8b3afd69ec382af78326ba224779141))
+* **docs:** small updates
([c48db8b](https://github.com/anthropics/anthropic-sdk-python/commit/c48db8b6cdd800a98bf57088f530de8fe4dc82e8))
+* **docs:** small updates
([755c06c](https://github.com/anthropics/anthropic-sdk-python/commit/755c06cc06161ccdf9b28b77d5e6de58adb462ce))
+* **internal:** codegen related update
([a4fbecf](https://github.com/anthropics/anthropic-sdk-python/commit/a4fbecf6a2b002c8807da2336a75ddef7864f47c))
+
## 0.117.0 (2026-07-16)
Full Changelog:
[v0.116.0...v0.117.0](https://github.com/anthropics/anthropic-sdk-python/compare/v0.116.0...v0.117.0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/anthropic-0.117.0/PKG-INFO
new/anthropic-0.117.1/PKG-INFO
--- old/anthropic-0.117.0/PKG-INFO 2020-02-02 01:00:00.000000000 +0100
+++ new/anthropic-0.117.1/PKG-INFO 2020-02-02 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.3
Name: anthropic
-Version: 0.117.0
+Version: 0.117.1
Summary: The official Python library for the anthropic API
Project-URL: Homepage, https://github.com/anthropics/anthropic-sdk-python
Project-URL: Repository, https://github.com/anthropics/anthropic-sdk-python
@@ -32,7 +32,7 @@
Requires-Dist: typing-extensions<5,>=4.14
Provides-Extra: aiohttp
Requires-Dist: aiohttp; extra == 'aiohttp'
-Requires-Dist: httpx-aiohttp>=0.1.9; extra == 'aiohttp'
+Requires-Dist: httpx-aiohttp<1,>=0.1.9; extra == 'aiohttp'
Provides-Extra: aws
Requires-Dist: boto3>=1.28.57; extra == 'aws'
Requires-Dist: botocore>=1.31.57; extra == 'aws'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/anthropic-0.117.0/pyproject.toml
new/anthropic-0.117.1/pyproject.toml
--- old/anthropic-0.117.0/pyproject.toml 2020-02-02 01:00:00.000000000
+0100
+++ new/anthropic-0.117.1/pyproject.toml 2020-02-02 01:00:00.000000000
+0100
@@ -1,6 +1,6 @@
[project]
name = "anthropic"
-version = "0.117.0"
+version = "0.117.1"
description = "The official Python library for the anthropic API"
dynamic = ["readme"]
license = "MIT"
@@ -39,7 +39,7 @@
]
[project.optional-dependencies]
-aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"]
+aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9, <1"]
vertex = ["google-auth[requests] >=2, <3"]
google_cloud = ["google-auth[requests] >=2, <3"]
aws = ["boto3 >= 1.28.57", "botocore >= 1.31.57"]
@@ -85,7 +85,7 @@
"pytest-xdist>=3.6.1",
"inline-snapshot>=0.28.0",
"griffe>=1",
- "http-snapshot[httpx]==0.1.8",
+ "http-snapshot[httpx]==0.1.9",
]
pydantic-v1 = [
"pydantic>=1.9.0,<2",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/anthropic-0.117.0/requirements-dev.lock
new/anthropic-0.117.1/requirements-dev.lock
--- old/anthropic-0.117.0/requirements-dev.lock 2020-02-02 01:00:00.000000000
+0100
+++ new/anthropic-0.117.1/requirements-dev.lock 2020-02-02 01:00:00.000000000
+0100
@@ -46,7 +46,7 @@
# griffecli
h11==0.16.0
# via httpcore
-http-snapshot==0.1.8
+http-snapshot==0.1.9
httpcore==1.0.9
# via httpx
httpx==0.28.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/anthropic-0.117.0/src/anthropic/_version.py
new/anthropic-0.117.1/src/anthropic/_version.py
--- old/anthropic-0.117.0/src/anthropic/_version.py 2020-02-02
01:00:00.000000000 +0100
+++ new/anthropic-0.117.1/src/anthropic/_version.py 2020-02-02
01:00:00.000000000 +0100
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for
details.
__title__ = "anthropic"
-__version__ = "0.117.0" # x-release-please-version
+__version__ = "0.117.1" # x-release-please-version
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/anthropic-0.117.0/src/anthropic/lib/aws/_client.py
new/anthropic-0.117.1/src/anthropic/lib/aws/_client.py
--- old/anthropic-0.117.0/src/anthropic/lib/aws/_client.py 2020-02-02
01:00:00.000000000 +0100
+++ new/anthropic-0.117.1/src/anthropic/lib/aws/_client.py 2020-02-02
01:00:00.000000000 +0100
@@ -18,6 +18,7 @@
from ..._exceptions import AnthropicError
from ..._middleware import MiddlewareInput
from ..._base_client import DEFAULT_MAX_RETRIES
+from ..credentials._types import AccessTokenProvider
class AnthropicAWS(Anthropic):
@@ -164,7 +165,7 @@
request.headers.update(headers)
@override
- def copy( # type: ignore[override] # pyright:
ignore[reportIncompatibleMethodOverride] — subclass intentionally drops
`credentials`
+ def copy( # type: ignore[override] # pyright:
ignore[reportIncompatibleMethodOverride] — narrows `credentials` to None-only
self,
*,
api_key: str | None = None,
@@ -176,6 +177,7 @@
workspace_id: str | None = None,
skip_auth: bool | None = None,
auth_token: str | None = None,
+ credentials: AccessTokenProvider | None = None,
webhook_key: str | None = None,
base_url: str | httpx.URL | None = None,
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
@@ -188,6 +190,14 @@
middleware: Sequence[MiddlewareInput] | None | NotGiven = NOT_GIVEN,
_extra_kwargs: Mapping[str, Any] = {},
) -> Self:
+ # The AWS client authenticates with SigV4 (or an API key), not a token
+ # provider, so it has no `credentials`. Accept the argument for
signature
+ # compatibility with the base client — internal helpers such as
+ # `_copy_client_with_bearer_auth` call `copy(credentials=None, ...)` —
but
+ # only as a no-op; reject a real provider rather than silently
ignoring it.
+ if credentials is not None:
+ raise TypeError("AnthropicAWS does not support a `credentials`
provider (it authenticates with AWS SigV4).")
+
# If region is changing and no explicit base_url, let __init__ derive
it
resolved_base_url = base_url or (None if aws_region else self.base_url)
@@ -363,7 +373,7 @@
request.headers.update(headers)
@override
- def copy( # type: ignore[override] # pyright:
ignore[reportIncompatibleMethodOverride] — subclass intentionally drops
`credentials`
+ def copy( # type: ignore[override] # pyright:
ignore[reportIncompatibleMethodOverride] — narrows `credentials` to None-only
self,
*,
api_key: str | None = None,
@@ -375,6 +385,7 @@
workspace_id: str | None = None,
skip_auth: bool | None = None,
auth_token: str | None = None,
+ credentials: AccessTokenProvider | None = None,
webhook_key: str | None = None,
base_url: str | httpx.URL | None = None,
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
@@ -387,6 +398,14 @@
middleware: Sequence[MiddlewareInput] | None | NotGiven = NOT_GIVEN,
_extra_kwargs: Mapping[str, Any] = {},
) -> Self:
+ # The AWS client authenticates with SigV4 (or an API key), not a token
+ # provider, so it has no `credentials`. Accept the argument for
signature
+ # compatibility with the base client — internal helpers such as
+ # `_copy_client_with_bearer_auth` call `copy(credentials=None, ...)` —
but
+ # only as a no-op; reject a real provider rather than silently
ignoring it.
+ if credentials is not None:
+ raise TypeError("AnthropicAWS does not support a `credentials`
provider (it authenticates with AWS SigV4).")
+
# If region is changing and no explicit base_url, let __init__ derive
it
resolved_base_url = base_url or (None if aws_region else self.base_url)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/anthropic-0.117.0/src/anthropic/types/beta/beta_fallback_refusal_trigger.py
new/anthropic-0.117.1/src/anthropic/types/beta/beta_fallback_refusal_trigger.py
---
old/anthropic-0.117.0/src/anthropic/types/beta/beta_fallback_refusal_trigger.py
2020-02-02 01:00:00.000000000 +0100
+++
new/anthropic-0.117.1/src/anthropic/types/beta/beta_fallback_refusal_trigger.py
2020-02-02 01:00:00.000000000 +0100
@@ -11,7 +11,23 @@
class BetaFallbackRefusalTrigger(BaseModel):
"""The `from` model declined for policy reasons."""
- category: Optional[Literal["cyber", "bio", "frontier_llm",
"reasoning_extraction"]] = None
- """The policy category that triggered a refusal."""
+ category: Optional[Literal["cyber", "bio", "frontier_llm",
"reasoning_extraction", "general_harms"]] = None
+ """The policy category that triggered a refusal.
+
+ - `cyber` - The request could enable cyber harm, such as malware or exploit
+ development. Benign cybersecurity work can also trigger this category.
+ - `bio` - The request could enable biological harm, such as dangerous lab
+ methods. Beneficial life sciences work can also trigger this category.
+ - `frontier_llm` - The request could assist the development of competing AI
+ models, which is restricted under
+ [Anthropic's commercial
terms](https://www.anthropic.com/legal/commercial-terms).
+ Benign machine learning work can also trigger this category.
+ - `reasoning_extraction` - The request asks the model to reproduce its
internal
+ reasoning in the response text. To get reasoning in a structured form
instead,
+ use
+ [adaptive
thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking).
+ - `general_harms` - The request could be related to an area that was
determined
+ as harmful. Benign work might sometimes trigger this category.
+ """
type: Literal["refusal"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/anthropic-0.117.0/src/anthropic/types/beta/beta_refusal_stop_details.py
new/anthropic-0.117.1/src/anthropic/types/beta/beta_refusal_stop_details.py
--- old/anthropic-0.117.0/src/anthropic/types/beta/beta_refusal_stop_details.py
2020-02-02 01:00:00.000000000 +0100
+++ new/anthropic-0.117.1/src/anthropic/types/beta/beta_refusal_stop_details.py
2020-02-02 01:00:00.000000000 +0100
@@ -11,8 +11,24 @@
class BetaRefusalStopDetails(BaseModel):
"""Structured information about a refusal."""
- category: Optional[Literal["cyber", "bio", "frontier_llm",
"reasoning_extraction"]] = None
- """The policy category that triggered a refusal."""
+ category: Optional[Literal["cyber", "bio", "frontier_llm",
"reasoning_extraction", "general_harms"]] = None
+ """The policy category that triggered a refusal.
+
+ - `cyber` - The request could enable cyber harm, such as malware or exploit
+ development. Benign cybersecurity work can also trigger this category.
+ - `bio` - The request could enable biological harm, such as dangerous lab
+ methods. Beneficial life sciences work can also trigger this category.
+ - `frontier_llm` - The request could assist the development of competing AI
+ models, which is restricted under
+ [Anthropic's commercial
terms](https://www.anthropic.com/legal/commercial-terms).
+ Benign machine learning work can also trigger this category.
+ - `reasoning_extraction` - The request asks the model to reproduce its
internal
+ reasoning in the response text. To get reasoning in a structured form
instead,
+ use
+ [adaptive
thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking).
+ - `general_harms` - The request could be related to an area that was
determined
+ as harmful. Benign work might sometimes trigger this category.
+ """
explanation: Optional[str] = None
"""Human-readable explanation of the refusal.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/anthropic-0.117.0/src/anthropic/types/beta/sessions/beta_managed_agents_session_retries_exhausted.py
new/anthropic-0.117.1/src/anthropic/types/beta/sessions/beta_managed_agents_session_retries_exhausted.py
---
old/anthropic-0.117.0/src/anthropic/types/beta/sessions/beta_managed_agents_session_retries_exhausted.py
2020-02-02 01:00:00.000000000 +0100
+++
new/anthropic-0.117.1/src/anthropic/types/beta/sessions/beta_managed_agents_session_retries_exhausted.py
2020-02-02 01:00:00.000000000 +0100
@@ -9,7 +9,7 @@
class BetaManagedAgentsSessionRetriesExhausted(BaseModel):
"""
- The turn ended because the retry budget was exhausted (`max_iterations`
hit or an error escalated to `retry_status: 'exhausted'`).
+ The turn ended because repeated errors exhausted the retry budget or an
error escalated to `retry_status: 'exhausted'`.
"""
type: Literal["retries_exhausted"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/anthropic-0.117.0/src/anthropic/types/refusal_stop_details.py
new/anthropic-0.117.1/src/anthropic/types/refusal_stop_details.py
--- old/anthropic-0.117.0/src/anthropic/types/refusal_stop_details.py
2020-02-02 01:00:00.000000000 +0100
+++ new/anthropic-0.117.1/src/anthropic/types/refusal_stop_details.py
2020-02-02 01:00:00.000000000 +0100
@@ -11,8 +11,24 @@
class RefusalStopDetails(BaseModel):
"""Structured information about a refusal."""
- category: Optional[Literal["cyber", "bio", "frontier_llm",
"reasoning_extraction"]] = None
- """The policy category that triggered a refusal."""
+ category: Optional[Literal["cyber", "bio", "frontier_llm",
"reasoning_extraction", "general_harms"]] = None
+ """The policy category that triggered a refusal.
+
+ - `cyber` - The request could enable cyber harm, such as malware or exploit
+ development. Benign cybersecurity work can also trigger this category.
+ - `bio` - The request could enable biological harm, such as dangerous lab
+ methods. Beneficial life sciences work can also trigger this category.
+ - `frontier_llm` - The request could assist the development of competing AI
+ models, which is restricted under
+ [Anthropic's commercial
terms](https://www.anthropic.com/legal/commercial-terms).
+ Benign machine learning work can also trigger this category.
+ - `reasoning_extraction` - The request asks the model to reproduce its
internal
+ reasoning in the response text. To get reasoning in a structured form
instead,
+ use
+ [adaptive
thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking).
+ - `general_harms` - The request could be related to an area that was
determined
+ as harmful. Benign work might sometimes trigger this category.
+ """
explanation: Optional[str] = None
"""Human-readable explanation of the refusal.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/anthropic-0.117.0/tests/api_resources/beta/test_webhooks.py
new/anthropic-0.117.1/tests/api_resources/beta/test_webhooks.py
--- old/anthropic-0.117.0/tests/api_resources/beta/test_webhooks.py
2020-02-02 01:00:00.000000000 +0100
+++ new/anthropic-0.117.1/tests/api_resources/beta/test_webhooks.py
2020-02-02 01:00:00.000000000 +0100
@@ -31,7 +31,7 @@
client = client.with_options(webhook_key=client_opt)
- data =
"""{"id":"wevt_011CZkZYZd9rLmz3ujAcsqEw","created_at":"2026-03-15T10:00:00Z","data":{"id":"sesn_011CZkZAtmR3yMPDzynEDxu7","organization_id":"org_011CZkZZAe0sMna4vkBdtrfx","type":"session.status_idled","workspace_id":"wrkspc_011CZkZaBF1tNoB5wlCeusgy"},"type":"event"}"""
+ data =
"""{"id":"whe_0f1e2d3c4b5a69788796a5b4c3d2e1f0","created_at":"2026-03-15T10:00:00Z","data":{"id":"sesn_011CZkZAtmR3yMPDzynEDxu7","organization_id":"org_011CZkZZAe0sMna4vkBdtrfx","type":"session.status_idled","workspace_id":"wrkspc_011CZkZaBF1tNoB5wlCeusgy"},"type":"event"}"""
msg_id = "1"
timestamp = datetime.now(tz=timezone.utc)
sig = hook.sign(msg_id=msg_id, timestamp=timestamp, data=data)
@@ -78,7 +78,7 @@
async_client = async_client.with_options(webhook_key=client_opt)
- data =
"""{"id":"wevt_011CZkZYZd9rLmz3ujAcsqEw","created_at":"2026-03-15T10:00:00Z","data":{"id":"sesn_011CZkZAtmR3yMPDzynEDxu7","organization_id":"org_011CZkZZAe0sMna4vkBdtrfx","type":"session.status_idled","workspace_id":"wrkspc_011CZkZaBF1tNoB5wlCeusgy"},"type":"event"}"""
+ data =
"""{"id":"whe_0f1e2d3c4b5a69788796a5b4c3d2e1f0","created_at":"2026-03-15T10:00:00Z","data":{"id":"sesn_011CZkZAtmR3yMPDzynEDxu7","organization_id":"org_011CZkZZAe0sMna4vkBdtrfx","type":"session.status_idled","workspace_id":"wrkspc_011CZkZaBF1tNoB5wlCeusgy"},"type":"event"}"""
msg_id = "1"
timestamp = datetime.now(tz=timezone.utc)
sig = hook.sign(msg_id=msg_id, timestamp=timestamp, data=data)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/anthropic-0.117.0/tests/lib/test_aws.py
new/anthropic-0.117.1/tests/lib/test_aws.py
--- old/anthropic-0.117.0/tests/lib/test_aws.py 2020-02-02 01:00:00.000000000
+0100
+++ new/anthropic-0.117.1/tests/lib/test_aws.py 2020-02-02 01:00:00.000000000
+0100
@@ -8,6 +8,7 @@
from anthropic import AnthropicAWS, AsyncAnthropicAWS
from anthropic._exceptions import AnthropicError
+from anthropic.lib.credentials import StaticToken
class MockRequestCall(Protocol):
@@ -370,3 +371,87 @@
base_url="https://aws-external-anthropic.eu-west-1.api.aws",
)
assert str(copied2.base_url).rstrip("/") ==
"https://aws-external-anthropic.eu-west-1.api.aws"
+
+
+def test_copy_accepts_credentials_none_noop() -> None:
+ # `credentials=None` is accepted as a no-op: the AWS client authenticates
with
+ # SigV4, not a token provider, so there is nothing to clear. The copy
stays SigV4.
+ client = AnthropicAWS(
+ aws_access_key="AKID",
+ aws_secret_key="secret",
+ aws_region="us-east-1",
+ workspace_id="ws-123",
+ )
+ copied = client.copy(credentials=None)
+ assert copied._use_sigv4 is True
+ assert copied.workspace_id == "ws-123"
+ assert copied.aws_region == "us-east-1"
+
+
+def test_copy_accepts_credentials_none_noop_async() -> None:
+ client = AsyncAnthropicAWS(
+ aws_access_key="AKID",
+ aws_secret_key="secret",
+ aws_region="us-east-1",
+ workspace_id="ws-123",
+ )
+ copied = client.copy(credentials=None)
+ assert copied._use_sigv4 is True
+ assert copied.workspace_id == "ws-123"
+ assert copied.aws_region == "us-east-1"
+
+
+def test_copy_rejects_real_credentials_provider() -> None:
+ client = AnthropicAWS(
+ aws_access_key="AKID",
+ aws_secret_key="secret",
+ aws_region="us-east-1",
+ workspace_id="ws-123",
+ )
+ with pytest.raises(TypeError, match="does not support a `credentials`
provider"):
+ client.copy(credentials=StaticToken("token"))
+
+
+def test_copy_rejects_real_credentials_provider_async() -> None:
+ client = AsyncAnthropicAWS(
+ aws_access_key="AKID",
+ aws_secret_key="secret",
+ aws_region="us-east-1",
+ workspace_id="ws-123",
+ )
+ with pytest.raises(TypeError, match="does not support a `credentials`
provider"):
+ client.copy(credentials=StaticToken("token"))
+
+
+def test_scoped_bearer_client_helper_on_aws() -> None:
+ # Regression: the environment poller / worker / session-tool-runner build a
+ # scoped sub-client via `_copy_client_with_bearer_auth`, which calls
+ # `client.copy(credentials=None, ...)`. That must work on the AWS client
and
+ # yield a client that still signs with SigV4 (the bearer token is unused).
+ from anthropic.lib._scoped_client import _copy_client_with_bearer_auth
+
+ client = AnthropicAWS(
+ aws_access_key="AKID",
+ aws_secret_key="secret",
+ aws_region="us-east-1",
+ workspace_id="ws-123",
+ )
+ scoped = _copy_client_with_bearer_auth(client,
auth_token="unused-under-sigv4", helper="environments-work-poller")
+ assert isinstance(scoped, AnthropicAWS)
+ assert scoped._use_sigv4 is True
+ assert scoped.workspace_id == "ws-123"
+
+
+def test_scoped_bearer_client_helper_on_aws_async() -> None:
+ from anthropic.lib._scoped_client import _copy_client_with_bearer_auth
+
+ client = AsyncAnthropicAWS(
+ aws_access_key="AKID",
+ aws_secret_key="secret",
+ aws_region="us-east-1",
+ workspace_id="ws-123",
+ )
+ scoped = _copy_client_with_bearer_auth(client,
auth_token="unused-under-sigv4", helper="environments-worker")
+ assert isinstance(scoped, AsyncAnthropicAWS)
+ assert scoped._use_sigv4 is True
+ assert scoped.workspace_id == "ws-123"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/anthropic-0.117.0/uv.lock
new/anthropic-0.117.1/uv.lock
--- old/anthropic-0.117.0/uv.lock 2020-02-02 01:00:00.000000000 +0100
+++ new/anthropic-0.117.1/uv.lock 2020-02-02 01:00:00.000000000 +0100
@@ -194,7 +194,7 @@
[[package]]
name = "anthropic"
-version = "0.102.0"
+version = "0.117.0"
source = { editable = "." }
dependencies = [
{ name = "anyio" },
@@ -221,6 +221,9 @@
{ name = "boto3" },
{ name = "botocore" },
]
+google-cloud = [
+ { name = "google-auth", extra = ["requests"] },
+]
mcp = [
{ name = "mcp", marker = "python_full_version >= '3.10'" },
]
@@ -270,9 +273,10 @@
{ name = "botocore", marker = "extra == 'bedrock'", specifier =
">=1.31.57" },
{ name = "distro", specifier = ">=1.7.0,<2" },
{ name = "docstring-parser", specifier = ">=0.15,<1" },
+ { name = "google-auth", extras = ["requests"], marker = "extra ==
'google-cloud'", specifier = ">=2,<3" },
{ name = "google-auth", extras = ["requests"], marker = "extra ==
'vertex'", specifier = ">=2,<3" },
{ name = "httpx", specifier = ">=0.25.0,<1" },
- { name = "httpx-aiohttp", marker = "extra == 'aiohttp'", specifier =
">=0.1.9" },
+ { name = "httpx-aiohttp", marker = "extra == 'aiohttp'", specifier =
">=0.1.9,<1" },
{ name = "jiter", specifier = ">=0.4.0,<1" },
{ name = "mcp", marker = "python_full_version >= '3.10' and extra ==
'mcp'", specifier = ">=1.0" },
{ name = "pydantic", specifier = ">=1.9.0,<3" },
@@ -280,14 +284,14 @@
{ name = "standardwebhooks", marker = "extra == 'webhooks'", specifier =
">=1.0.1,<2" },
{ name = "typing-extensions", specifier = ">=4.14,<5" },
]
-provides-extras = ["aiohttp", "vertex", "aws", "bedrock", "mcp", "webhooks"]
+provides-extras = ["aiohttp", "vertex", "google-cloud", "aws", "bedrock",
"mcp", "webhooks"]
[package.metadata.requires-dev]
dev = [
{ name = "boto3-stubs", specifier = ">=1" },
{ name = "dirty-equals", specifier = ">=0.6.0" },
{ name = "griffe", specifier = ">=1" },
- { name = "http-snapshot", extras = ["httpx"], specifier = "==0.1.8" },
+ { name = "http-snapshot", extras = ["httpx"], specifier = "==0.1.9" },
{ name = "importlib-metadata", specifier = ">=6.7.0" },
{ name = "inline-snapshot", specifier = ">=0.28.0" },
{ name = "mypy", specifier = "==1.17" },
@@ -1011,14 +1015,14 @@
[[package]]
name = "http-snapshot"
-version = "0.1.8"
+version = "0.1.9"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "inline-snapshot" },
]
-sdist = { url =
"https://files.pythonhosted.org/packages/37/a4/bd9cea69146855b47aefec010f36b99741208e5f2dcbf522e44f0f66ce2a/http_snapshot-0.1.8.tar.gz",
hash =
"sha256:1f0dc437fea4e13179f26290216bb402096a44f3b29969022a78c2e71fddfc28", size
= 12988, upload-time = "2026-02-19T18:19:46.727Z" }
+sdist = { url =
"https://files.pythonhosted.org/packages/30/6d/10494f06ba67f9d74f98b25f9db3ae339969b6049e30144d7f161a1b33ac/http_snapshot-0.1.9.tar.gz",
hash =
"sha256:22e6a1f0ff2836e14c33724213422d6351fe9513aafbbc5e0608cad9a2c5363c", size
= 11155, upload-time = "2026-02-24T21:11:28.89Z" }
wheels = [
- { url =
"https://files.pythonhosted.org/packages/26/19/7b2a6ccded7bf19a23c5512f08a6042d5900b3d9d9b88708baf08f9abd80/http_snapshot-0.1.8-py3-none-any.whl",
hash =
"sha256:5d10e9cad9fe26fda8d1ebcd2adb66589dd3fd0fd58e7960c61c08c483d31457", size
= 14058, upload-time = "2026-02-19T18:19:45.225Z" },
+ { url =
"https://files.pythonhosted.org/packages/8a/be/2a84ec7f2ac134e7628235768f488f157918f484a9254fa7fa3348d4afbf/http_snapshot-0.1.9-py3-none-any.whl",
hash =
"sha256:62df93b7c429bd8d836e4dad48b36c473ca88d13652985267a01de9ec4c865c3", size
= 12730, upload-time = "2026-02-24T21:11:27.059Z" },
]
[package.optional-dependencies]