shahar1 opened a new pull request, #74164: URL: https://github.com/apache/airflow/pull/74164
related: #74151 <details><summary>AI Summary</summary> `CloudComposerAsyncHook.make_composer_airflow_api_request` passed its `timeout: float | None` straight to `aiohttp.ClientSession.request`. aiohttp only types the request keyword arguments when type-checking on Python 3.11+ (`if sys.version_info >= (3, 11) and TYPE_CHECKING: ... **kwargs: Unpack[_RequestOptions]`), where `timeout` is `ClientTimeout | _SENTINEL | None`. On 3.10 the kwargs are `Any`, so the mismatch went unnoticed until #74151 moved CI (and mypy) to Python 3.11: ``` providers/google/src/airflow/providers/google/cloud/hooks/cloud_composer.py:613: error: Argument "timeout" to "request" of "ClientSession" has incompatible type "float | None"; expected "ClientTimeout | _SENTINEL | None" [arg-type] ``` The fix wraps the value in `ClientTimeout(total=timeout)`. This is exactly what aiohttp already does at runtime for a non-`ClientTimeout` value (`real_timeout = ClientTimeout(total=timeout)`), so behaviour is unchanged, including `None` meaning no total timeout. A unit test for the async request method (which had none) asserts the `ClientTimeout` that reaches `session.request` for both a float and `None`; it fails without the change. </details> --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 5.5) Generated-by: Claude Code (Opus 5.5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
