bpo-35013: Add more type checks for children of Element. (GH-9944)
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 19 Oct 2018 09:12:57 +0000 (12:12 +0300)
committerGitHub <noreply@github.com>
Fri, 19 Oct 2018 09:12:57 +0000 (12:12 +0300)
commitf081fd83032be48aefdb1bbcc38ab5deb03785d5
tree9696b61136dbfe1bae2edbb249b25cd7143defea
parent68def052dcd41313eff2bd9f269e22c5a941db4d
bpo-35013: Add more type checks for children of Element. (GH-9944)

It is now guarantied that children of xml.etree.ElementTree.Element
are Elements (at least in C implementation). Previously methods
__setitem__(), __setstate__() and __deepcopy__() could be used for
adding non-Element children.
Lib/test/test_xml_etree.py
Lib/xml/etree/ElementTree.py
Modules/_elementtree.c