]> granicus.if.org Git - python/commit
bpo-30264: ExpatParser now closes the source (#1476)
authorVictor Stinner <victor.stinner@gmail.com>
Fri, 5 May 2017 08:11:55 +0000 (10:11 +0200)
committerGitHub <noreply@github.com>
Fri, 5 May 2017 08:11:55 +0000 (10:11 +0200)
commitd81f9e24ea89c0aaded1e0d3f8d8076bbd58c19a
tree16d3faf0c675d130d6a7163b53f4f87d4e7ac630
parentfd6094cdebb5736745d164e0207de2d4cb0b50dc
bpo-30264: ExpatParser now closes the source (#1476)

ExpatParser.parse() of xml.sax.xmlreader now closes the source: close
the file object or the urllib object if source is a string (not an
open file-like object).

Add test_parse_close_source() unit test.
Lib/test/test_sax.py
Lib/xml/sax/expatreader.py