Skip to content

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

Merged
serhiy-storchaka merged 4 commits intopython:mainfrom
jacobtylerwalls:target-none
Feb 12, 2022
Merged

bpo-45948: Remove constructor discrepancy in C version of ElementTree.XMLParser#31152
serhiy-storchaka merged 4 commits intopython:mainfrom
jacobtylerwalls:target-none

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

@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.

@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.

5 participants