[issue28632] configparser does not close files in read

2016-11-13 Thread SilentGhost
Changes by SilentGhost : -- stage: -> resolved ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue28632] configparser does not close files in read

2016-11-13 Thread Petr
Petr added the comment: Thanks for your comments, I am myself quite puzzled how is it possible that the file is not closed after having been read. I suspect this to be an OS problem, therefore I am closing the bug for now. -- resolution: -> not a bug status: open -> closed __

[issue28632] configparser does not close files in read

2016-11-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: Given that the open is context managed with open(filename, encoding=encoding) as fp: self._read(fp, filename) how could fp not be closed? -- nosy: +terry.reedy ___ Python tracker <

[issue28632] configparser does not close files in read

2016-11-08 Thread Petr
Petr added the comment: I am sorry, I can only reproduce it in the production environment so far, it does only occur on Ubuntu Linux (Python 3.5.1) and I am developing on Windows. So right now I cannot narrow it down (it does not occur with simple code, unfortunately). This is what I get after

[issue28632] configparser does not close files in read

2016-11-07 Thread Łukasz Langa
Łukasz Langa added the comment: Cannot repro: ``` $ python3 Python 3.5.2 (default, Jul 28 2016, 21:28:00) >>> with open('/tmp/someconfig.py', 'w') as w: ... w.write("""[section] ... option=value ... """) ... 23 >>> import configparser >>> cp = configparser.ConfigParser() >>> cp.read('/tmp/somec

[issue28632] configparser does not close files in read

2016-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I can't reproduce the issue. Looking at the code it seems to me that the file is always closed. Could you please provide more information Petr? -- nosy: +serhiy.storchaka ___ Python tracker

[issue28632] configparser does not close files in read

2016-11-07 Thread R. David Murray
Changes by R. David Murray : -- nosy: +lukasz.langa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue28632] configparser does not close files in read

2016-11-07 Thread Petr
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 cl