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 pablogsal
Recipients ezio.melotti, kuhlmann, matrixise, pablogsal, remi.lapeyre, rhettinger
Date 2018-06-23.19:28:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1529782116.3.0.56676864532.issue33927@psf.upfronthosting.co.za>
In-reply-to
Content
The current status of json.tool also leaks a file descriptor if you use the same filename or an invalid one (needs debug build to receive this error message):


$ ./python -m json.tool invalid_file.dat nofile.dat
Expecting value: line 1 column 1 (char 0)
sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='nofile.dat' mode='w' encoding='UTF-8'>

$ ./python -m json.tool valid.dat valid.dat
Expecting value: line 1 column 1 (char 0)
sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='valid.dat' mode='w' encoding='UTF-8'>
History
Date User Action Args
2018-06-23 19:28:36pablogsalsetrecipients: + pablogsal, rhettinger, ezio.melotti, matrixise, remi.lapeyre, kuhlmann
2018-06-23 19:28:36pablogsalsetmessageid: <1529782116.3.0.56676864532.issue33927@psf.upfronthosting.co.za>
2018-06-23 19:28:36pablogsallinkissue33927 messages
2018-06-23 19:28:36pablogsalcreate