)]}'
{"marconi/queues/storage/sqlalchemy/claims.py":[{"author":{"_account_id":10777,"name":"Nataliia Uvarova","email":"grafinya.uvarova@gmail.com","username":"AAzza"},"change_message_id":"912db7f027eb15ea8aad1945baede53c782dcb3e","unresolved":false,"context_lines":[{"line_number":46,"context_line":"                \u0027id\u0027: utils.msgid_encode(int(id)),"},{"line_number":47,"context_line":"                \u0027ttl\u0027: ttl,"},{"line_number":48,"context_line":"                \u0027age\u0027: (timeutils.utcnow() - created).seconds,"},{"line_number":49,"context_line":"                \u0027body\u0027: utils.json_decode(body),"},{"line_number":50,"context_line":"            }"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def get(self, queue, claim_id, project\u003dNone):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3ae8d1ca_39de4a40","line":49,"updated":"2014-05-28 10:10:12.000000000","message":"This line accidentally fixes the bug https://bugs.launchpad.net/marconi/+bug/1321840. But since I\u0027m not sure if it is a bug or a feature, I ask someone to clarify this.\n\nThe reasons of such behavior, that originally body in this line is string (in python 3 even `bytes`), not object and in resulting response it remains string.","commit_id":"1dd8bda1717d6cb33616f0fb73d604dd4d62abf6"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"c7bbf3fe1a5db0292852bd43a9ab76ed15f92135","unresolved":false,"context_lines":[{"line_number":46,"context_line":"                \u0027id\u0027: utils.msgid_encode(int(id)),"},{"line_number":47,"context_line":"                \u0027ttl\u0027: ttl,"},{"line_number":48,"context_line":"                \u0027age\u0027: (timeutils.utcnow() - created).seconds,"},{"line_number":49,"context_line":"                \u0027body\u0027: utils.json_decode(body),"},{"line_number":50,"context_line":"            }"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def get(self, queue, claim_id, project\u003dNone):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3ae8d1ca_7abef9d5","line":49,"in_reply_to":"3ae8d1ca_03c2f7e8","updated":"2014-05-28 14:39:54.000000000","message":"Nice!","commit_id":"1dd8bda1717d6cb33616f0fb73d604dd4d62abf6"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"6fc8d0e7bb06b07a4dba5813d94d364a004d2cdf","unresolved":false,"context_lines":[{"line_number":46,"context_line":"                \u0027id\u0027: utils.msgid_encode(int(id)),"},{"line_number":47,"context_line":"                \u0027ttl\u0027: ttl,"},{"line_number":48,"context_line":"                \u0027age\u0027: (timeutils.utcnow() - created).seconds,"},{"line_number":49,"context_line":"                \u0027body\u0027: utils.json_decode(body),"},{"line_number":50,"context_line":"            }"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def get(self, queue, claim_id, project\u003dNone):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3ae8d1ca_03c2f7e8","line":49,"in_reply_to":"3ae8d1ca_39de4a40","updated":"2014-05-28 13:24:37.000000000","message":"It was a bug, thanks! :)","commit_id":"1dd8bda1717d6cb33616f0fb73d604dd4d62abf6"}],"marconi/queues/storage/sqlalchemy/queues.py":[{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"f66ddfb888a361615ec673c4035896b367c5d068","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        try:"},{"line_number":76,"context_line":"            ins \u003d tables.Queues.insert().values(project\u003dproject, name\u003dname,"},{"line_number":77,"context_line":"                                                metadata\u003dutils.json_encode({}))"},{"line_number":78,"context_line":"            res \u003d self.driver.run(ins)"},{"line_number":79,"context_line":"        except sa.exc.IntegrityError:"},{"line_number":80,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_7e5f0d73","line":77,"updated":"2014-05-29 21:28:29.000000000","message":"Seems like we might as well just specify the bytestring directly since it is so trivial, e.g: b\u0027{}\u0027","commit_id":"7adaf3aa4d18fd8149efdfedb87b73667ef7f7e3"}],"marconi/queues/storage/sqlalchemy/utils.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"73f10b1d843c6369394f70f3c62f5d6608614020","unresolved":false,"context_lines":[{"line_number":125,"context_line":""},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"def json_encode(obj):"},{"line_number":128,"context_line":"    return json.dumps(obj).encode(\u0027utf-8\u0027)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"def json_decode(binary):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5adbc538_f72b2d2e","line":128,"updated":"2014-05-26 12:08:57.000000000","message":"There\u0027s an oslo module called `strutils` that has 2 functions to safely encode/decode strings and it\u0027s py3k compatible, AFAIK. I\u0027d recommend copying strutils into marconi and using that one.","commit_id":"d67c504e48d2493ab018d4d4de14372fa0ea9ee8"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"6fc8d0e7bb06b07a4dba5813d94d364a004d2cdf","unresolved":false,"context_lines":[{"line_number":125,"context_line":"    }"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"def json_encode(obj):"},{"line_number":129,"context_line":"    return strutils.safe_encode(json.dumps(obj), \u0027utf-8\u0027)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3ae8d1ca_832287b7","line":128,"updated":"2014-05-28 13:24:37.000000000","message":"What do you think about using jsonutils from oslo instead of these 2 new functions? We already have this module in Marconi.\n\nhttps://github.com/openstack/oslo-incubator/blob/master/openstack/common/jsonutils.py#L171","commit_id":"1dd8bda1717d6cb33616f0fb73d604dd4d62abf6"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"daa7ab2dcf9ff57f04fc58479b43191470833fea","unresolved":false,"context_lines":[{"line_number":125,"context_line":"    }"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"def json_encode(obj):"},{"line_number":129,"context_line":"    return strutils.safe_encode(json.dumps(obj), \u0027utf-8\u0027)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3ae8d1ca_7edc0de5","line":128,"in_reply_to":"3ae8d1ca_5dd13756","updated":"2014-05-29 10:00:57.000000000","message":"After talking with Nataliia on IRC, she explained why we need these 2 new functions and why using jsonutils in this case is not possible. I\u0027m happy to let this patch land as-is modulo using jsonutils in these 2 functions.","commit_id":"1dd8bda1717d6cb33616f0fb73d604dd4d62abf6"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"c7bbf3fe1a5db0292852bd43a9ab76ed15f92135","unresolved":false,"context_lines":[{"line_number":125,"context_line":"    }"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"def json_encode(obj):"},{"line_number":129,"context_line":"    return strutils.safe_encode(json.dumps(obj), \u0027utf-8\u0027)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3ae8d1ca_7aba79c1","line":128,"in_reply_to":"3ae8d1ca_832287b7","updated":"2014-05-28 14:39:54.000000000","message":"Since we already pull in those functions (as of the parent patch of this patch!), I think it\u0027d be great to use them.","commit_id":"1dd8bda1717d6cb33616f0fb73d604dd4d62abf6"},{"author":{"_account_id":10777,"name":"Nataliia Uvarova","email":"grafinya.uvarova@gmail.com","username":"AAzza"},"change_message_id":"c1847b2b9199952946d9daca222a963dd563f134","unresolved":false,"context_lines":[{"line_number":125,"context_line":"    }"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"def json_encode(obj):"},{"line_number":129,"context_line":"    return strutils.safe_encode(json.dumps(obj), \u0027utf-8\u0027)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3ae8d1ca_5dd13756","line":128,"in_reply_to":"3ae8d1ca_832287b7","updated":"2014-05-28 15:00:35.000000000","message":"The purpose of these functions is to do transformation between `bytes` \u003c-\u003e object. I considered the ability to use the functions from the jsonutils, but their purpose is to do transformation obj \u003c-\u003e text strings.\n\nAlthough json_decode is almost identical to jsonutils.loads and actually the latter can be used, the json_decode is not similar to jsonutils.dumps, since the first produce `bytes` and the second - unicode string.\n\nAnd since we should have one of two, for clarity I left both :)","commit_id":"1dd8bda1717d6cb33616f0fb73d604dd4d62abf6"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"f66ddfb888a361615ec673c4035896b367c5d068","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from sqlalchemy import exc"},{"line_number":20,"context_line":"from sqlalchemy.sql import func as sfunc"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from marconi.openstack.common import jsonutils"},{"line_number":23,"context_line":"from marconi.openstack.common import log as logging"},{"line_number":24,"context_line":"from marconi.openstack.common import strutils"},{"line_number":25,"context_line":"from marconi.queues.storage import errors"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_5e8331cc","line":22,"updated":"2014-05-29 21:28:29.000000000","message":"IMO, we don\u0027t need to use jsonutils here; as far as I can tell, it just adds support for simplejson to give a little speed boost on Python 2.6; however, the sqlalchemy driver is for development only, so speed is less of an issue.\n\nIn fact, jsonutils will only use simplejson if it is already installed, and we don\u0027t have it as a dependency currently. If we want to start adopting jsonutils, we should consider bringing back simplejson (we had it once upon a time), but only installing it for python 2.6 envs.","commit_id":"7adaf3aa4d18fd8149efdfedb87b73667ef7f7e3"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"cd7463636b319c7dd96d4f18b785efa1336857ff","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from sqlalchemy import exc"},{"line_number":20,"context_line":"from sqlalchemy.sql import func as sfunc"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from marconi.openstack.common import jsonutils"},{"line_number":23,"context_line":"from marconi.openstack.common import log as logging"},{"line_number":24,"context_line":"from marconi.openstack.common import strutils"},{"line_number":25,"context_line":"from marconi.queues.storage import errors"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_6ecbbb72","line":22,"in_reply_to":"1ae5cdf2_02105000","updated":"2014-05-30 17:56:50.000000000","message":"OK, I see. `loads` does indeed become more useful given [1]. I have a tiny concern that jumping through these extra functions is going to be a little slower, but that probably won\u0027t be significant. Hopefully we\u0027ll have some benchmarking tools ready soon to verify this. Also, mitigating factors include (a) PyPy, and (b) support for MessagePack in the API.","commit_id":"7adaf3aa4d18fd8149efdfedb87b73667ef7f7e3"},{"author":{"_account_id":10777,"name":"Nataliia Uvarova","email":"grafinya.uvarova@gmail.com","username":"AAzza"},"change_message_id":"855444262629ff720c17490a5f18078e1cd450bd","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from sqlalchemy import exc"},{"line_number":20,"context_line":"from sqlalchemy.sql import func as sfunc"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from marconi.openstack.common import jsonutils"},{"line_number":23,"context_line":"from marconi.openstack.common import log as logging"},{"line_number":24,"context_line":"from marconi.openstack.common import strutils"},{"line_number":25,"context_line":"from marconi.queues.storage import errors"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_02105000","line":22,"in_reply_to":"1ae5cdf2_5e8331cc","updated":"2014-05-30 16:21:46.000000000","message":"One of the advantages to use jsonutils, since that commit [1] is has explicit input string decoding, and thus by using it you are safe to do json loads for both py2 and py3 not thinking if input is bytes or text.\n\nIt is not that important for this particular commit, but I have plans to use jsonutils heavily in next one, since it allows to do py3 fixes in least disturbing way: just by using `loads` from the another module, you end up with py3 compatibility.\n\nIf there is some problem with jsonutils and simplejson, I think we should discuss it and agree, whether it is ok to use it. But i suppose if simplejson is not installed, as in our case, it shouldn\u0027t hurt anything.\n\n[1] https://review.openstack.org/95694","commit_id":"7adaf3aa4d18fd8149efdfedb87b73667ef7f7e3"}],"openstack-common.conf":[{"author":{"_account_id":10777,"name":"Nataliia Uvarova","email":"grafinya.uvarova@gmail.com","username":"AAzza"},"change_message_id":"25fbe617a6da0d054a22cf2b2a6b2bd06922476a","unresolved":false,"context_lines":[{"line_number":9,"context_line":"module\u003dlockutils"},{"line_number":10,"context_line":"module\u003dlog"},{"line_number":11,"context_line":"module\u003dsetup"},{"line_number":12,"context_line":"module\u003dstrutils"},{"line_number":13,"context_line":"module\u003dtimeutils"},{"line_number":14,"context_line":"module\u003dversion"},{"line_number":15,"context_line":""}],"source_content_type":"text/plain","patch_set":2,"id":"5adbc538_8420ecf8","line":12,"updated":"2014-05-26 18:42:48.000000000","message":"Not sure, if I should add this line","commit_id":"e03f040ca5fd18aa3aee99ae2a63c40fa5195aa9"}]}
