)]}'
{"oslo_cache/core.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"4bb93f98f76d4123588614e1941d64f9be587119","unresolved":false,"context_lines":[{"line_number":120,"context_line":"    return conf_dict"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"def sha1_mangle_key(key):"},{"line_number":124,"context_line":"    try:"},{"line_number":125,"context_line":"        key \u003d key.encode(\u0027utf-8\u0027)"},{"line_number":126,"context_line":"    except UnicodeError:"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_68793e93","line":123,"updated":"2015-06-29 15:28:25.000000000","message":"If this function is used from inside dogpile, we should document that\u0027s how it\u0027s used. That can happen in a follow-up patch.","commit_id":"25bff7e5f4e2d761d14a33afe49fd78010c629a7"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"0f9952a224a993adf06f8247e9b3fbc21049670e","unresolved":false,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"def sha1_mangle_key(key):"},{"line_number":124,"context_line":"    try:"},{"line_number":125,"context_line":"        key \u003d key.encode(\u0027utf-8\u0027)"},{"line_number":126,"context_line":"    except UnicodeError:"},{"line_number":127,"context_line":"        # NOTE(stevemar): if encoding fails just continue anyway."},{"line_number":128,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_ed51e063","line":125,"updated":"2015-06-29 15:18:05.000000000","message":"I\u0027m not sure how I feel about this. We need to start developing a policy for the libraries about what types of string data we\u0027re going to accept in APIs, and I think we should stop trying to accept *everything*. In this case, where is the caller getting the key passed in? Would the caller know if it has encoded bytes or unicode data? Can it always be made to pass us a decoded unicode string?","commit_id":"25bff7e5f4e2d761d14a33afe49fd78010c629a7"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"4bb93f98f76d4123588614e1941d64f9be587119","unresolved":false,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"def sha1_mangle_key(key):"},{"line_number":124,"context_line":"    try:"},{"line_number":125,"context_line":"        key \u003d key.encode(\u0027utf-8\u0027)"},{"line_number":126,"context_line":"    except UnicodeError:"},{"line_number":127,"context_line":"        # NOTE(stevemar): if encoding fails just continue anyway."},{"line_number":128,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_08f3d20b","line":125,"in_reply_to":"ba3cc151_ed51e063","updated":"2015-06-29 15:28:25.000000000","message":"on IRC we discussed the fact that this function is to protect users of dogpile so we can keep it","commit_id":"25bff7e5f4e2d761d14a33afe49fd78010c629a7"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"4bb93f98f76d4123588614e1941d64f9be587119","unresolved":false,"context_lines":[{"line_number":123,"context_line":"def sha1_mangle_key(key):"},{"line_number":124,"context_line":"    try:"},{"line_number":125,"context_line":"        key \u003d key.encode(\u0027utf-8\u0027)"},{"line_number":126,"context_line":"    except UnicodeError:"},{"line_number":127,"context_line":"        # NOTE(stevemar): if encoding fails just continue anyway."},{"line_number":128,"context_line":"        pass"},{"line_number":129,"context_line":"    return util.sha1_mangle_key(key)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_285c9624","line":126,"updated":"2015-06-29 15:28:25.000000000","message":"Under python 3 if a byte string is passed here an AttributeError is raised because byte strings don\u0027t have an encode method.","commit_id":"25bff7e5f4e2d761d14a33afe49fd78010c629a7"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"e0771fc56efcd3595a2653e88e135d47c7c333f0","unresolved":false,"context_lines":[{"line_number":128,"context_line":"    the key through."},{"line_number":129,"context_line":"    \"\"\""},{"line_number":130,"context_line":"    try:"},{"line_number":131,"context_line":"        key \u003d key.encode(\u0027utf-8\u0027)"},{"line_number":132,"context_line":"    except (UnicodeError, AttributeError):"},{"line_number":133,"context_line":"        # NOTE(stevemar): if encoding fails just continue anyway."},{"line_number":134,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba3cc151_65b960e9","line":131,"updated":"2015-06-29 17:41:56.000000000","message":"We should probably handle encoding errors here if we can, to do as much as possible to ensure that we end up with a byte string instead of a unicode object. Maybe set errors\u003d\u0027xmlcharrefreplace\u0027 in the call?","commit_id":"3b6d210d6c18ce9d71074bc7bb6790eb1dd97cb3"}],"oslo_cache/tests/test_cache.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"57ebde6124f984ab9d6cca8da74bb82c4338bec9","unresolved":false,"context_lines":[{"line_number":327,"context_line":"class UTF8KeyManglerTests(BaseTestCase):"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    def test_key_is_utf8_encoded(self):"},{"line_number":330,"context_line":"        key \u003d \u0027fäké1\u0027"},{"line_number":331,"context_line":"        encoded \u003d cache.sha1_mangle_key(key)"},{"line_number":332,"context_line":"        self.assertIsNotNone(encoded)"},{"line_number":333,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_6249568b","line":330,"updated":"2015-06-29 17:33:56.000000000","message":"I think you want a u prefix on that to make it a unicode string.","commit_id":"49ef2a236c802edcb9142cc588a170877aa06797"}]}
