You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(google-auth): fix aiohttp 3.10+ test compatibility (googleapis#17643)
1. **Unpinned `aiohttp` in `setup.py`**:
- Removed `"aiohttp < 3.10.0"` from `testing_extra_require` and resolved
TODO comment for googleapis#1722.
2. **Added Shared `_get_local_addr` Helper**:
- Added `_get_local_addr` in `google.auth.aio._helpers` to extract local
address from `TCPConnector._local_addr` (on `aiohttp < 3.10`) or
`TCPConnector._local_addr_infos` (on `aiohttp >= 3.10`).
- Updated `google.auth.aio.transport.aiohttp` and
`google.auth.transport._aiohttp_requests` to reuse this helper when
cloning sessions.
3. **`_CompatClientResponse` Test Adapter in `conftest.py`**:
- Registered a `_CompatClientResponse` class in
`tests/transport/aio/conftest.py` and
`tests_async/transport/conftest.py` that inspects
`ClientResponse.__init__` and safely maps `writer` $\rightarrow$
`stream_writer` for `aioresponses` on `aiohttp` 3.10+.
4. **Updated Test Mocks**:
- Refactored private `_auto_decompress` $\rightarrow$ public
`auto_decompress` property in
`tests_async/transport/test_aiohttp_requests.py` for `aiohttp` 3.10+
compatibility.
Fixesgoogleapis#1722🦕
0 commit comments