-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-123213: Fixed xml.etree.ElementTree.Element.extend and assignment to no longer hide exceptions #123214
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
Conversation
Misc/NEWS.d/next/Library/2024-08-22-09-37-48.gh-issue-123213.owmXnP.rst
Outdated
Show resolved
Hide resolved
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.
As I said previously, your argument is sound. However, one could argue that list.extend
raises a TypeError with the incorrect type in the error message. I don't mind either suggestions (technically, the message could include the type information but you'll probably need to play with some PyErr_ExceptionMatches
or remove the usage of PySequence_Fast
and do something different). I personally would like feedback from someone else so that we could arrive at the best solution both for the user and for the maintainability.
Misc/NEWS.d/next/Library/2024-08-22-09-37-48.gh-issue-123213.owmXnP.rst
Outdated
Show resolved
Hide resolved
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@eliben our xml expert 🙇 |
I'm not sure that eli is still active/available but we can ask @serhiy-storchaka for this one. |
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.
LGTM.
Thanks @bharel for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
…nment to no longer hide exceptions (pythonGH-123214) (cherry picked from commit 90b6d0e) Co-authored-by: Bar Harel <bharel@barharel.com>
GH-123257 is a backport of this pull request to the 3.13 branch. |
…nment to no longer hide exceptions (pythonGH-123214) (cherry picked from commit 90b6d0e) Co-authored-by: Bar Harel <bharel@barharel.com>
GH-123258 is a backport of this pull request to the 3.12 branch. |
Backport to 3.12 please.
Not formatting the exception message with the type (i.e "expected iterable not '...'") per
PySequence_Fast
standard usage across all modules.Apparently this bug exists for 15 years☹️
Typeshed already expects an Iterable for
.extend()
and__setitem__
, so it does not require an update ❤️