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
FAILED test_opensearchpy/test_async/test_http_connection.py::TestAsyncHttpConnection::test_basicauth_in_request_session - TypeError: 'coroutine' object is not iterable
FAILED test_opensearchpy/test_async/test_http_connection.py::TestAsyncHttpConnection::test_callable_in_request_session - TypeError: 'coroutine' object is not iterable
The code does response.headers.getall("warning", ()) and before it ended up being the default () and now it's an <coroutine object AsyncMockMixin._execute_mock_call at 0x108757680>.
$ python -m pip show yarlName: yarlVersion: 1.9.2Summary: Yet another URL libraryHome-page: https://github.com/aio-libs/yarl/Author: Andrew SvetlovAuthor-email: [email protected]License: Apache-2.0Location: /Users/dblock/.pyenv/versions/3.11.1/lib/python3.11/site-packagesRequires: idna, multidictRequired-by: aiohttp
OS
MacOS
Related component
Client
Additional context
I apologize for a pretty high level bug report, but hopefully someone who works on this project can easily spot what has changed in 3.10.6 to cause this.
Code of Conduct
I agree to follow the aio-libs Code of Conduct
The text was updated successfully, but these errors were encountered:
If you're using async with then the subtle change is that it now returns await self._resp.__aenter__(). If I'm reading correctly, you've just made the resp a Mock, so that method will just return another mock. A real response would return itself.
Describe the bug
Coming from opensearch-project/opensearch-py#828 in which 2 tests started failing when upgrading from 3.10.5 to 3.10.6 that wasn't expected.
The code does
response.headers.getall("warning", ())
and before it ended up being the default()
and now it's an<coroutine object AsyncMockMixin._execute_mock_call at 0x108757680>
.The mock setup is fairly straightforward.
I tried isolating the change to a smaller repro but couldn't figure it out.
To Reproduce
docker run -d -p 9200:9200 -p 9600:9600 -e OPENSEARCH_INITIAL_ADMIN_PASSWORD=myStrongPassword123! -e "discovery.type=single-node" opensearchproject/opensearch:latest
aiohttp==3.10.6
.nox -rs test-3.10
If you use 3.10.5 tests will pass.
Expected behavior
No change between .5 and .6.
Logs/tracebacks
Python Version
aiohttp Version
multidict Version
yarl Version
OS
MacOS
Related component
Client
Additional context
I apologize for a pretty high level bug report, but hopefully someone who works on this project can easily spot what has changed in 3.10.6 to cause this.
Code of Conduct
The text was updated successfully, but these errors were encountered: