)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"c0dfab2e5f1a2fee54f6ed03b9027019bc7d686b","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Ethan Lynn \u003cxjunlin@cn.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-10-14 10:38:57 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Use six.text_type to replace str in heat engine"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When using template which contains unicode, to create"},{"line_number":10,"context_line":"stack will failed with encode/decode error."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"baa201ad_6159dd5a","line":7,"updated":"2014-10-14 09:02:52.000000000","message":"Patch looks nice, but commit header is a little confused for me. It sounds like you want to switch all str in heat/engine. \nI\u0027d prefer to note that you add unicode  support for some classes and to add index of this change (part 1)  if you plan to replace all str","commit_id":"83811dba0a6df13e033d98275cb981daadba7bae"}],"heat/engine/dependencies.py":[{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"97735bae85f45651aaeb0356b48a573825acc94b","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def __str__(self):"},{"line_number":87,"context_line":"        \u0027\u0027\u0027Return a human-readable string representation of the node.\u0027\u0027\u0027"},{"line_number":88,"context_line":"        text \u003d \u0027{%s}\u0027 % \u0027, \u0027.join(str(n) for n in self)"},{"line_number":89,"context_line":"        return encodeutils.safe_encode(text)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def __unicode__(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a1a9d01_ce1cf079","line":88,"updated":"2015-10-02 14:11:06.000000000","message":"It\u0027s probably wrong to use str() here and then safe_encode below - if the \u0027n\u0027s are already encoded then this will double-encode them. So in this case we should use six.text_type() instead and then encode... but see comment on next line.","commit_id":"04f027193131072757bbcc1558de19367147c45d"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"97735bae85f45651aaeb0356b48a573825acc94b","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    def __str__(self):"},{"line_number":87,"context_line":"        \u0027\u0027\u0027Return a human-readable string representation of the node.\u0027\u0027\u0027"},{"line_number":88,"context_line":"        text \u003d \u0027{%s}\u0027 % \u0027, \u0027.join(str(n) for n in self)"},{"line_number":89,"context_line":"        return encodeutils.safe_encode(text)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def __unicode__(self):"},{"line_number":92,"context_line":"        \u0027\u0027\u0027Return a human-readable string representation of the node.\u0027\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a1a9d01_4e3c602f","line":89,"updated":"2015-10-02 14:11:06.000000000","message":"Doing this is good for unicode support but bad for Python3 compatibility. We should instead be using the class decorator @six.python_2_unicode_compatible\n\nhttp://pythonhosted.org/six/#six.python_2_unicode_compatible\n\nOther classes in this file need to be similarly converted (also, it follows that if you use this decorator, then you _should_ use six.text_type in the __str__ methods.","commit_id":"04f027193131072757bbcc1558de19367147c45d"},{"author":{"_account_id":7404,"name":"Ethan Lynn","email":"xuanlangjian@gmail.com","username":"GaryLynn"},"change_message_id":"b9ce8d347d1ee5b3a3fe3bfd69f2b4a42bf20c8e","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    def __str__(self):"},{"line_number":87,"context_line":"        \u0027\u0027\u0027Return a human-readable string representation of the node.\u0027\u0027\u0027"},{"line_number":88,"context_line":"        text \u003d \u0027{%s}\u0027 % \u0027, \u0027.join(str(n) for n in self)"},{"line_number":89,"context_line":"        return encodeutils.safe_encode(text)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def __unicode__(self):"},{"line_number":92,"context_line":"        \u0027\u0027\u0027Return a human-readable string representation of the node.\u0027\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a2fa921_e54d4bc5","line":89,"in_reply_to":"9a1a9d01_4e3c602f","updated":"2015-10-13 07:19:42.000000000","message":"Latest codes already use @six.python_2_unicode_compatible instead.","commit_id":"04f027193131072757bbcc1558de19367147c45d"},{"author":{"_account_id":4715,"name":"Angus Salkeld","email":"asalkeld@redhat.com","username":"asalkeld"},"change_message_id":"6fb37ecdaecc880375f709ac9b860945816d24f5","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def __unicode__(self):"},{"line_number":151,"context_line":"        \u0027\u0027\u0027Convert the graph to a human-readable string.\u0027\u0027\u0027"},{"line_number":152,"context_line":"        pairs \u003d (\u0027%s: %s\u0027 % (unicode(k), unicode(v))"},{"line_number":153,"context_line":"                 for k, v in six.iteritems(self))"},{"line_number":154,"context_line":"        text \u003d \u0027{%s}\u0027 % \u0027, \u0027.join(pairs)"},{"line_number":155,"context_line":"        return encodeutils.safe_decode(text)"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa201ad_b7a3c39c","line":152,"updated":"2014-10-16 03:03:04.000000000","message":"shouldn\u0027t this be: (from https://pythonhosted.org/six/)\n\n  six.text_type()\n\n    Type for representing (Unicode) textual data. This is unicode() in Python 2 and str in Python 3.","commit_id":"04f027193131072757bbcc1558de19367147c45d"},{"author":{"_account_id":7404,"name":"Ethan Lynn","email":"xuanlangjian@gmail.com","username":"GaryLynn"},"change_message_id":"d5fee0cb63d92cdc8797e9cef57e07670f607c37","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def __unicode__(self):"},{"line_number":151,"context_line":"        \u0027\u0027\u0027Convert the graph to a human-readable string.\u0027\u0027\u0027"},{"line_number":152,"context_line":"        pairs \u003d (\u0027%s: %s\u0027 % (unicode(k), unicode(v))"},{"line_number":153,"context_line":"                 for k, v in six.iteritems(self))"},{"line_number":154,"context_line":"        text \u003d \u0027{%s}\u0027 % \u0027, \u0027.join(pairs)"},{"line_number":155,"context_line":"        return encodeutils.safe_decode(text)"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa201ad_f251d9d9","line":152,"in_reply_to":"baa201ad_b7a3c39c","updated":"2014-10-16 04:00:02.000000000","message":"__unicode__() function overrides origin unicode() function when call unicode(self). so in __unicode__ function we should use unicode.\n\nWhen we using six.text_type(self), we actually calling unicode(self), which is override by __unicode__, so in __unicode__ function, we should use unicode() to return unicode string. In __str__ function, we should use str() to return encoded string.","commit_id":"04f027193131072757bbcc1558de19367147c45d"},{"author":{"_account_id":4715,"name":"Angus Salkeld","email":"asalkeld@redhat.com","username":"asalkeld"},"change_message_id":"6fb37ecdaecc880375f709ac9b860945816d24f5","unresolved":false,"context_lines":[{"line_number":240,"context_line":"        \u0027\u0027\u0027"},{"line_number":241,"context_line":"        Return a human-readable string representation of the dependency graph"},{"line_number":242,"context_line":"        \u0027\u0027\u0027"},{"line_number":243,"context_line":"        return str(self._graph)"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"    def __unicode__(self):"},{"line_number":246,"context_line":"        \u0027\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa201ad_d7ce8759","line":243,"updated":"2014-10-16 03:03:04.000000000","message":"six.text_type()","commit_id":"04f027193131072757bbcc1558de19367147c45d"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"97735bae85f45651aaeb0356b48a573825acc94b","unresolved":false,"context_lines":[{"line_number":240,"context_line":"        \u0027\u0027\u0027"},{"line_number":241,"context_line":"        Return a human-readable string representation of the dependency graph"},{"line_number":242,"context_line":"        \u0027\u0027\u0027"},{"line_number":243,"context_line":"        return str(self._graph)"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"    def __unicode__(self):"},{"line_number":246,"context_line":"        \u0027\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a1a9d01_d1781192","line":243,"in_reply_to":"baa201ad_12665dbb","updated":"2015-10-02 14:11:06.000000000","message":"Yeah, this is actually correct, but it would be better to use the @six.python_2_unicode_compatible decorator and six.text_type instead of adding a __unicode__ method explicitly.","commit_id":"04f027193131072757bbcc1558de19367147c45d"},{"author":{"_account_id":7404,"name":"Ethan Lynn","email":"xuanlangjian@gmail.com","username":"GaryLynn"},"change_message_id":"d5fee0cb63d92cdc8797e9cef57e07670f607c37","unresolved":false,"context_lines":[{"line_number":240,"context_line":"        \u0027\u0027\u0027"},{"line_number":241,"context_line":"        Return a human-readable string representation of the dependency graph"},{"line_number":242,"context_line":"        \u0027\u0027\u0027"},{"line_number":243,"context_line":"        return str(self._graph)"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"    def __unicode__(self):"},{"line_number":246,"context_line":"        \u0027\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa201ad_12665dbb","line":243,"in_reply_to":"baa201ad_d7ce8759","updated":"2014-10-16 04:00:02.000000000","message":"It\u0027s right to use str() in __str__ function.\n\nstr(self._graph) is actually calling Graph.__str__ function which I handle in L144","commit_id":"04f027193131072757bbcc1558de19367147c45d"}]}
