Closed Bug 1447800 Opened 7 years ago Closed 7 years ago

upgrade to aiohttp 3.1.0

Categories

(Release Engineering Graveyard :: Applications: Balrog (backend), enhancement, P1)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bhearsum, Assigned: bhearsum)

References

Details

pyup submitted a pull request for this (https://github.com/mozilla/balrog/pull/513), and it caused a bunch of test failures like: ___________________________ TestBalrogClient.testGET ___________________________ self = <balrogagent.test.test_client.TestBalrogClient testMethod=testGET> async def testGET(self): mocked_resp = { "count": 2, "scheduled_changes": [ { "sc_id": 1, "when": 123456789, }, { "sc_id": 2, "telemetry_product": "Firefox", "telemetry_channel": "release", "telemetry_uptake": 3000, }, ], } with asynctest.patch("aiohttp.request", fake_request(mocked_resp, 200)) as r: > resp = await client.request("http://balrog.fake", "/api/scheduled_changes") balrogagent/test/test_client.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ balrogagent/client.py:32: in request resp = await aiohttp.request(method, url, data=json.dumps(data), headers=headers, auth=auth, loop=loop) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <balrogagent.test.test_client.fake_request object at 0x7f853ef75748> method = 'GET', url = 'http://balrog.fake/api/scheduled_changes', data = '{}' kwargs = {'auth': None, 'headers': {'Accept': 'application/json', 'Accept-Encoding': 'application/json', 'Content-Type': 'application/json'}, 'loop': None} async def __call__(self, method, url, data={}, **kwargs): if url.endswith("csrf_token"): self.csrf_resp = aiohttp.client.ClientResponse("HEAD", URL("http://balrog.fake/api/csrf_token")) self.csrf_resp.headers = {"X-CSRF-Token": "foo"} self.csrf_resp.status = 200 return self.csrf_resp else: self.request_data = data > resp = aiohttp.client.ClientResponse(method, URL(url)) E TypeError: __init__() missing 8 required keyword-only arguments: 'writer', 'continue100', 'timer', 'request_info', 'auto_decompress', 'traces', 'loop', and 'session' balrogagent/test/test_client.py:24: TypeError It looks like we're calling ClientResponse wrong in some tests.
Assignee: nobody → bhearsum
Depends on: 1461956
Now in production, and working fine.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Product: Release Engineering → Release Engineering Graveyard
You need to log in before you can comment on or make changes to this bug.