)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":37598,"name":"Ivan Anfimov","display_name":"Ivan Anfimov","email":"lazekteam@gmail.com","username":"anfimovir"},"change_message_id":"2678c775d1d9c31fddd965a0f6c4119bda75ce3a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"a186f94d_6c46b8b4","updated":"2025-07-06 21:26:14.000000000","message":"recheck","commit_id":"8691d9676e08177201ff74c39d13d1a63ce3dd34"}],"swift/common/constraints.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"6cd342328f59f9e599f913a2def11e40ca78f1b2","unresolved":true,"context_lines":[{"line_number":371,"context_line":"            decoded \u003d string.decode(\u0027UTF-8\u0027)"},{"line_number":372,"context_line":"            if decoded.encode(\u0027UTF-8\u0027) !\u003d encoded:"},{"line_number":373,"context_line":"                return False"},{"line_number":374,"context_line":"        # A UTF-8 string with surrogates in it is invalid."},{"line_number":375,"context_line":"        #"},{"line_number":376,"context_line":"        # Note: this check is only useful on Python 2. On Python 3, a"},{"line_number":377,"context_line":"        # bytestring with a UTF-8-encoded surrogate codepoint is (correctly)"},{"line_number":378,"context_line":"        # treated as invalid, so the decode() call above will fail."},{"line_number":379,"context_line":"        #"},{"line_number":380,"context_line":"        # Note 2: this check requires us to use a wide build of Python 2. On"},{"line_number":381,"context_line":"        # narrow builds of Python 2, potato \u003d u\"\\U0001F954\" will have length"},{"line_number":382,"context_line":"        # 2, potato[0] \u003d\u003d u\"\\ud83e\" (surrogate), and potato[1] \u003d\u003d u\"\\udda0\""},{"line_number":383,"context_line":"        # (also a surrogate), so even if it is correctly UTF-8 encoded as"},{"line_number":384,"context_line":"        # b\u0027\\xf0\\x9f\\xa6\\xa0\u0027, it will not pass this check. Fortunately,"},{"line_number":385,"context_line":"        # most Linux distributions build Python 2 wide, and Python 3.3+"},{"line_number":386,"context_line":"        # removed the wide/narrow distinction entirely."},{"line_number":387,"context_line":"        if any(0xD800 \u003c\u003d ord(codepoint) \u003c\u003d 0xDFFF"},{"line_number":388,"context_line":"               for codepoint in decoded):"},{"line_number":389,"context_line":"            return False"},{"line_number":390,"context_line":"        if b\u0027\\x00\u0027 !\u003d utils.RESERVED_BYTE and b\u0027\\x00\u0027 in encoded:"},{"line_number":391,"context_line":"            return False"},{"line_number":392,"context_line":"        return True if internal else utils.RESERVED_BYTE not in encoded"}],"source_content_type":"text/x-python","patch_set":3,"id":"c7647dda_26f14ac2","side":"PARENT","line":389,"range":{"start_line":374,"start_character":8,"end_line":389,"end_character":24},"updated":"2025-09-15 20:28:05.000000000","message":"Are you just trying to get rid of this part? We definitely still want the null-byte check.\n\nRegardless, we **absolutely** want *some* path by which this can `return True`","commit_id":"82cb5a5d78b91c6af258cd8f06d30f69be90fa18"},{"author":{"_account_id":37598,"name":"Ivan Anfimov","display_name":"Ivan Anfimov","email":"lazekteam@gmail.com","username":"anfimovir"},"change_message_id":"869964d4c0acac7ec9e48c86d2e29c615bd67dbc","unresolved":false,"context_lines":[{"line_number":371,"context_line":"            decoded \u003d string.decode(\u0027UTF-8\u0027)"},{"line_number":372,"context_line":"            if decoded.encode(\u0027UTF-8\u0027) !\u003d encoded:"},{"line_number":373,"context_line":"                return False"},{"line_number":374,"context_line":"        # A UTF-8 string with surrogates in it is invalid."},{"line_number":375,"context_line":"        #"},{"line_number":376,"context_line":"        # Note: this check is only useful on Python 2. On Python 3, a"},{"line_number":377,"context_line":"        # bytestring with a UTF-8-encoded surrogate codepoint is (correctly)"},{"line_number":378,"context_line":"        # treated as invalid, so the decode() call above will fail."},{"line_number":379,"context_line":"        #"},{"line_number":380,"context_line":"        # Note 2: this check requires us to use a wide build of Python 2. On"},{"line_number":381,"context_line":"        # narrow builds of Python 2, potato \u003d u\"\\U0001F954\" will have length"},{"line_number":382,"context_line":"        # 2, potato[0] \u003d\u003d u\"\\ud83e\" (surrogate), and potato[1] \u003d\u003d u\"\\udda0\""},{"line_number":383,"context_line":"        # (also a surrogate), so even if it is correctly UTF-8 encoded as"},{"line_number":384,"context_line":"        # b\u0027\\xf0\\x9f\\xa6\\xa0\u0027, it will not pass this check. Fortunately,"},{"line_number":385,"context_line":"        # most Linux distributions build Python 2 wide, and Python 3.3+"},{"line_number":386,"context_line":"        # removed the wide/narrow distinction entirely."},{"line_number":387,"context_line":"        if any(0xD800 \u003c\u003d ord(codepoint) \u003c\u003d 0xDFFF"},{"line_number":388,"context_line":"               for codepoint in decoded):"},{"line_number":389,"context_line":"            return False"},{"line_number":390,"context_line":"        if b\u0027\\x00\u0027 !\u003d utils.RESERVED_BYTE and b\u0027\\x00\u0027 in encoded:"},{"line_number":391,"context_line":"            return False"},{"line_number":392,"context_line":"        return True if internal else utils.RESERVED_BYTE not in encoded"}],"source_content_type":"text/x-python","patch_set":3,"id":"197fd64a_053ae42d","side":"PARENT","line":389,"range":{"start_line":374,"start_character":8,"end_line":389,"end_character":24},"in_reply_to":"c7647dda_26f14ac2","updated":"2025-09-15 20:55:10.000000000","message":"Yes, you right.","commit_id":"82cb5a5d78b91c6af258cd8f06d30f69be90fa18"}]}
