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.
J
Jacob Walls committed
d717be04dc7876696cb21ce7901bda0214c4b2e0
Parent: 997073c
Committed by GitHub <noreply@github.com>
on 1/23/2023, 1:16:48 AM