)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"27b56db5c335f06a24e935b83a76aa25564a67f2","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"obj.__qualname__ returns class name with prefix in Python 3,"},{"line_number":10,"context_line":"but only returns class name in Python 2, in order to keep consistent,"},{"line_number":11,"context_line":"just use obj.__name__."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Closes-Bug:1513067"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"da85f559_d5ed0cb8","line":11,"updated":"2015-11-10 19:45:54.000000000","message":"You should mention get_class_name() somewhere in your commit message. Proposition:\n\nFix get_class_name() on Python 3\n\nModify oslo_utils.reflection.get_class_name() to return the same result on Python 2 and Python 3. Use obj.__name__ instead of obj.__qualname__ on Python 3.","commit_id":"1ce7b21137f5f646e3f5c372240d63ebebba6602"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"b86dd267b8227621544c00db1d91ab702a9b6d58","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"obj.__qualname__ returns class name with prefix in Python 3,"},{"line_number":10,"context_line":"but only returns class name in Python 2, in order to keep consistent,"},{"line_number":11,"context_line":"just use obj.__name__."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Closes-Bug:1513067"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"da85f559_95b3f6e8","line":11,"in_reply_to":"da85f559_d5ed0cb8","updated":"2015-11-11 03:26:12.000000000","message":"Done","commit_id":"1ce7b21137f5f646e3f5c372240d63ebebba6602"}],"oslo_utils/reflection.py":[{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"ddcd268d7a24ef0bd8d2437adae8f41cbb58e5cb","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    # A nested class returns class name with nested prefix in Python 3,"},{"line_number":72,"context_line":"    # but only returns class name in Python 2, in order to keep consistent"},{"line_number":73,"context_line":"    # need remove the prefix"},{"line_number":74,"context_line":"    pieces[0] \u003d pieces[0].rsplit(\u0027.\u0027, 1)[-1]"},{"line_number":75,"context_line":"    if fully_qualified:"},{"line_number":76,"context_line":"        try:"},{"line_number":77,"context_line":"            pieces.insert(0, obj.__module__)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da85f559_829f56b3","line":74,"updated":"2015-11-10 15:06:27.000000000","message":"You don\u0027t need split: simply use __name__ instead of __qualname__, no?\n\nThe API of this function is unclear. For me, \"fully qualified name\" means module.namespace1.namespace2.name, not simply module.name.\n\nBut since existing code rely on the Python 2 behaviour (\"module.name\"), I guess that it\u0027s ok to always use __name__ on Python 2 and Python 3.","commit_id":"a213edf7eb19b7da315e3c9f9bb9c820c0eb83db"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"27b56db5c335f06a24e935b83a76aa25564a67f2","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    else:"},{"line_number":61,"context_line":"        if built_in:"},{"line_number":62,"context_line":"            try:"},{"line_number":63,"context_line":"                return obj.__qualname__"},{"line_number":64,"context_line":"            except AttributeError:"},{"line_number":65,"context_line":"                return obj.__name__"},{"line_number":66,"context_line":"    pieces \u003d [obj.__name__]"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_b518881f","line":63,"updated":"2015-11-10 19:45:54.000000000","message":"Oh, you should also modify this one.\n\n(Even if I\u0027m unable to find a builtin object with a qualified name containing a dot.)","commit_id":"1ce7b21137f5f646e3f5c372240d63ebebba6602"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"b86dd267b8227621544c00db1d91ab702a9b6d58","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    else:"},{"line_number":61,"context_line":"        if built_in:"},{"line_number":62,"context_line":"            try:"},{"line_number":63,"context_line":"                return obj.__qualname__"},{"line_number":64,"context_line":"            except AttributeError:"},{"line_number":65,"context_line":"                return obj.__name__"},{"line_number":66,"context_line":"    pieces \u003d [obj.__name__]"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_b5df1a0c","line":63,"in_reply_to":"da85f559_b518881f","updated":"2015-11-11 03:26:12.000000000","message":"Done","commit_id":"1ce7b21137f5f646e3f5c372240d63ebebba6602"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"27b56db5c335f06a24e935b83a76aa25564a67f2","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            pieces.insert(0, obj.__module__)"},{"line_number":70,"context_line":"        except AttributeError:"},{"line_number":71,"context_line":"            pass"},{"line_number":72,"context_line":"    return \u0027.\u0027.join(pieces)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"def get_all_class_names(obj, up_to\u003dobject):"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_3539f8f2","line":72,"updated":"2015-11-10 19:45:54.000000000","message":"This code looks too complex compared to what it does. I propose something simpler:\n\nif fully_qualified and hasattr(obj, \u0027__module__\u0027):\n   return \u0027%s.%s\u0027 (obj.__module__, obj.__name__)\nelse:\n   return obj.__name__","commit_id":"1ce7b21137f5f646e3f5c372240d63ebebba6602"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"b86dd267b8227621544c00db1d91ab702a9b6d58","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            pieces.insert(0, obj.__module__)"},{"line_number":70,"context_line":"        except AttributeError:"},{"line_number":71,"context_line":"            pass"},{"line_number":72,"context_line":"    return \u0027.\u0027.join(pieces)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"def get_all_class_names(obj, up_to\u003dobject):"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_15c06629","line":72,"in_reply_to":"da85f559_3539f8f2","updated":"2015-11-11 03:26:12.000000000","message":"Done","commit_id":"1ce7b21137f5f646e3f5c372240d63ebebba6602"}]}
