Skip to content

Commit

Permalink
leave stream open in response (#19711)
Browse files Browse the repository at this point in the history
* leave stream open in response

* update

* Get latest main (#19733)

* Credentials accept tenant_id argument to get_token (#19602)

* Update changelog for azure-identity 1.7.0b2 (#19693)

* [Key Vault] Drop 3.5 support for keys (#19712)

* [AutoRelease] t2-compute-2021-07-08-85328 (#19715)

* CodeGen from PR 14638 in Azure/azure-rest-api-specs
Move RestorePoint properties into new properties bag for restore point (#14638)

* version,CHANGELOG

* test

Co-authored-by: SDKAuto <[email protected]>
Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>

* debug_guide for python SDK (#19716)

* Increment package version after release of azure-servicebus (#19709)

* Increment package version after release of azure-identity (#19721)

* Prevent DeprecationWarning in Identity tests (#19723)

* move _utils.py (#19431)

* move _utils.py

* update

* [QnA] Initial SDK (#19544)

* Template + first code gen

* Basic client

* First tests

* Added async client + tests

* Added answerspan test

* Added authoring APIs

* Some updates

* Pure generated clients

* Test updates

* Update test imports

* Clean working recordings

* Renamed directory

* Removed authoring for now

* Use unreleased core

* Remove conversation + ci yaml

* Some CI updates

* update language __init__.py to not have a space in the name

* Setup.py

* Updated core dependency

* CI fixes

* Added language nspkg

* Fix Python 2.7

* Added some more tests

* Test fixes

* Added live configuration

* Bumped msrest

* readme + samples

* No pypi or refdocs yet

* Review feedback

Co-authored-by: scbedd <[email protected]>

* fix broken rest due to utils movement (#19728)

* handle details "null" (#19430)

* handle details "null"

* update

* Bump aiohttp from 3.5.4 to 3.7.4 in /common/smoketest (#19330)

Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.5.4 to 3.7.4.
- [Release notes](https://github.com/aio-libs/aiohttp/releases)
- [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst)
- [Commits](aio-libs/aiohttp@v3.5.4...v3.7.4)

---
updated-dependencies:
- dependency-name: aiohttp
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Co-authored-by: Charles Lowell <[email protected]>
Co-authored-by: McCoy Patiño <[email protected]>
Co-authored-by: Azure CLI Bot <[email protected]>
Co-authored-by: SDKAuto <[email protected]>
Co-authored-by: msyyc <[email protected]>
Co-authored-by: Azure SDK Bot <[email protected]>
Co-authored-by: annatisch <[email protected]>
Co-authored-by: scbedd <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Co-authored-by: Charles Lowell <[email protected]>
Co-authored-by: McCoy Patiño <[email protected]>
Co-authored-by: Azure CLI Bot <[email protected]>
Co-authored-by: SDKAuto <[email protected]>
Co-authored-by: msyyc <[email protected]>
Co-authored-by: Azure SDK Bot <[email protected]>
Co-authored-by: annatisch <[email protected]>
Co-authored-by: scbedd <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
10 people authored Jul 9, 2021
1 parent 73406cc commit a3f454d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tools/vcrpy/vcr/stubs/aiohttp_stubs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def __init__(self, method, url, request_info=None):
loop=asyncio.get_event_loop(),
session=None,
)
self._content = None

async def json(self, *, encoding="utf-8", loads=json.loads, **kwargs): # NOQA: E999
stripped = self._body.strip()
Expand All @@ -51,10 +52,11 @@ def release(self):

@property
def content(self):
s = MockStream()
s.feed_data(self._body)
s.feed_eof()
return s
if not self._content:
self._content = MockStream()
self._content.feed_data(self._body)
self._content.feed_eof()
return self._content


def build_response(vcr_request, vcr_response, history):
Expand All @@ -71,7 +73,6 @@ def build_response(vcr_request, vcr_response, history):
response._headers = CIMultiDictProxy(CIMultiDict(vcr_response["headers"]))
response._history = tuple(history)

response.close()
return response


Expand Down

0 comments on commit a3f454d

Please sign in to comment.