Skip to content

gh-152674: Avoid quadratic behavior in xml.etree.ElementPath index predicates - #152676

Merged
encukou merged 5 commits into
python:mainfrom
encukou:adf1
Jul 28, 2026
Merged

gh-152674: Avoid quadratic behavior in xml.etree.ElementPath index predicates#152676
encukou merged 5 commits into
python:mainfrom
encukou:adf1

Conversation

@encukou

@encukouencukou commented Jun 30, 2026

Copy link
Copy Markdown
Member

DarkaMauland others added 4 commits June 30, 2026 13:20
Co-Authored-By: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@encukouencukou changed the title Avoid quadratic behavior in xml.etree.ElementPath index predicatesgh-152674: Avoid quadratic behavior in xml.etree.ElementPath index predicatesJun 30, 2026

@serhiy-storchakaserhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. 👍

I wonder if we need to save the cache in context, like parent_map.

@encukou

Copy link
Copy Markdown
MemberAuthor

I wonder if we need to save the cache in context, like parent_map.

We can share this one across the context, it's specific to the query (index and elem.tag).

@encukou
encukou merged commit 2ffab08 into python:mainJul 28, 2026
58 checks passed
@encukou
encukou deleted the adf1 branch July 28, 2026 11:36
@encukouencukou added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Jul 28, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @encukou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Thanks @encukou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@miss-islington-app

Copy link
Copy Markdown

Thanks @encukou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@bedevere-app

Copy link
Copy Markdown

GH-154810 is a backport of this pull request to the 3.14 branch.

@bedevere-appbedevere-appBot removed the needs backport to 3.14 bugs and security fixes label Jul 28, 2026
@bedevere-app

Copy link
Copy Markdown

GH-154811 is a backport of this pull request to the 3.13 branch.

@bedevere-appbedevere-appBot removed the needs backport to 3.13 bugs and security fixes label Jul 28, 2026
@bedevere-app

Copy link
Copy Markdown

GH-154812 is a backport of this pull request to the 3.15 branch.

@bedevere-appbedevere-appBot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jul 28, 2026
@encukouencukou added needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes labels Jul 28, 2026
@encukouencukou added the needs backport to 3.12 only security fixes label Jul 28, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @encukou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Thanks @encukou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Thanks @encukou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@bedevere-app

Copy link
Copy Markdown

GH-154813 is a backport of this pull request to the 3.11 branch.

@bedevere-appbedevere-appBot removed the needs backport to 3.11 only security fixes label Jul 28, 2026
@bedevere-app

Copy link
Copy Markdown

GH-154814 is a backport of this pull request to the 3.10 branch.

@bedevere-appbedevere-appBot removed the needs backport to 3.10 only security fixes label Jul 28, 2026
@bedevere-app

Copy link
Copy Markdown

GH-154815 is a backport of this pull request to the 3.12 branch.

@bedevere-appbedevere-appBot removed the needs backport to 3.12 only security fixes label Jul 28, 2026
encukou added a commit that referenced this pull request Jul 29, 2026
…ndex predicates (GH-152676) (GH-154812)
(cherry picked from commit 2ffab08)
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>
encukou added a commit that referenced this pull request Jul 29, 2026
…ndex predicates (GH-152676) (GH-154810)
(cherry picked from commit 2ffab08)
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>
encukou added a commit that referenced this pull request Jul 29, 2026
…ndex predicates (GH-152676) (GH-154811)
(cherry picked from commit 2ffab08)
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>
Yhg1s pushed a commit that referenced this pull request Aug 4, 2026
…ndex predicates (GH-152676) (#154815)
gh-152674: Avoid quadratic behavior in xml.etree.ElementPath index predicates (GH-152676)
(cherry picked from commit 2ffab08)
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>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@encukou@serhiy-storchaka@DarkaMaul