Message 85890 - Python tracker (original) (raw)
cooperation.diff:
- change the close method to call .flush() and then ._close()
- only IOBase implements close() (though a subclass can override close without causing problems - so long as it calls super().close())
- .flush() invokes super().flush()
- ._close() invokes super()._close()
- FileIO is implemented in Python in _pyio.py so that it can have the same base class as the other Python-implemented files classes
- tests verify that .flush() is not called after the file is closed
- tests verify that ._close()/.flush() calls move correctly are propagated correctly