)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"2839e083a759356fcffd6262ab56d4523d59aace","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix \u0027UnicodeEncodeError\u0027 for unicode values in url"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Used \u0027%\u0027 instead of format() because \"%\" formatting operation"},{"line_number":10,"context_line":"returns a unicode string for both unicode and non-unicode"},{"line_number":11,"context_line":"format strings."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a6eadb0_1a52a6dd","line":9,"updated":"2016-12-14 16:28:19.000000000","message":"I\u0027m rather certain you\u0027re misinformed:\n\n    ❯❯❯ python3\n    Python 3.5.2 (default, Oct 11 2016, 04:59:56)\n    [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.38)] on darwin\n    Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n    \u003e\u003e\u003e \"%s\" % (b\u0027foo\u0027,)\n    \"b\u0027foo\u0027\"\n\nThat is most certainly *not* what we want.","commit_id":"01dccd48fa8f5cdfa453b02e1ded3371a11fcf73"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"2839e083a759356fcffd6262ab56d4523d59aace","unresolved":false,"context_lines":[{"line_number":14,"context_line":"to avoid \"UnicodeEncodeError\" and print valid message."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"NOTE:"},{"line_number":17,"context_line":"Not used u\u0027{0}.format(\u003cstr\u003e) because in python 3 everything"},{"line_number":18,"context_line":"is unicode so no need to add explicit \u0027u\u0027 to format string."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: I2fcca96a1356df08453e08487afb62dfec91ba9d"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a6eadb0_3a5f62e6","line":17,"updated":"2016-12-14 16:28:19.000000000","message":"But this code supports Python 2.7 and Python 3.4+ in which u\u0027\u0027 is valid syntax and has *vastly* different behaviour on the two","commit_id":"01dccd48fa8f5cdfa453b02e1ded3371a11fcf73"}],"glanceclient/common/utils.py":[{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"2839e083a759356fcffd6262ab56d4523d59aace","unresolved":false,"context_lines":[{"line_number":288,"context_line":""},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"def print_err(msg):"},{"line_number":291,"context_line":"    print(encodeutils.safe_encode(msg), file\u003dsys.stderr)"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"def save_image(data, path):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_fa56cad0","line":291,"updated":"2016-12-14 16:28:19.000000000","message":"I\u0027m not convinced this is the correct behaviour on both Python 2 and Python 3","commit_id":"01dccd48fa8f5cdfa453b02e1ded3371a11fcf73"}],"glanceclient/v2/metadefs.py":[{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"2839e083a759356fcffd6262ab56d4523d59aace","unresolved":false,"context_lines":[{"line_number":41,"context_line":"            url \u003d \u0027/v2/metadefs/namespaces/%s%s\u0027 % ("},{"line_number":42,"context_line":"                namespace, query_params)"},{"line_number":43,"context_line":"        else:"},{"line_number":44,"context_line":"            url \u003d \u0027/v2/metadefs/namespaces/%s\u0027 % (namespace)"},{"line_number":45,"context_line":"        return url"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def create(self, **kwargs):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_5a625eae","line":44,"updated":"2016-12-14 16:28:19.000000000","message":"You\u0027ve not actually produced a tuple here.\n\n    (value) \u003d\u003d value\n\nYou need to do\n\n    (value,)","commit_id":"01dccd48fa8f5cdfa453b02e1ded3371a11fcf73"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"2839e083a759356fcffd6262ab56d4523d59aace","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            if elem in namespace:"},{"line_number":79,"context_line":"                del namespace[elem]"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        url \u003d self._construct_url(namespace_name)"},{"line_number":82,"context_line":"        self.http_client.put(url, data\u003dnamespace)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        return self.get(namespace.namespace)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_7a59dafd","line":81,"updated":"2016-12-14 16:28:19.000000000","message":"How does this refactoring fix a UnicodeEncodeError? You\u0027re doing the same thing with the modulo operator.","commit_id":"01dccd48fa8f5cdfa453b02e1ded3371a11fcf73"},{"author":{"_account_id":20182,"name":"Bhagyashri Shewale","email":"bshewale@redhat.com","username":"bhagyashris"},"change_message_id":"d4003409b2fcb92427d475430f88aa905cc2a21d","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            if elem in namespace:"},{"line_number":79,"context_line":"                del namespace[elem]"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        url \u003d self._construct_url(namespace_name)"},{"line_number":82,"context_line":"        self.http_client.put(url, data\u003dnamespace)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        return self.get(namespace.namespace)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da4df55a_b7ad958a","line":81,"in_reply_to":"1a6eadb0_7a59dafd","updated":"2016-12-22 11:02:43.000000000","message":"As the format() function doesn\u0027t support the codec of 4byte unicode symbol (eg. u\u0027\\U0001f693\u0027) shown below:\n\nopenstack@openstack-VirtualBox:~$ python2\nPython 2.7.6 (default, Oct 26 2016, 20:30:19)\n[GCC 4.8.4] on linux2\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n\n\u003e\u003e\u003e \u0027{0}\u0027.format(u\u0027\\U0001f693\u0027)\nTraceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\nUnicodeEncodeError: \u0027ascii\u0027 codec can\u0027t encode character u\u0027\\U0001f693\u0027 in position 0: ordinal not in range(128)\n\n\u003e\u003e\u003e \u0027%s\u0027 % (u\u0027\\U0001f693\u0027)\nu\u0027\\U0001f693\u0027\n\nAs the \"%s\" module operator supports and parse codec sucessfully.","commit_id":"01dccd48fa8f5cdfa453b02e1ded3371a11fcf73"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"2839e083a759356fcffd6262ab56d4523d59aace","unresolved":false,"context_lines":[{"line_number":255,"context_line":"            url \u003d \u0027/v2/metadefs/namespaces/%s/properties/%s\u0027 % ("},{"line_number":256,"context_line":"                namespace, query_params)"},{"line_number":257,"context_line":"        else:"},{"line_number":258,"context_line":"            url \u003d \u0027/v2/metadefs/namespaces/%s/properties\u0027 % (namespace)"},{"line_number":259,"context_line":"        return url"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"    def create(self, namespace, **kwargs):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_9a5cf6ee","line":258,"updated":"2016-12-14 16:28:19.000000000","message":"Same note as above","commit_id":"01dccd48fa8f5cdfa453b02e1ded3371a11fcf73"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"2839e083a759356fcffd6262ab56d4523d59aace","unresolved":false,"context_lines":[{"line_number":339,"context_line":"            url \u003d \u0027/v2/metadefs/namespaces/%s/objects/%s\u0027 % ("},{"line_number":340,"context_line":"                namespace, query_params)"},{"line_number":341,"context_line":"        else:"},{"line_number":342,"context_line":"            url \u003d \u0027/v2/metadefs/namespaces/%s/objects\u0027 % (namespace)"},{"line_number":343,"context_line":"        return url"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"    def create(self, namespace, **kwargs):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_ba73727f","line":342,"updated":"2016-12-14 16:28:19.000000000","message":"Same note as above","commit_id":"01dccd48fa8f5cdfa453b02e1ded3371a11fcf73"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"2839e083a759356fcffd6262ab56d4523d59aace","unresolved":false,"context_lines":[{"line_number":427,"context_line":"            url \u003d \u0027/v2/metadefs/namespaces/%s/tags/%s\u0027 % ("},{"line_number":428,"context_line":"                namespace, query_params)"},{"line_number":429,"context_line":"        else:"},{"line_number":430,"context_line":"            url \u003d \u0027/v2/metadefs/namespaces/%s/tags\u0027 % (namespace)"},{"line_number":431,"context_line":"        return url"},{"line_number":432,"context_line":""},{"line_number":433,"context_line":"    def create(self, namespace, tag_name):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_da6e6e95","line":430,"updated":"2016-12-14 16:28:19.000000000","message":"Same note as above","commit_id":"01dccd48fa8f5cdfa453b02e1ded3371a11fcf73"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"79acb54d307220add9874d77c148d9623bade776","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        return warlock.model_factory(schema.raw(),"},{"line_number":38,"context_line":"                                     base_class\u003dschemas.SchemaBasedModel)"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def _construct_url(self, namespace, query_params\u003dNone):"},{"line_number":41,"context_line":"        if query_params:"},{"line_number":42,"context_line":"            url \u003d \u0027/v2/metadefs/namespaces/%s%s\u0027 % ("},{"line_number":43,"context_line":"                namespace, query_params)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da4df55a_60827302","line":40,"range":{"start_line":40,"start_character":8,"end_line":40,"end_character":22},"updated":"2016-12-22 16:29:32.000000000","message":"I feel like these functions are mostly duplicate code with the exception of the different query paths. I think they should be refactored into a single utility function, with the last query segment passed as additional argument.","commit_id":"4983431101468c29924f56484835273f3ec350cd"}]}
