Fix aiohttp deprecation warnings (#13240)

* Fix aiohttp deprecation warnings

* Fix Ring deprecation warning

* Lint
This commit is contained in:
Paulus Schoutsen 2018-03-15 13:49:49 -07:00 committed by Pascal Vizeli
parent a86bf81768
commit 89a19c89a7
45 changed files with 221 additions and 225 deletions

View file

@ -82,7 +82,8 @@ class AiohttpClientMocker:
def create_session(self, loop):
"""Create a ClientSession that is bound to this mocker."""
session = ClientSession(loop=loop)
session._request = self.match_request
# Setting directly on `session` will raise deprecation warning
object.__setattr__(session, '_request', self.match_request)
return session
async def match_request(self, method, url, *, data=None, auth=None,