bpo-34941: Fix searching Element subclasses.#9766
Conversation
Methods find(), findtext() and findall() of xml.etree.ElementTree.Element were not able to find chldren which are instances of Element subclasses.
|
Neat find, thanks! One remark: should there be a note in the documentation (TreeBuilder section) that the element instance returned by the element_factory should be an instance of (a subclass of) Element? |
|
I am unsure. Some parts of the module requires See also bpo-28234. |
|
LGTM |
|
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.6, 3.7. |
Methods find(), findtext() and findall() of xml.etree.ElementTree.Element were not able to find chldren which are instances of Element subclasses. (cherry picked from commit b11c566) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
GH-9867 is a backport of this pull request to the 3.7 branch. |
|
Sorry, @serhiy-storchaka, I could not cleanly backport this to |
|
Sorry, @serhiy-storchaka, I could not cleanly backport this to |
|
In 2.7 cElementTree.Element is not subclassable. |
Methods find(), findtext() and findall() of xml.etree.ElementTree.Element were not able to find chldren which are instances of Element subclasses.. (cherry picked from commit b11c566) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
GH-9868 is a backport of this pull request to the 3.6 branch. |
Methods find(), findtext() and findall() of xml.etree.ElementTree.Element were not able to find chldren which are instances of Element subclasses. (cherry picked from commit b11c566) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Methods find(), findtext() and findall() of xml.etree.ElementTree.Element
were not able to find chldren which are instances of Element subclasses.
https://bugs.python.org/issue34941