)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8b14efd9baca0fb2ca02a318e1d3fb985e6339fb","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix unicode errors with non-ascii object names"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Encode ShardRange upper and lower bound values as they are set."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Encode CleavingContext cursor value as it is set."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9f6a8fd7_5562a4d9","line":9,"updated":"2018-04-24 01:22:47.000000000","message":"Hrm... I think the most-sane thing for us to do is to ensure these are native strings -- so encoded to bytes on py2 and left as unicode on py3.\n\nWhether that means get_valid_utf8_str should change or what, IDK -- I know that Sam bumped into similar obstacles with https://review.openstack.org/#/c/563354/ FWIW","commit_id":"b5657839ea6c473280e68e99d00d0b04c4c33323"}],"swift/common/utils.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f0c1f7899d1168b94adc4ec4e76be6d20a568e0c","unresolved":false,"context_lines":[{"line_number":4366,"context_line":""},{"line_number":4367,"context_line":"    class OuterBound(object):"},{"line_number":4368,"context_line":"        def __eq__(self, other):"},{"line_number":4369,"context_line":"            return isinstance(other, type(self)) or other is \u0027\u0027"},{"line_number":4370,"context_line":""},{"line_number":4371,"context_line":"        def __ne__(self, other):"},{"line_number":4372,"context_line":"            return not self.__eq__(other)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_a2092432","line":4369,"range":{"start_line":4369,"start_character":52,"end_line":4369,"end_character":63},"updated":"2018-04-27 19:16:09.000000000","message":"Off-topic: this should probably be more like\n\n or (isinstance(other, six.text_types) and other \u003d\u003d \u0027\u0027)\n\nbecause id(b\u0027\u0027) !\u003d id(u\u0027\u0027)","commit_id":"dca5dfed2203a25b54d35677c59136bd07f68f0e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f0c1f7899d1168b94adc4ec4e76be6d20a568e0c","unresolved":false,"context_lines":[{"line_number":4440,"context_line":""},{"line_number":4441,"context_line":"    @classmethod"},{"line_number":4442,"context_line":"    def _encode(cls, value):"},{"line_number":4443,"context_line":"        if value is not None and six.PY2 and isinstance(value, six.text_type):"},{"line_number":4444,"context_line":"            return value.encode(\u0027utf-8\u0027)"},{"line_number":4445,"context_line":"        return value"},{"line_number":4446,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_025fb0e5","line":4443,"range":{"start_line":4443,"start_character":11,"end_line":4443,"end_character":28},"updated":"2018-04-27 19:16:09.000000000","message":"Probably not necessary, given the isinstance check.","commit_id":"dca5dfed2203a25b54d35677c59136bd07f68f0e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f0c1f7899d1168b94adc4ec4e76be6d20a568e0c","unresolved":false,"context_lines":[{"line_number":4442,"context_line":"    def _encode(cls, value):"},{"line_number":4443,"context_line":"        if value is not None and six.PY2 and isinstance(value, six.text_type):"},{"line_number":4444,"context_line":"            return value.encode(\u0027utf-8\u0027)"},{"line_number":4445,"context_line":"        return value"},{"line_number":4446,"context_line":""},{"line_number":4447,"context_line":"    def _encode_bound(self, bound):"},{"line_number":4448,"context_line":"        if isinstance(bound, ShardRange.OuterBound):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_e244fc1d","line":4445,"updated":"2018-04-27 19:16:09.000000000","message":"I kinda wonder if we should have something like\n\n elif isinstance(value, six.binary_type):\n     try:\n         if six.PY2:\n             # Just checking; don\u0027t need the result\n             value.decode(\u0027utf-8\u0027)\n         else:\n             return value.decode(\u0027utf-8\u0027)\n     except UnicodeDecodeError:\n         raise TypeError(\u0027must be valid utf-8\u0027)","commit_id":"dca5dfed2203a25b54d35677c59136bd07f68f0e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f0c1f7899d1168b94adc4ec4e76be6d20a568e0c","unresolved":false,"context_lines":[{"line_number":4703,"context_line":"        self.timestamp \u003d timestamp or Timestamp.now()"},{"line_number":4704,"context_line":"        return True"},{"line_number":4705,"context_line":""},{"line_number":4706,"context_line":"    def __contains__(self, item):"},{"line_number":4707,"context_line":"        if self.lower \u003d\u003d ShardRange.MIN and self.upper \u003d\u003d ShardRange.MAX:"},{"line_number":4708,"context_line":"            # No limits so must match"},{"line_number":4709,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_0d75a198","line":4706,"updated":"2018-04-27 19:16:09.000000000","message":"Off-topic: I wonder whether this ought to have a\n\n if not isinstance(item, string_types):\n     return False\n\nat the top... or even go to\n\n     raise TypeError","commit_id":"dca5dfed2203a25b54d35677c59136bd07f68f0e"}],"test/probe/test_sharder.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f0c1f7899d1168b94adc4ec4e76be6d20a568e0c","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        self._maybe_skip_test()"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def _make_object_names(self, number):"},{"line_number":100,"context_line":"        return [\u0027obj-%04d\u0027 % x for x in range(number)]"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def _setup_container_name(self):"},{"line_number":103,"context_line":"        self.container_name \u003d \u0027container-%s\u0027 % uuid.uuid4()"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_6dfe9daf","line":100,"updated":"2018-04-27 19:16:09.000000000","message":"Off-topic: we should add some more pathological substrings here -- percent signs, the literal string \u0027%ff\u0027, single quotes, double quotes...","commit_id":"dca5dfed2203a25b54d35677c59136bd07f68f0e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f0c1f7899d1168b94adc4ec4e76be6d20a568e0c","unresolved":false,"context_lines":[{"line_number":384,"context_line":""},{"line_number":385,"context_line":""},{"line_number":386,"context_line":"class TestContainerShardingNonUTF8(BaseTestContainerSharding):"},{"line_number":387,"context_line":"    def test_sharding_listing(self):"},{"line_number":388,"context_line":"        # verify parameterised listing of a container during sharding"},{"line_number":389,"context_line":"        all_obj_names \u003d self._make_object_names(4 * self.max_shard_size)"},{"line_number":390,"context_line":"        obj_names \u003d all_obj_names[::2]"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_ad903550","line":387,"updated":"2018-04-27 19:16:09.000000000","message":"So just the one non-ascii test? I suppose that ought to be enough ... I might feel a little better if we had some async updates that needed to be redirected, too, though.","commit_id":"dca5dfed2203a25b54d35677c59136bd07f68f0e"}],"test/unit/common/test_utils.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f0c1f7899d1168b94adc4ec4e76be6d20a568e0c","unresolved":false,"context_lines":[{"line_number":6735,"context_line":"        self.assertFalse(\u0027\u0027 \u003e utils.ShardRange.MAX)"},{"line_number":6736,"context_line":"        self.assertFalse(utils.ShardRange.MAX \u003e utils.ShardRange.MAX)"},{"line_number":6737,"context_line":""},{"line_number":6738,"context_line":"        for val in \u0027z\u0027, u\u0027\\u00e4\u0027:"},{"line_number":6739,"context_line":"            self.assertFalse(utils.ShardRange.MAX \u003d\u003d val)"},{"line_number":6740,"context_line":"            self.assertFalse(val \u003e utils.ShardRange.MAX)"},{"line_number":6741,"context_line":"            self.assertTrue(val \u003c utils.ShardRange.MAX)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_8da1b198","line":6738,"updated":"2018-04-27 19:16:09.000000000","message":"Maybe add\n\n u\u0027\\u00e4\u0027.encode(\u0027utf8\u0027)\n\n?","commit_id":"dca5dfed2203a25b54d35677c59136bd07f68f0e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f0c1f7899d1168b94adc4ec4e76be6d20a568e0c","unresolved":false,"context_lines":[{"line_number":7205,"context_line":"    def test_bounds_serialization(self):"},{"line_number":7206,"context_line":"        sr \u003d utils.ShardRange(\u0027a/c\u0027, utils.Timestamp.now())"},{"line_number":7207,"context_line":"        self.assertEqual(\u0027a/c\u0027, sr.name)"},{"line_number":7208,"context_line":"        self.assertEqual(utils.ShardRange.MIN, sr.lower)"},{"line_number":7209,"context_line":"        self.assertEqual(\u0027\u0027, sr.lower_str)"},{"line_number":7210,"context_line":"        self.assertEqual(utils.ShardRange.MAX, sr.upper)"},{"line_number":7211,"context_line":"        self.assertEqual(\u0027\u0027, sr.upper_str)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_0ddcc116","line":7208,"updated":"2018-04-27 19:16:09.000000000","message":"True or false?\n\n sr.lower \u003d\u003d \u0027\u0027","commit_id":"dca5dfed2203a25b54d35677c59136bd07f68f0e"}]}
