Antoine Pitrou <pit...@free.fr> added the comment: For some reason, this starts happening with the Lib/tokenize.py change in r86346. Resource warnings don't get enabled by -Wd:
With r86345: $ ./python -Wd -c "open('LICENSE')" -c:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='LICENSE' encoding='UTF-8'> With r86346: $ ./python -Wd -c "open('LICENSE')" But enabling warnings programmatically still works: $ ./python -c "import warnings; warnings.simplefilter('default'); open('LICENSE')" -c:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='LICENSE' encoding='UTF-8'> ---------- assignee: -> haypo components: +Library (Lib) nosy: +georg.brandl, haypo, pitrou priority: normal -> high stage: -> needs patch title: [REGRESSION] test_gc fails on Mac OSX 10.6 -> [REGRESSION] test_gc fails in non-debug mode. _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10372> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com