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 brett.cannon
Recipients Marcel.Hellkamp, barry, brett.cannon, flox, larry, madison.may, orsenthil, pitrou, python-dev, serhiy.storchaka, vajrasky
Date 2014-01-17.14:49:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1389970154.97.0.411150420901.issue18394@psf.upfronthosting.co.za>
In-reply-to
Content
While you're right, Marcel, that code which pulls out the file object form FieldStorage would probably have the file closed from underneath it, I don't know if I agree that it's a bad thing. The FieldStorage object created that file, implicitly putting it in charge of managing it. Having it guarantee that it gets closed seems to me totally reasonable and a bug not to do so. And having Bottle break as-is doesn't sway me as this is a bug fix and so updating Bottle as part of the process to support Python 3.4 is reasonable.

That use of the term "leisure" is definitely a problem, though. So I'm going to make this a bug report for updating the docs to no longer use the term "leisure" and add a versionchanged note that FieldStorage will close the 'file' attribute upon deletion. I'll also opened http://bugs.python.org/issue20289 to add context manager support to FieldStorage.

But since leaving files randomly open is not good I can't bring myself to revert this change.
History
Date User Action Args
2014-01-17 14:49:15brett.cannonsetrecipients: + brett.cannon, barry, orsenthil, pitrou, larry, flox, Marcel.Hellkamp, python-dev, serhiy.storchaka, madison.may, vajrasky
2014-01-17 14:49:14brett.cannonsetmessageid: <1389970154.97.0.411150420901.issue18394@psf.upfronthosting.co.za>
2014-01-17 14:49:14brett.cannonlinkissue18394 messages
2014-01-17 14:49:14brett.cannoncreate