mirror of
https://github.com/python/cpython
synced 2026-11-23 00:04:08 +03:00
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.
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| _exceptions.py | ||
| expatreader.py | ||
| handler.py | ||
| saxutils.py | ||
| xmlreader.py | ||