Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-45948: Remove constructor discrepancy in C version of ElementTree.XMLParser #31152

Merged
merged 4 commits into from Feb 12, 2022

Conversation

jacobtylerwalls
Copy link
Contributor

@jacobtylerwalls jacobtylerwalls commented Feb 5, 2022

bpo-45948

Bring the C implementation of ElementTree into agreement with the Python implementation (and the docs) if an explicit target=None is provided to XMLParser. In that case, provide a default TreeBuilder.

This already worked if the target keyword was omitted. It's possible the reporter only discovered the discrepancy when the arguments went keyword-only in 3.8.

https://bugs.python.org/issue45948

@serhiy-storchaka serhiy-storchaka added needs backport to 3.9 only security fixes needs backport to 3.10 only security fixes labels Feb 8, 2022
@miss-islington
Copy link
Contributor

Thanks @jacobtylerwalls for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 12, 2022
….XMLParser (pythonGH-31152)

Both implementations accept target=None now.
(cherry picked from commit 168fd64)

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
@miss-islington
Copy link
Contributor

Sorry, @jacobtylerwalls and @serhiy-storchaka, I could not cleanly backport this to 3.9 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 168fd6453b5de15236116f9261d64601d92571ac 3.9

@bedevere-bot
Copy link

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

miss-islington added a commit that referenced this pull request Feb 12, 2022
….XMLParser (GH-31152)

Both implementations accept target=None now.
(cherry picked from commit 168fd64)

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
jacobtylerwalls added a commit to jacobtylerwalls/cpython that referenced this pull request Feb 12, 2022
…ntTree.XMLParser (pythonGH-31152)

Both implementations accept target=None now.

(cherry picked from commit 168fd64)
@bedevere-bot
Copy link

GH-31299 is a backport of this pull request to the 3.9 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Feb 12, 2022
@jacobtylerwalls jacobtylerwalls deleted the target-none branch February 12, 2022 15:51
serhiy-storchaka pushed a commit that referenced this pull request Feb 13, 2022
…ntTree.XMLParser (GH-31152) (GH-31299)

Both implementations accept target=None now.

(cherry picked from commit 168fd64)
@serhiy-storchaka serhiy-storchaka removed their assignment Apr 25, 2022
hello-adam pushed a commit to hello-adam/cpython that referenced this pull request Jun 2, 2022
…ntTree.XMLParser (pythonGH-31152) (pythonGH-31299)

Both implementations accept target=None now.

(cherry picked from commit 168fd64)
Sign up for free to 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.

None yet

5 participants