diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-05-05 09:46:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-05 09:46:47 +0200 |
commit | ef9c0e732fc50aefbdd7c5a80e04e14b31684e66 (patch) | |
tree | a59653d14c060ab0037012529ccc678ee8049b96 /Python/thread_foobar.h | |
parent | 7186cc29be352bed6f1110873283d073fd0643e4 (diff) | |
download | cpython-git-ef9c0e732fc50aefbdd7c5a80e04e14b31684e66.tar.gz |
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.
Diffstat (limited to 'Python/thread_foobar.h')
0 files changed, 0 insertions, 0 deletions