Message262362
> I don't like _dealloc_warn() at all. It looks as a dirty hack and doesn't work with custom file-like objects.
I tried to support emitting a ResourceWarning when the close() method is overriden in a subclass, but then I saw that io doesn't support this use case neither:
---
import io
import os
class MyFile(io.FileIO):
def close(self):
os.close(self.fileno())
f = MyFile('/etc/issue')
f = None
---
=> no warning
Ok, now I have to read again Martin's patches since I didn't understand them at the first read :-) |
|
Date |
User |
Action |
Args |
2016-03-24 15:36:40 | vstinner | set | recipients:
+ vstinner, pitrou, Arfrever, akira, martin.panter, piotr.dobrogost, serhiy.storchaka |
2016-03-24 15:36:40 | vstinner | set | messageid: <1458833800.28.0.0761624538707.issue19829@psf.upfronthosting.co.za> |
2016-03-24 15:36:40 | vstinner | link | issue19829 messages |
2016-03-24 15:36:40 | vstinner | create | |
|