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 serhiy.storchaka
Recipients eli.bendersky, scoder, serhiy.storchaka, vstinner
Date 2017-05-05.10:46:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1493981210.18.0.640328150699.issue30264@psf.upfronthosting.co.za>
In-reply-to
Content
> If you use directly the parser class and pass an open file object, in that case, yes, my change closes the file.

Or if the high-level *function* parse() is called with an open file object.

I don't know whether this is desirable change, but this change can break third-party code, therefore it should be documented in Misc/NEWS.

And it is worth to add a check in test_parse_bytes that the passed file object is closed after error.
History
Date User Action Args
2017-05-05 10:46:50serhiy.storchakasetrecipients: + serhiy.storchaka, scoder, vstinner, eli.bendersky
2017-05-05 10:46:50serhiy.storchakasetmessageid: <1493981210.18.0.640328150699.issue30264@psf.upfronthosting.co.za>
2017-05-05 10:46:50serhiy.storchakalinkissue30264 messages
2017-05-05 10:46:50serhiy.storchakacreate