Skip to content

fix(client): propagate Celery cancellation signals - #2020

Open
nightcityblade wants to merge 1 commit into
anthropics:mainfrom
nightcityblade:fix/issue-2018
Open

nightcityblade wants to merge 1 commit into
anthropics:mainfrom
nightcityblade:fix/issue-2018

Conversation

@nightcityblade

Copy link
Copy Markdown

Fixes #2018

Summary

  • recognize Celery task-limit exceptions from billiard.exceptions before transport errors are wrapped
  • preserve SoftTimeLimitExceeded, TimeLimitExceeded, and Terminated so callers can handle cancellation immediately
  • cover both sync and async clients and verify only one request attempt occurs

Tests

  • uv run pytest tests/test_client.py -n auto (199 passed, 2 skipped)
  • uv run ruff check src/anthropic/_base_client.py tests/test_client.py
  • uv run ruff format --check src/anthropic/_base_client.py tests/test_client.py
  • uv run pyright src/anthropic/_base_client.py tests/test_client.py

@nightcityblade
nightcityblade requested a review from a team as a code owner October 12, 2026 15:18

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant