)]}'
{"neutron/objects/db/api.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"55cdbabd59caa011c5d4933c58f9b370c5fc7502","unresolved":false,"context_lines":[{"line_number":22,"context_line":"# Common database operation implementations"},{"line_number":23,"context_line":"def _get_filter_query(obj_cls, context, **kwargs):"},{"line_number":24,"context_line":"    with obj_cls.db_context_reader(context):"},{"line_number":25,"context_line":"        filters \u003d _kwargs_to_get_objectsilters(**kwargs)"},{"line_number":26,"context_line":"        query \u003d model_query.get_collection_query("},{"line_number":27,"context_line":"            context, obj_cls.db_model, filters)"},{"line_number":28,"context_line":"        return query"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_4344d9b7","line":25,"updated":"2019-10-03 15:43:14.000000000","message":"This looks like a typo, unless by branch isn\u0027t up-to-date","commit_id":"c4082c14cc2499281be6b88e0c64f3158772cb8a"}],"neutron/privileged/agent/linux/ip_lib.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"9e49440c26aa94359940c85eeca487b6c476a3b8","unresolved":false,"context_lines":[{"line_number":544,"context_line":"    elif isinstance(value, netlink.nla_base) and six.PY3:"},{"line_number":545,"context_line":"        return make_serializable(value.dump())"},{"line_number":546,"context_line":"    elif isinstance(value, dict):"},{"line_number":547,"context_line":"        return {str(key.decode(\u0027utf-8\u0027)) if isinstance(key, six.binary_type)"},{"line_number":548,"context_line":"                else key: make_serializable(data)"},{"line_number":549,"context_line":"                for key, data in value.items()}"},{"line_number":550,"context_line":"    elif isinstance(value, tuple):"},{"line_number":551,"context_line":"        return tuple(make_serializable(item) for item in value)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_622608d1","line":548,"range":{"start_line":547,"start_character":16,"end_line":548,"end_character":24},"updated":"2019-10-15 07:05:27.000000000","message":"This expression is a bit difficult to read because a part from str(....) to \"else key\" is a key of dict and \"make_serializable(data)\" is a value of dict.\n\nL.547 and L.552 are almost same.\n\nHow about make this a function like _ensure_string() and use it here? It would be simpler.\n\n  return {_ensure_string(key): make_serializaable(data)\n          for key, data in value.items()}","commit_id":"cb515400c763cf2a341d0adea105a392ecef7aa0"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"d85ae23e167e0195bcefaf2a5e891e74b6d27d11","unresolved":false,"context_lines":[{"line_number":544,"context_line":"    elif isinstance(value, netlink.nla_base) and six.PY3:"},{"line_number":545,"context_line":"        return make_serializable(value.dump())"},{"line_number":546,"context_line":"    elif isinstance(value, dict):"},{"line_number":547,"context_line":"        return {str(key.decode(\u0027utf-8\u0027)) if isinstance(key, six.binary_type)"},{"line_number":548,"context_line":"                else key: make_serializable(data)"},{"line_number":549,"context_line":"                for key, data in value.items()}"},{"line_number":550,"context_line":"    elif isinstance(value, tuple):"},{"line_number":551,"context_line":"        return tuple(make_serializable(item) for item in value)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_fa293489","line":548,"range":{"start_line":547,"start_character":16,"end_line":548,"end_character":24},"in_reply_to":"3fa7e38b_622608d1","updated":"2019-10-15 17:19:00.000000000","message":"Done","commit_id":"cb515400c763cf2a341d0adea105a392ecef7aa0"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"9e49440c26aa94359940c85eeca487b6c476a3b8","unresolved":false,"context_lines":[{"line_number":549,"context_line":"                for key, data in value.items()}"},{"line_number":550,"context_line":"    elif isinstance(value, tuple):"},{"line_number":551,"context_line":"        return tuple(make_serializable(item) for item in value)"},{"line_number":552,"context_line":"    return (str(value.decode(\u0027utf-8\u0027)) if isinstance(value, six.binary_type)"},{"line_number":553,"context_line":"            else value)"},{"line_number":554,"context_line":""},{"line_number":555,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_8221c4b6","line":552,"range":{"start_line":552,"start_character":12,"end_line":552,"end_character":29},"updated":"2019-10-15 07:05:27.000000000","message":"This is a magic, but it looks required to ensure \"value\" to be a string.\n\nIn python2, decode converts a string to a unicode string and str() converts a unicode string to a string.\n\nIn python3, decode() converts a byte string to a string and str() does nothing.","commit_id":"cb515400c763cf2a341d0adea105a392ecef7aa0"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"d85ae23e167e0195bcefaf2a5e891e74b6d27d11","unresolved":false,"context_lines":[{"line_number":549,"context_line":"                for key, data in value.items()}"},{"line_number":550,"context_line":"    elif isinstance(value, tuple):"},{"line_number":551,"context_line":"        return tuple(make_serializable(item) for item in value)"},{"line_number":552,"context_line":"    return (str(value.decode(\u0027utf-8\u0027)) if isinstance(value, six.binary_type)"},{"line_number":553,"context_line":"            else value)"},{"line_number":554,"context_line":""},{"line_number":555,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_9aab60d4","line":552,"range":{"start_line":552,"start_character":12,"end_line":552,"end_character":29},"in_reply_to":"3fa7e38b_8221c4b6","updated":"2019-10-15 17:19:00.000000000","message":"That\u0027s the point. In py2 I always have strings and this step is not needed. In py3 I can have bytes that need to be converted to str().\n\nI\u0027ll add a TODO: In PY3, str() conversion is not needed and six.binary_type can be replaced with bytes.","commit_id":"cb515400c763cf2a341d0adea105a392ecef7aa0"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"104dfafe7957ada72bf34f646806f2dae1d089d8","unresolved":false,"context_lines":[{"line_number":538,"context_line":"    of two elements."},{"line_number":539,"context_line":"    \"\"\""},{"line_number":540,"context_line":"    def _ensure_string(value):"},{"line_number":541,"context_line":"        # NOTE(ralonsoh): once PY2 is deprecated, the str() conversion will be"},{"line_number":542,"context_line":"        # no needed and six.binary_type --\u003e bytes."},{"line_number":543,"context_line":"        return (str(value.decode(\u0027utf-8\u0027))"},{"line_number":544,"context_line":"                if isinstance(value, six.binary_type) else value)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3fa7e38b_4a0f502d","line":541,"range":{"start_line":541,"start_character":38,"end_line":541,"end_character":48},"updated":"2019-10-16 08:08:42.000000000","message":"nit: I think it\u0027s deprecated even now. Here should be \"once support for PY2 is dropped\"","commit_id":"592b44629905d68b39ec92604b882627f4844908"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"d930b2bedc9d4455d2e2afe61484f16f7a03c5a3","unresolved":false,"context_lines":[{"line_number":538,"context_line":"    of two elements."},{"line_number":539,"context_line":"    \"\"\""},{"line_number":540,"context_line":"    def _ensure_string(value):"},{"line_number":541,"context_line":"        # NOTE(ralonsoh): once PY2 is deprecated, the str() conversion will be"},{"line_number":542,"context_line":"        # no needed and six.binary_type --\u003e bytes."},{"line_number":543,"context_line":"        return (str(value.decode(\u0027utf-8\u0027))"},{"line_number":544,"context_line":"                if isinstance(value, six.binary_type) else value)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3fa7e38b_1240a6a4","line":541,"range":{"start_line":541,"start_character":38,"end_line":541,"end_character":48},"in_reply_to":"3fa7e38b_4a0f502d","updated":"2019-10-16 15:13:30.000000000","message":"Not deprecated yet - I believe that happens when https://pythonclock.org/ reaches zero - but your wording is better.  But I think anyone coming along will understand what is meant, so LGTM.","commit_id":"592b44629905d68b39ec92604b882627f4844908"}]}
