This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients donmez, georg.brandl, pitrou, vstinner
Date 2010-11-09.16:08:38
SpamBayes Score 8.537825e-06
Marked as misclassified No
Message-id <1289318921.42.0.728596263446.issue10372@psf.upfronthosting.co.za>
In-reply-to
Content
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'>
History
Date User Action Args
2010-11-09 16:08:41pitrousetrecipients: + pitrou, georg.brandl, vstinner, donmez
2010-11-09 16:08:41pitrousetmessageid: <1289318921.42.0.728596263446.issue10372@psf.upfronthosting.co.za>
2010-11-09 16:08:39pitroulinkissue10372 messages
2010-11-09 16:08:38pitroucreate