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-11.12:55:57
SpamBayes Score 0.047229886
Marked as misclassified No
Message-id <1202734618.56.0.964458538053.issue2021@psf.upfronthosting.co.za>
In-reply-to
Content
Backported to 2.5 in r60728

P.S. To elaborate a bit more on why converting NamedTemporaryFile to
subclass file would be a much bigger deal than it is to just fix its
__enter__ and __exit__ methods:
- converts from old-style to new-style class
- imposes the constraints of a C base class on any subclasses
- file attribute is currently part of the public API
- need to retain wrapper approach in tempfile anyway for related type
SpooledTemporaryFile in 2.6 (as that may contain a real file or a string
IO object at different points in its lifecycle)
- no compelling use case for the change (the wrapper approach works,
what real advantage do we gain from subclassing file instead?)
- wrapper approach is much easier to reconcile with Python 3.0's io module
History
Date User Action Args
2008-02-11 12:56:58ncoghlansetspambayes_score: 0.0472299 -> 0.047229886
recipients: + ncoghlan, belopolsky, christian.heimes
2008-02-11 12:56:58ncoghlansetspambayes_score: 0.0472299 -> 0.0472299
messageid: <1202734618.56.0.964458538053.issue2021@psf.upfronthosting.co.za>
2008-02-11 12:55:58ncoghlanlinkissue2021 messages
2008-02-11 12:55:57ncoghlancreate