gh-146056: Fix list.__repr__() for lists containing NULLs#146129
gh-146056: Fix list.__repr__() for lists containing NULLs#146129serhiy-storchaka merged 3 commits intopython:mainfrom
Conversation
|
If you change |
|
Please add a test on tuple as well: |
Co-authored-by: Victor Stinner <vstinner@python.org>
99a95d7 to
a75c4c1
Compare
vstinner
left a comment
There was a problem hiding this comment.
LGTM. I was against this before knowing that PyObject_Repr() and Python 3.12 repr(list) already support NULL, then I changed my mind.
IMO we should fix repr(list) in Python 3.13 and 3.14. But I don't think that we should backport the PyUnicodeWriter_WriteRepr() change.
Co-authored-by: Victor Stinner <vstinner@python.org>
|
I think this was a bug in the PyUnicodeWriter C API. When the user rewrite they code to using it, they can reasonably assume that I have found few other bugs in the PyUnicodeWriter C API, working on them. |
|
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
|
Sorry, @serhiy-storchaka, I could not cleanly backport this to |
|
Sorry, @serhiy-storchaka, I could not cleanly backport this to |
pythonGH-146129) (cherry picked from commit 0f2246b) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
|
GH-146155 is a backport of this pull request to the 3.14 branch. |
|
FYI I updated |
xml.etree.ElementTree.TreeBuilder#146056