SIGN IN SIGN UP
python / cpython UNCLAIMED

The Python programming language

0 0 2 Python

bpo-30264: ExpatParser closes the source on error (#1451)

ExpatParser.parse() of xml.sax.xmlreader now always closes the
source: close the file object or the urllib object if source is a
string (not an open file-like object). The change fixes a
ResourceWarning on parsing error.

Add test_parse_close_source() unit test.
V
Victor Stinner committed
ef9c0e732fc50aefbdd7c5a80e04e14b31684e66
Parent: 7186cc2
Committed by GitHub <noreply@github.com> on 5/5/2017, 7:46:47 AM