cpython/Lib/xml/etree
Jacob Walls d717be04dc
gh-83122: Deprecate testing element truth values in `ElementTree` (#31149)
When testing element truth values, emit a DeprecationWarning in all implementations.

This had emitted a FutureWarning in the rarely used python-only implementation since ~2.7 and has always been documented as a behavior not to rely on.

Matching an element in a tree search but having it test False can be unexpected. Raising the warning enables making the choice to finally raise an exception for this ambiguous behavior in the future.
2023-01-22 17:16:48 -08:00
..
ElementInclude.py Update URLs in comments and metadata to use HTTPS (GH-27458) 2021-07-30 15:54:46 +02:00
ElementPath.py gh-91447: Fix findtext to only give an empty string on None (GH-91486) 2022-08-01 09:52:39 -07:00
ElementTree.py gh-83122: Deprecate testing element truth values in `ElementTree` (#31149) 2023-01-22 17:16:48 -08:00
__init__.py Update URLs in comments and metadata to use HTTPS (GH-27458) 2021-07-30 15:54:46 +02:00
cElementTree.py bpo-36543: Revert "bpo-36543: Remove the xml.etree.cElementTree module." (GH-20117) 2020-06-10 17:39:12 +02:00