Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34k
gh-144270: Fix xml.etree.ElementTree.SubElement signature inconsistency#144313
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
gh-144270: Fix xml.etree.ElementTree.SubElement signature inconsistency#144313
Conversation
picnixz left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This is the wrong way to fix it. We should fix the Python signature, not the C one. And if the C signature needs to be fixed, you must update Parse() call not do it manually.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase And if you don't make the requested changes, you will be poked with soft cushions! |
picnixz commentedJan 28, 2026
The issue clearly stated that the problem was not the C implementation but the Python one. If you are using AI to generate PRs, please don't, because I'm tired of seeing AI-generated PRs. These past months, there were many new contributors that simply used an LLM to generate their PRs, which usually get closed either because they are wrong or because users don't address our comments. You are welcome to use an LLM if you need to understand the surrounding code, but you are not allowed to use one to write your PR. And unless you review the LLM-generated code and verify that the regression test catches the correct thing, don't open a PR. |
priyanshu2282-cyber commentedJan 28, 2026
Thanks for the feedback, I undertand that the PR took the wrong approach, I see now that the correct fix is to update Parse() call, I agree I did use LLM, to understand the surrounding code and API expectations, but the implementation and test were reviewed and written by me. I appreciate you taking the time to review and explain the issue. Sorry for the inconvenience, and thanks for taking the time to review. |
Uh oh!
There was an error while loading.Please reload this page.
The Python and C implementations of
xml.etree.ElementTree.SubElementexposed different call signatures the Python version allowed parent as a keyword argument, while the C version did not. This change makes the Python signature consistent with the C implementation. Passing parent as a keyword argument now raises TypeError. A regression test is added.