
report at bugs
Aug 3, 2013, 6:45 AM
Post #1 of 11
(33 views)
Permalink
|
|
[issue18644] Got ResourceWarning: unclosed file when using test function from formatter module
|
|
New submission from Vajrasky Kok: This python is compiled with --with-pydebug option. [sky [at] localhos cpython]$ cat /tmp/a.txt manly man likes cute cat. [sky [at] localhos cpython]$ ./python Python 3.4.0a0 (default:e408e821d6c8, Jul 27 2013, 10:49:54) [GCC 4.7.2 20121109 (Red Hat 4.7.2-8)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from formatter import test >>> test('/tmp/a.txt') manly man likes cute cat. __main__:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/a.txt' mode='r' encoding='UTF-8'> >>> [sky [at] localhos cpython]$ ./python Lib/formatter.py /tmp/a.txt manly man likes cute cat. Lib/formatter.py:445: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/a.txt' mode='r' encoding='UTF-8'> test() ---------- components: Tests files: formatter_fix_resource_warning.patch keywords: patch messages: 194260 nosy: vajrasky priority: normal severity: normal status: open title: Got ResourceWarning: unclosed file when using test function from formatter module type: resource usage versions: Python 3.4 Added file: http://bugs.python.org/file31138/formatter_fix_resource_warning.patch _______________________________________ Python tracker <report [at] bugs> <http://bugs.python.org/issue18644> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
|