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 ncoghlan
Recipients belopolsky, christian.heimes, ncoghlan
Date 2008-02-09.15:32:00
SpamBayes Score 0.00465149
Marked as misclassified No
Message-id <>
I've changed the issue type from rfe to behaviour. NamedTemporaryFile
actually provides __enter__ and __exit__ methods in 2.5, they just don't
work (it tries to use the methods from the underlying file object
directly which turns out to be a doomed exercise for a couple of
different reasons).

Fixed on the trunk in r60695. Leaving issue as pending until the
NamedTemporaryFile fix is backported to 2.5 (or we decide not to
backport it).

P.S. Alexander's patch worked as written, but in figuring out *why* it
worked I ended up moving things around a bit (main change was to only
override __exit__ when it was actually necessary to do so) and adding
some more test cases (e.g. to also cover 2.6's new SpooledTemporaryFile).
Date User Action Args
2008-02-09 15:32:02ncoghlansetspambayes_score: 0.00465149 -> 0.00465149
recipients: + ncoghlan, belopolsky, christian.heimes
2008-02-09 15:32:02ncoghlansetspambayes_score: 0.00465149 -> 0.00465149
messageid: <>
2008-02-09 15:32:01ncoghlanlinkissue2021 messages
2008-02-09 15:32:00ncoghlancreate