-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in ClientSession __del__ #497
Comments
Thanks for report. It should be fixed in both |
This is only partial fix: the same should be done for asyncio for logger instance. Let's leave the issue open until making asyncio fix. |
@sk for sake of best practice please don't rely on garbage collector but explicitly call |
@asvetlov: Thanks for pointing out that I should close the session. I was using it in a command line crawler, and the program was terminating after completing the jobs. Closing the session fixes my problem. |
I did my best, aiohttp is safe now. |
The
__del__
method ofClientSession
available for Python >= 3.4.1 produces inconsistent tracebacks.I'm using Aiohttp 0.17.3 on Mac Os X Yosemite, with Python 3.4.3.
With the same code I've seen the following ones:
(Note: this same code was working fine with aiohttp 0.16.5 and it also works if I just comment out https://github.com/KeepSafe/aiohttp/blob/b6bfb7afbe1b786ca396757c5a88c3822fc4057a/aiohttp/client.py#L79-L90)
The text was updated successfully, but these errors were encountered: