Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

No, BasicIO.close() is correct.

This is a bug in the garbage collector: the underlying file is closed before 
closing HTTPResponse. The HTTPResponse instance has a reference to the file 
object, the file object does not have a reference to the HTTPResponse instance, 
therefore the HTTPResponse instance should be destroyed first.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36918>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to