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 <>
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.
Date User Action Args
2019-05-17 11:35:29serhiy.storchakasetrecipients: + serhiy.storchaka, vstinner, xtreak
2019-05-17 11:35:29serhiy.storchakasetmessageid: <>
2019-05-17 11:35:29serhiy.storchakalinkissue36918 messages
2019-05-17 11:35:29serhiy.storchakacreate