This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients serhiy.storchaka, vstinner, xtreak
Date 2019-05-17.11:35:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1558092929.59.0.000632195150005.issue36918@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019-05-17 11:35:29serhiy.storchakasetrecipients: + serhiy.storchaka, vstinner, xtreak
2019-05-17 11:35:29serhiy.storchakasetmessageid: <1558092929.59.0.000632195150005.issue36918@roundup.psfhosted.org>
2019-05-17 11:35:29serhiy.storchakalinkissue36918 messages
2019-05-17 11:35:29serhiy.storchakacreate