Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion sdk/core/azure-core/HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
- Support fixed retry #6419
- Support "retry-after-ms" in response header #9240

## 1.1.1 (2019-12-03)
### Bug fixes

- Removed `__enter__` and `__exit__` from async context managers
([#9313](https://github.com/Azure/azure-sdk-for-python/pull/9313))

## 1.1.1 (2019-12-03)

### Bug fixes

Expand Down
7 changes: 0 additions & 7 deletions sdk/core/azure-core/azure/core/pipeline/_base_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,6 @@ def __init__(self, transport, policies: AsyncPoliciesType = None) -> None:
if self._impl_policies:
self._impl_policies[-1].next = _AsyncTransportRunner(self._transport)

def __enter__(self):
raise TypeError("Use 'async with' instead")

def __exit__(self, exc_type, exc_val, exc_tb):
# __exit__ should exist in pair with __enter__ but never executed
pass # pragma: no cover

async def __aenter__(self) -> "AsyncPipeline":
await self._transport.__aenter__()
return self
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,3 @@ async def close(self):

async def sleep(self, duration):
await asyncio.sleep(duration)

def __enter__(self):
raise TypeError("Use async with instead")

def __exit__(self, exc_type, exc_val, exc_tb):
# __exit__ should exist in pair with __enter__ but never executed
pass # pragma: no cover