- Notifications
You must be signed in to change notification settings - Fork 343
Closed
Labels
type: processA process-related concern. May include testing, release, or the like.A process-related concern. May include testing, release, or the like.
Description
Environment details
-
OS: $ sw_vers
ProductName: Mac OS X
ProductVersion: 10.14.6
BuildVersion: 18G6020 -
Python version: 3.6, 3.7, 3.8
-
pip version: pip 20.2.4
-
google-authversion: 5906c85
Steps to reproduce
- nox -s unit
There are 9 tests that fail, all with the same error:
TypeError: __init__() missing 1 required positional argument: 'limit'
====================================================== short test summary info ======================================================= FAILED tests_async/transport/test_aiohttp_requests.py::TestCombinedResponse::test_content_compressed - TypeError: __init__() missin... FAILED tests_async/transport/test_aiohttp_requests.py::TestResponse::test_headers_prop - TypeError: __init__() missing 1 required p... FAILED tests_async/transport/test_aiohttp_requests.py::TestResponse::test_status_prop - TypeError: __init__() missing 1 required po... FAILED tests_async/transport/test_aiohttp_requests.py::TestAuthorizedSession::test_request - TypeError: __init__() missing 1 requir... FAILED tests_async/transport/test_aiohttp_requests.py::TestAuthorizedSession::test_ctx - TypeError: __init__() missing 1 required p... FAILED tests_async/transport/test_aiohttp_requests.py::TestAuthorizedSession::test_http_headers - TypeError: __init__() missing 1 r... FAILED tests_async/transport/test_aiohttp_requests.py::TestAuthorizedSession::test_regexp_example - TypeError: __init__() missing 1... FAILED tests_async/transport/test_aiohttp_requests.py::TestAuthorizedSession::test_request_no_refresh - TypeError: __init__() missi... FAILED tests_async/transport/test_aiohttp_requests.py::TestAuthorizedSession::test_request_refresh - TypeError: __init__() missing ... ============================================ 9 failed, 609 passed, 12 warnings in 33.41s ============================================= Here is the traceback for one of the failing tests:
____________________________________________ TestCombinedResponse.test_content_compressed ____________________________________________ self = <tests_async.transport.test_aiohttp_requests.TestCombinedResponse object at 0x108803160> urllib3_mock = <function decompress at 0x10880a820> @mock.patch( "google.auth.transport._aiohttp_requests.urllib3.response.MultiDecoder.decompress", return_value="decompressed", autospec=True, ) @pytest.mark.asyncio async def test_content_compressed(self, urllib3_mock): rm = core.RequestMatch( "url", headers={"Content-Encoding": "gzip"}, payload="compressed" ) > response = await rm.build_response(core.URL("url")) tests_async/transport/test_aiohttp_requests.py:72: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../../.virtualenv/google-auth-library-python/lib/python3.8/site-packages/aioresponses/core.py:192: in build_response resp = self._build_response( ../../../.virtualenv/google-auth-library-python/lib/python3.8/site-packages/aioresponses/core.py:173: in _build_response resp.content = stream_reader_factory(loop) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loop = <Mock id='4437587472'> def stream_reader_factory( # noqa loop: 'Optional[asyncio.AbstractEventLoop]' = None ): protocol = ResponseHandler(loop=loop) > return StreamReader(protocol, loop=loop) E TypeError: __init__() missing 1 required positional argument: 'limit' ../../../.virtualenv/google-auth-library-python/lib/python3.8/site-packages/aioresponses/compat.py:48: TypeError ========================================================== warnings summary ========================================================== The root cause is a change in aiohttp version 3.7.0 which was released a few hours ago. The signature for StreamReader has changed, making the optional argument limit a required argument.
This change breaks aioresponses:
Metadata
Metadata
Assignees
Labels
type: processA process-related concern. May include testing, release, or the like.A process-related concern. May include testing, release, or the like.