Skip to content

Commit

Permalink
Add a warning for with ClientSession()
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov committed Sep 6, 2016
1 parent e3d3a5a commit 5617801
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions aiohttp/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ def detach(self):
self._connector = None

def __enter__(self):
warnings.warn("Use async with instead", DeprecationWarning)
return self

def __exit__(self, exc_type, exc_val, exc_tb):
Expand Down

0 comments on commit 5617801

Please sign in to comment.