[3.12] gh-152674: Avoid quadratic behavior in xml.etree.ElementPath index predicates (GH-152676) (#154815)
gh-152674: Avoid quadratic behavior in xml.etree.ElementPath index predicates (GH-152676)
(cherry picked from commit 2ffab083782968a4d732738f4f1dff6bbd69d2b0)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Alexis <alexis.challande@trailofbits.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>