jason810496 opened a new pull request, #72088: URL: https://github.com/apache/airflow/pull/72088
I encountered the CI failure in non-related PR (https://github.com/apache/airflow/actions/runs/32921443404/job/98038017920?pr=71843) ## Why `prek --stage manual mypy-providers --all-files` fails because `anthropic` 1.0.0 switched its HTTP transport dependency from `httpx` to a new, separate PyPI package named `httpx2`, so `BadRequestError`'s `response` parameter is now typed `httpx2.Response` instead of `httpx.Response`. ## What - In `test_anthropic.py`'s `_make_bad_request` helper, added a scoped `# type: ignore[arg-type]` (with a comment) on the `BadRequestError(...)` call instead of importing `httpx2`. `BadRequestError` only ever duck-types the response object (`status_code`, `headers.get`, `.request`), so a plain `httpx.Response` still works at runtime. This avoids adding a hard dependency on `httpx2`, which doesn't exist under the provider's still-supported lower bound (`anthropic>=0.121.0`, which depends on `httpx`) and would otherwise break test collection under CI's lowest-direct-dependency job for providers. --- ##### Was generative AI tooling used to co-author this PR? - [x] Yes, with help of Claude Code Sonnet 5 following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
