mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-09 09:13:23 +00:00
Drop support to asyncio.coroutine (py34 async/await syntax)
This commit is contained in:
@@ -25,21 +25,16 @@ class MockClientResponse(ClientResponse):
|
||||
session=None,
|
||||
)
|
||||
|
||||
# TODO: get encoding from header
|
||||
@asyncio.coroutine
|
||||
def json(self, *, encoding='utf-8', loads=json.loads, **kwargs): # NOQA: E999
|
||||
async def json(self, *, encoding='utf-8', loads=json.loads, **kwargs): # NOQA: E999
|
||||
return loads(self._body.decode(encoding))
|
||||
|
||||
@asyncio.coroutine
|
||||
def text(self, encoding='utf-8'):
|
||||
async def text(self, encoding='utf-8'):
|
||||
return self._body.decode(encoding)
|
||||
|
||||
@asyncio.coroutine
|
||||
def read(self):
|
||||
async def read(self):
|
||||
return self._body
|
||||
|
||||
@asyncio.coroutine
|
||||
def release(self):
|
||||
async def release(self):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user