GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||
GeezerVison is showing github.com — [3.14] gh-146056: Fix repr() for lists and tuples containing NULLs (GH-146129) (alt) by serhiy-storchaka · Pull Request #146204 · python/cpython Conversation
| |||||||||||||||||||
| @@ -0,0 +1 @@ | |||
| :c:func:`PyUnicodeWriter_WriteRepr` now supports ``NULL`` argument. | |||
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This is no longer true.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| PyObject *obj); | ||
| #if defined(Py_BUILD_CORE) || defined(Py_BUILD_CORE_MODULE) | ||
| #define PyUnicodeWriter_WriteRepr _PyUnicodeWriter_WriteReprTrue | ||
| #endif |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
It looks like a bad hack to me. I don't think that it's needed: only tuple_repr() and list_repr() should be modified to accept NULL: #146155 (comment), other functions cannot call PyUnicodeWriter_WriteRepr() with NULL.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I tried to minimize the diff. If you prefer, we can simply replace PyUnicodeWriter_WriteRepr with _PyUnicodeWriter_WriteReprTrue. This will make future backports more difficult.
We cannot be sure that this is not needed until we analyze every use of PyUnicodeWriter_WriteRepr. This will take a time. Even if it is not needed right now, it can be needed after future backports.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.