classification
Title: file.__exit__ does not call subclass' close method
Type: behavior Stage:
Components: Interpreter Core Versions: Python 2.6, Python 2.5
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: belopolsky, georg.brandl, schmir
Priority: normal Keywords:

Created on 2008-02-11 15:11 by belopolsky, last changed 2008-02-23 15:16 by schmir. This issue is now closed.

Files
File name Uploaded Description Edit
file_exit.diff belopolsky, 2008-02-11 15:11 Patch against revision 60728
Messages (4)
msg62289 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2008-02-11 15:11
Attached patch makes file.__exit__ call subclass' close method.
msg62442 - (view) Author: Ralf Schmitt (schmir) Date: 2008-02-15 21:40
The patch looks good, I've tested it on trunk and also release25-maint.
It applies with fuzz and one has to add a "from __future import
with_statement".
I think this should also be applied to release25-maint. IMHO, this is a
rather severe problem, as it can easily lead to data loss.
msg62740 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-02-23 15:11
Committed r60984.
msg62744 - (view) Author: Ralf Schmitt (schmir) Date: 2008-02-23 15:16
Isn't this a candidate for backporting to 2.5?
History
Date User Action Args
2008-02-23 15:16:13schmirsetmessages: + msg62744
2008-02-23 15:11:24georg.brandlsetstatus: open -> closed
resolution: accepted
messages: + msg62740
nosy: + georg.brandl
2008-02-15 21:40:41schmirsetnosy: + schmir
messages: + msg62442
severity: normal -> major
versions: + Python 2.5
2008-02-11 15:11:54belopolskycreate