Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(backport): Test xml.etree.ElementTree.Element truth value by 'is …
…not None' (#2499) * Backport PR #2459 * In Python 3.14 testing the truth value of an xml.etree.ElementTree.Element is deprecated and will raise an exception. As of Python 3.12 this behavior will raise a DeprecationWarning: ``` DeprecationWarning: Testing an element's truth value will raise an exception in future versions. Use specific 'len(elem)' or 'elem is not None' test instead. ``` To avoid this, determine the truth element by using the 'elem is not None' method. - c.f. https://docs.python.org/3.12/library/xml.etree.elementtree.html#element-objects Co-authored-by: Matthew Feickert <[email protected]>
- Loading branch information