Skip to content

Commit

Permalink
Remove version requirement for aiohttp as aioresponses suppports late…
Browse files Browse the repository at this point in the history
…st now
  • Loading branch information
maxzheng committed Jun 6, 2020
1 parent 1dff3fd commit 913ce29
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion aiohttp_requests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ def close(self):
if not self._session.closed:
# Older aiohttp does not have _connector_owner
if not hasattr(self._session, '_connector_owner') or self._session._connector_owner:
self._session._connector.close()
try:
self._session._connector._close() # New version returns a coroutine in close() as warning
except Exception:
self._session._connector.close()
self._session._connector = None
self._session = None

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
aiohttp<=3.0.9 # aioresponses doesn't support 3.1 yet
aiohttp
cchardet
aiodns

0 comments on commit 913ce29

Please sign in to comment.