)]}'
{"marconi/queues/storage/mongodb/utils.py":[{"author":{"_account_id":10777,"name":"Nataliia Uvarova","email":"grafinya.uvarova@gmail.com","username":"AAzza"},"change_message_id":"43b2baed796f70c3a0f56904d4bdee8f4a52867f","unresolved":false,"context_lines":[{"line_number":237,"context_line":"    # NOTE(kgriffs): For small numbers of partitions, crc32 will"},{"line_number":238,"context_line":"    # provide a uniform distribution. This was verified experimentally"},{"line_number":239,"context_line":"    # with up to 100 partitions."},{"line_number":240,"context_line":"    return binascii.crc32(name.encode(\u0027utf-8\u0027)) % num_partitions"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"def raises_conn_error(func):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_769e72ba","line":240,"updated":"2014-06-05 19:09:15.000000000","message":"Have doubts about using \u0027utf-8\u0027 here. Actually if project is ascii only, than we can safely use \u0027ascii\u0027 codec here.\n\nBut maybe better always use utf-8 since it is superset of ascii and will work any way?","commit_id":"384d613f5e50d7441fadcf289987f398ef6a8a1e"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"1a14efdc380de376a6b3148ede69fadea07758a6","unresolved":false,"context_lines":[{"line_number":237,"context_line":"    # NOTE(kgriffs): For small numbers of partitions, crc32 will"},{"line_number":238,"context_line":"    # provide a uniform distribution. This was verified experimentally"},{"line_number":239,"context_line":"    # with up to 100 partitions."},{"line_number":240,"context_line":"    return binascii.crc32(name.encode(\u0027utf-8\u0027)) % num_partitions"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"def raises_conn_error(func):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_7961a7a7","line":240,"in_reply_to":"1ae5cdf2_769e72ba","updated":"2014-06-09 20:17:09.000000000","message":"I think utf-8 is just fine. The \u0027ascii\u0027 codec is a few nanoseconds faster, but that isn\u0027t enough to matter IMO.","commit_id":"384d613f5e50d7441fadcf289987f398ef6a8a1e"}],"marconi/queues/storage/sqlalchemy/utils.py":[{"author":{"_account_id":10777,"name":"Nataliia Uvarova","email":"grafinya.uvarova@gmail.com","username":"AAzza"},"change_message_id":"43b2baed796f70c3a0f56904d4bdee8f4a52867f","unresolved":false,"context_lines":[{"line_number":90,"context_line":"def marker_encode(id):"},{"line_number":91,"context_line":"    # NOTE(AAzza): cannot use oct(id) here, because on Python 3 it returns"},{"line_number":92,"context_line":"    # string with prefix \u00270o\u0027, whereas on Python 2 prefix is just \u00270\u0027"},{"line_number":93,"context_line":"    return \u0027{0:o}\u0027.format(id ^ 0x3c96a355)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"def marker_decode(id):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_1b0ab725","line":93,"updated":"2014-06-05 19:09:15.000000000","message":"If string formatting is not good here, we can always do smth like\n\nv \u003d oct(id ^0x3c96a355)\nif six.PY2:\n    return v[1:]\nelse:\n   return v[2:]\n\nbut it is not better. in my opinion.","commit_id":"384d613f5e50d7441fadcf289987f398ef6a8a1e"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"1a14efdc380de376a6b3148ede69fadea07758a6","unresolved":false,"context_lines":[{"line_number":90,"context_line":"def marker_encode(id):"},{"line_number":91,"context_line":"    # NOTE(AAzza): cannot use oct(id) here, because on Python 3 it returns"},{"line_number":92,"context_line":"    # string with prefix \u00270o\u0027, whereas on Python 2 prefix is just \u00270\u0027"},{"line_number":93,"context_line":"    return \u0027{0:o}\u0027.format(id ^ 0x3c96a355)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"def marker_decode(id):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_399abf6e","line":93,"in_reply_to":"1ae5cdf2_1b0ab725","updated":"2014-06-09 20:17:09.000000000","message":"I think that formatting the string is fine. My only concern would be with performance, but the sqlalchemy driver is only for development / POC, so performance isn\u0027t a big deal here.","commit_id":"384d613f5e50d7441fadcf289987f398ef6a8a1e"}]}
