New submission from Petr: When using configparser read method, the file(s) remains opened and cannot be closed, causing ResourceWarning: unclosed file.
For example in the following code: config = configparser.ConfigParser() config.read(cfg_fn) ... the file cfg_fn remains opened and is only closed upon destruction of the underlying file object. At some point in history the method read used to close the file, but this has been changed for some reason. ---------- components: Library (Lib) messages: 280209 nosy: PetrPy priority: normal severity: normal status: open title: configparser does not close files in read type: resource usage versions: Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28632> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com