Skip to content

Commit

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

* update

* Get latest main (Azure#19733)

* Credentials accept tenant_id argument to get_token (Azure#19602)

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

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

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

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

* version,CHANGELOG

* test

Co-authored-by: SDKAuto <sdkautomation@microsoft.com>
Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>

* debug_guide for python SDK (Azure#19716)

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

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

* Prevent DeprecationWarning in Identity tests (Azure#19723)

* move _utils.py (Azure#19431)

* move _utils.py

* update

* [QnA] Initial SDK (Azure#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 <45376673+scbedd@users.noreply.github.com>

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

* handle details "null" (Azure#19430)

* handle details "null"

* update

* Bump aiohttp from 3.5.4 to 3.7.4 in /common/smoketest (Azure#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] <support@github.com>

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

Co-authored-by: Charles Lowell <chlowe@microsoft.com>
Co-authored-by: McCoy Patiño <39780829+mccoyp@users.noreply.github.com>
Co-authored-by: Azure CLI Bot <azclibot@microsoft.com>
Co-authored-by: SDKAuto <sdkautomation@microsoft.com>
Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com>
Co-authored-by: annatisch <antisch@microsoft.com>
Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Co-authored-by: Charles Lowell <chlowe@microsoft.com>
Co-authored-by: McCoy Patiño <39780829+mccoyp@users.noreply.github.com>
Co-authored-by: Azure CLI Bot <azclibot@microsoft.com>
Co-authored-by: SDKAuto <sdkautomation@microsoft.com>
Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com>
Co-authored-by: annatisch <antisch@microsoft.com>
Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
10 people authored and rakshith91 committed Jul 16, 2021
1 parent f498db2 commit 5fcb56f
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 5fcb56f

Please sign in to comment.