)]}'
{"barbican/api/__init__.py":[{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"42208c7842b750d7a26792a4fa0f58b84c3ba1c5","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        # TODO(jwood): Investigate how to get UTF8 format via openstack"},{"line_number":60,"context_line":"        # jsonutils:"},{"line_number":61,"context_line":"        #     parsed_body \u003d json.loads(raw_json, \u0027utf-8\u0027)"},{"line_number":62,"context_line":"        parsed_body \u003d json.loads(body.decode(\u0027utf-8\u0027))"},{"line_number":63,"context_line":"        strip_whitespace(parsed_body)"},{"line_number":64,"context_line":"    except ValueError:"},{"line_number":65,"context_line":"        LOG.exception(u._LE(\"Problem loading request JSON.\"))"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_c06b8ff0","line":62,"updated":"2015-10-01 14:37:43.000000000","message":"You can write:\n\nparsed_body \u003d oslo_serialization.jsoutils.loads(body)\n\nThis function accepts bytes and Unicode, bytes is decoded from UTF-8.","commit_id":"7d9f41b8bd2eb2b2cecd35cf8c3a209bf9dba40d"}],"barbican/plugin/util/translations.py":[{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"9af7107398500defa547aa9b250eb25e405288db","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    # Process plain-text type."},{"line_number":49,"context_line":"    if normalized_media_type in mime_types.PLAIN_TEXT:"},{"line_number":50,"context_line":"        # normalize text to binary and then base64 encode it"},{"line_number":51,"context_line":"        if isinstance(unencrypted, str):"},{"line_number":52,"context_line":"            unencrypted_bytes \u003d unencrypted.encode(\u0027utf-8\u0027)"},{"line_number":53,"context_line":"        else:"},{"line_number":54,"context_line":"            unencrypted_bytes \u003d unencrypted"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa1b9901_e2a725bb","line":51,"updated":"2015-08-25 21:56:26.000000000","message":"If this the payload was in unicode, this will fail for python 2.  Perhaps compare it to six.string_types?","commit_id":"640b8f304502b25a5a70b1c495f5670e9d3b287a"},{"author":{"_account_id":7764,"name":"Peter Hamilton","email":"peter.hamilton@jhuapl.edu","username":"Peter"},"change_message_id":"a7f6535a90c234278e86290a3f0189bc8214a750","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    # Process plain-text type."},{"line_number":49,"context_line":"    if normalized_media_type in mime_types.PLAIN_TEXT:"},{"line_number":50,"context_line":"        # normalize text to binary and then base64 encode it"},{"line_number":51,"context_line":"        if isinstance(unencrypted, str):"},{"line_number":52,"context_line":"            unencrypted_bytes \u003d unencrypted.encode(\u0027utf-8\u0027)"},{"line_number":53,"context_line":"        else:"},{"line_number":54,"context_line":"            unencrypted_bytes \u003d unencrypted"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_c2eb9877","line":51,"in_reply_to":"fa1b9901_e2a725bb","updated":"2015-09-01 14:50:57.000000000","message":"+1","commit_id":"640b8f304502b25a5a70b1c495f5670e9d3b287a"},{"author":{"_account_id":16277,"name":"Pradeep Kumar Singh","email":"ps4openstack@gmail.com","username":"pradeep_singh"},"change_message_id":"c4fd8e3c192297917a1d113380ef559df36a20fe","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    # Process plain-text type."},{"line_number":49,"context_line":"    if normalized_media_type in mime_types.PLAIN_TEXT:"},{"line_number":50,"context_line":"        # normalize text to binary and then base64 encode it"},{"line_number":51,"context_line":"        if isinstance(unencrypted, str):"},{"line_number":52,"context_line":"            unencrypted_bytes \u003d unencrypted.encode(\u0027utf-8\u0027)"},{"line_number":53,"context_line":"        else:"},{"line_number":54,"context_line":"            unencrypted_bytes \u003d unencrypted"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_6b7df26b","line":51,"in_reply_to":"fa1b9901_e2a725bb","updated":"2015-09-07 07:01:08.000000000","message":"If the payload is already unicode the i dont think , we need to encode it to utf-8? Please suggest","commit_id":"640b8f304502b25a5a70b1c495f5670e9d3b287a"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"42208c7842b750d7a26792a4fa0f58b84c3ba1c5","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    # Process plain-text type."},{"line_number":49,"context_line":"    if normalized_media_type in mime_types.PLAIN_TEXT:"},{"line_number":50,"context_line":"        # normalize text to binary and then base64 encode it"},{"line_number":51,"context_line":"        if isinstance(unencrypted, str):"},{"line_number":52,"context_line":"            unencrypted_bytes \u003d unencrypted.encode(\u0027utf-8\u0027)"},{"line_number":53,"context_line":"        else:"},{"line_number":54,"context_line":"            unencrypted_bytes \u003d unencrypted"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_204e0b97","line":51,"updated":"2015-10-01 14:37:43.000000000","message":"Hum, str is bytes on Python 2. You should write instead:\n\nif isinstance(unencrypted, six.text_type):","commit_id":"7d9f41b8bd2eb2b2cecd35cf8c3a209bf9dba40d"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"16c38020021d47d97a35521e18bc6af5363ff6c0","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    # Process plain-text type."},{"line_number":49,"context_line":"    if normalized_media_type in mime_types.PLAIN_TEXT:"},{"line_number":50,"context_line":"        # normalize text to binary and then base64 encode it"},{"line_number":51,"context_line":"        if isinstance(unencrypted, str):"},{"line_number":52,"context_line":"            unencrypted_bytes \u003d unencrypted.encode(\u0027utf-8\u0027)"},{"line_number":53,"context_line":"        else:"},{"line_number":54,"context_line":"            unencrypted_bytes \u003d unencrypted"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_49932350","line":51,"in_reply_to":"9a1a9d01_204e0b97","updated":"2015-10-01 17:13:08.000000000","message":"Correct, this is needed for backwards compatibility.","commit_id":"7d9f41b8bd2eb2b2cecd35cf8c3a209bf9dba40d"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"6348e82a64051abc8572ae9c9b91649ff5399e04","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    # Process plain-text type."},{"line_number":49,"context_line":"    if normalized_media_type in mime_types.PLAIN_TEXT:"},{"line_number":50,"context_line":"        # normalize text to binary and then base64 encode it"},{"line_number":51,"context_line":"        if isinstance(unencrypted, str):"},{"line_number":52,"context_line":"            unencrypted_bytes \u003d unencrypted.encode(\u0027utf-8\u0027)"},{"line_number":53,"context_line":"        else:"},{"line_number":54,"context_line":"            unencrypted_bytes \u003d unencrypted"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_92c0802c","line":51,"in_reply_to":"9a1a9d01_49932350","updated":"2015-10-01 18:50:46.000000000","message":"+1","commit_id":"7d9f41b8bd2eb2b2cecd35cf8c3a209bf9dba40d"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"16c38020021d47d97a35521e18bc6af5363ff6c0","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    # Process binary type."},{"line_number":59,"context_line":"    else:"},{"line_number":60,"context_line":"        if not content_encoding:"},{"line_number":61,"context_line":"            if isinstance(unencrypted, str):"},{"line_number":62,"context_line":"                b64payload \u003d base64.b64encode(unencrypted.encode(\u0027utf-8\u0027))"},{"line_number":63,"context_line":"            else:"},{"line_number":64,"context_line":"                b64payload \u003d base64.b64encode(unencrypted)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_c9697327","line":61,"updated":"2015-10-01 17:13:08.000000000","message":"The same should be done here.","commit_id":"7d9f41b8bd2eb2b2cecd35cf8c3a209bf9dba40d"}],"barbican/tests/api/controllers/test_secrets.py":[{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"9af7107398500defa547aa9b250eb25e405288db","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    def test_can_create_new_secret_one_step(self):"},{"line_number":35,"context_line":"        resp, secret_uuid \u003d create_secret("},{"line_number":36,"context_line":"            self.app,"},{"line_number":37,"context_line":"            payload\u003d\u0027not-encrypted\u0027,"},{"line_number":38,"context_line":"            content_type\u003d\u0027text/plain\u0027"},{"line_number":39,"context_line":"        )"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa1b9901_42a5b19f","line":37,"updated":"2015-08-25 21:56:26.000000000","message":"Can you please write a test that will test a unicode payload?  There might be a better place for it farther down in this file, but at first glance, maybe turn this one into a parameterized test and test both \u0027not-encrypted\u0027 and u\u0027not-encrypted\u0027.","commit_id":"640b8f304502b25a5a70b1c495f5670e9d3b287a"},{"author":{"_account_id":16277,"name":"Pradeep Kumar Singh","email":"ps4openstack@gmail.com","username":"pradeep_singh"},"change_message_id":"96b23f092b75cfb5111ddc45791247b0061db4e1","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    def test_can_create_new_secret_one_step(self):"},{"line_number":35,"context_line":"        resp, secret_uuid \u003d create_secret("},{"line_number":36,"context_line":"            self.app,"},{"line_number":37,"context_line":"            payload\u003d\u0027not-encrypted\u0027,"},{"line_number":38,"context_line":"            content_type\u003d\u0027text/plain\u0027"},{"line_number":39,"context_line":"        )"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_1e111652","line":37,"in_reply_to":"fa1b9901_42a5b19f","updated":"2015-09-07 07:28:40.000000000","message":"Done","commit_id":"640b8f304502b25a5a70b1c495f5670e9d3b287a"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"42208c7842b750d7a26792a4fa0f58b84c3ba1c5","unresolved":false,"context_lines":[{"line_number":32,"context_line":"class WhenTestingSecretsResource(utils.BarbicanAPIBaseTestCase):"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    @utils.parameterized_dataset({"},{"line_number":35,"context_line":"        \u0027payload1\u0027: [\u0027not-encrypted\u0027],"},{"line_number":36,"context_line":"        \u0027payload2\u0027: [u\u0027not-encrypted\u0027]"},{"line_number":37,"context_line":"    })"},{"line_number":38,"context_line":"    def test_can_create_new_secret_one_step(self, payld\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_c0106f5c","line":35,"updated":"2015-10-01 14:37:43.000000000","message":"If you want to test bytes, you must write b\u0027not-encrypted\u0027, otherwise you get Unicode on Python 3.","commit_id":"7d9f41b8bd2eb2b2cecd35cf8c3a209bf9dba40d"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"42208c7842b750d7a26792a4fa0f58b84c3ba1c5","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        \u0027payload1\u0027: [\u0027not-encrypted\u0027],"},{"line_number":36,"context_line":"        \u0027payload2\u0027: [u\u0027not-encrypted\u0027]"},{"line_number":37,"context_line":"    })"},{"line_number":38,"context_line":"    def test_can_create_new_secret_one_step(self, payld\u003dNone):"},{"line_number":39,"context_line":"        resp, secret_uuid \u003d create_secret("},{"line_number":40,"context_line":"            self.app,"},{"line_number":41,"context_line":"            payload\u003dpayld,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_2303750f","line":38,"updated":"2015-10-01 14:37:43.000000000","message":"Why not calling the variable payload? \"payld\" looks like a typo.","commit_id":"7d9f41b8bd2eb2b2cecd35cf8c3a209bf9dba40d"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"6348e82a64051abc8572ae9c9b91649ff5399e04","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        self.assertIsNotNone(project)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def test_can_create_new_secret_with_payload_just_under_max(self):"},{"line_number":70,"context_line":"        large_payload \u003d \u0027A\u0027 * (validators.DEFAULT_MAX_SECRET_BYTES - 8)"},{"line_number":71,"context_line":"        resp, _ \u003d create_secret("},{"line_number":72,"context_line":"            self.app,"},{"line_number":73,"context_line":"            payload\u003dlarge_payload,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_9245e0b4","line":70,"updated":"2015-10-01 18:50:46.000000000","message":"Is there a reason you removed the \u0027b\u0027?  Do the tests fail otherwise?","commit_id":"7d9f41b8bd2eb2b2cecd35cf8c3a209bf9dba40d"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"42208c7842b750d7a26792a4fa0f58b84c3ba1c5","unresolved":false,"context_lines":[{"line_number":418,"context_line":""},{"line_number":419,"context_line":"        self.assertEqual(201, resp.status_int)"},{"line_number":420,"context_line":""},{"line_number":421,"context_line":"        payload \u003d base64.b64encode(\u0027I had something for this\u0027.encode(\u0027utf-8\u0027))"},{"line_number":422,"context_line":"        put_resp \u003d self.app.put("},{"line_number":423,"context_line":"            \u0027/secrets/{0}\u0027.format(secret_uuid),"},{"line_number":424,"context_line":"            payload,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_833921db","line":421,"updated":"2015-10-01 14:37:43.000000000","message":"Write directly:\n\nbase64.b64encode(b\u0027I had something for this\u0027)","commit_id":"7d9f41b8bd2eb2b2cecd35cf8c3a209bf9dba40d"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"42208c7842b750d7a26792a4fa0f58b84c3ba1c5","unresolved":false,"context_lines":[{"line_number":448,"context_line":""},{"line_number":449,"context_line":"        self.assertEqual(201, resp.status_int)"},{"line_number":450,"context_line":""},{"line_number":451,"context_line":"        payload \u003d base64.b64encode(\u0027I had something for this\u0027.encode(\u0027utf-8\u0027))"},{"line_number":452,"context_line":"        put_resp \u003d self.app.put("},{"line_number":453,"context_line":"            \u0027/secrets/{0}\u0027.format(secret_uuid),"},{"line_number":454,"context_line":"            payload,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_034c3175","line":451,"updated":"2015-10-01 14:37:43.000000000","message":"Ditto: base64.b64encode(b\u0027I had something for this\u0027)","commit_id":"7d9f41b8bd2eb2b2cecd35cf8c3a209bf9dba40d"}]}
