gh-123213: Fixed xml.etree.ElementTree.Element.extend and assignment to no longer hide exceptions#123214
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.
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. |
|
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_Faststandard 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 ❤️