Ł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/someconfig.py') ['/tmp/someconfig.py'] >>> [CTRL+D] $ ```
If I leave a file unclosed, I get warning: ``` $ python3 Python 3.5.2 (default, Jul 28 2016, 21:28:00) >>> open('/tmp/someconfig.py') <_io.TextIOWrapper name='/tmp/someconfig.py' mode='r' encoding='UTF-8'> >>> [CTRL+D] sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/someconfig.py' mode='r' encoding='UTF-8'> $ ``` ---------- _______________________________________ 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