You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 13, 2021. It is now read-only.
118 print(response.request.headers)
119 else:
--> 120 print(response.headers[b'apns-id'])
121
122 # try:
blaze/.venv/lib/python3.5/site-packages/requests/sessions.py in __exit__(self, *args)
367
368 def __exit__(self, *args):
--> 369 self.close()
370
371 def prepare_request(self, request):
blaze/.venv/lib/python3.5/site-packages/requests/sessions.py in close(self)
688 """Closes all adapters and as such the session"""
689 for v in self.adapters.values():
--> 690 v.close()
691
692 def mount(self, prefix, adapter):
blaze/.venv/lib/python3.5/site-packages/requests/adapters.py in close(self)
304 which closes any pooled connections.
305 """
--> 306 self.poolmanager.clear()
307 for proxy in self.proxy_manager.values():
308 proxy.clear()
AttributeError: 'HTTP20Adapter' object has no attribute 'poolmanager'
Thanks for raising this! This is a bug caused by the fact that I didn't override the close method of the HTTPAdapter. It would be fixed by overriding HTTP20Adapter.close with the appropriate functionality (in this case, iterating the connections and closing them all).
This is not a high urgency issue for me right now (I'm working on a few big bits of functionality that aren't easily interrupted for this), so while I may get to it eventually if someone wants to come along and make a pull request that will address this I'll happily review and merge.
Using
HTTP20Adapter
withrequests
and closing the session (with context manager) results in attribute error.Usage:
Error:
Packages:
The text was updated successfully, but these errors were encountered: