New submission from Vajrasky Kok: The python is compiled with --with-pydebug flag.
[sky@localhost cpython]$ cat /tmp/quote.txt manly "man" likes 'cute "cat"' [sky@localhost cpython]$ ./python Lib/shlex.py /tmp/quote.txt Token: 'manly' Token: '"man"' Token: 'likes' Token: '\'cute "cat"\'' sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/quote.txt' mode='r' encoding='UTF-8'> Attached the patch to close the file when running the demo. ---------- components: Library (Lib) files: fix_resource_warning_shlex_test.patch keywords: patch messages: 196291 nosy: vajrasky priority: normal severity: normal status: open title: Got ResourceWarning unclosed file when running Lib/shlex.py demo type: resource usage versions: Python 3.4 Added file: http://bugs.python.org/file31485/fix_resource_warning_shlex_test.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18853> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com