)]}'
{"ironic/common/hash_ring.py":[{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"41709b6423c3cec06092666563b78bab71b33938","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def _hash2long(self, key_hash):"},{"line_number":100,"context_line":"        \"\"\"Convert the given hash\u0027s digest to a long integer value.\"\"\""},{"line_number":101,"context_line":"        return long(key_hash.hexdigest(), 16)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def _get_partition(self, data):"},{"line_number":104,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"baa201ad_a7561c28","line":101,"updated":"2014-10-16 19:49:32.000000000","message":"we may want to add a test that we are actually returning a long here","commit_id":"49bbdd9ac4b2221bd17a69a6affe4240f82b20ed"},{"author":{"_account_id":3099,"name":"David Shrewsbury","email":"dshrewsb@redhat.com","username":"dshrews"},"change_message_id":"45d3f97987657141c7bb6ea2be7a9f71db0416e0","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def _hash2long(self, key_hash):"},{"line_number":100,"context_line":"        \"\"\"Convert the given hash\u0027s digest to a long integer value.\"\"\""},{"line_number":101,"context_line":"        return long(key_hash.hexdigest(), 16)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def _get_partition(self, data):"},{"line_number":104,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"baa201ad_92cb1471","line":101,"in_reply_to":"baa201ad_a7561c28","updated":"2014-10-16 20:07:30.000000000","message":"Done","commit_id":"49bbdd9ac4b2221bd17a69a6affe4240f82b20ed"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"bb785cbb863af5d0da19ccb9a473c338660ed926","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def _hash2long(self, key_hash):"},{"line_number":100,"context_line":"        \"\"\"Convert the given hash\u0027s digest to a long integer value.\"\"\""},{"line_number":101,"context_line":"        return long(key_hash.hexdigest(), 16)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def _get_partition(self, data):"},{"line_number":104,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"baa201ad_7f7ae9ba","line":101,"updated":"2014-10-17 13:07:08.000000000","message":"maybe use six.integer_types[-1] here?","commit_id":"a9d6c96dfe1dafd0b98cff01be985bf0a15d3ead"}],"ironic/tests/test_hash_ring.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c9f4300c9d4fb2551c0ffa0d2d44aafdc2243e2e","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        replicas \u003d 1"},{"line_number":39,"context_line":"        ring \u003d hash_ring.HashRing(hosts, replicas\u003dreplicas)"},{"line_number":40,"context_line":"        for key in ring._host_hashes.keys():"},{"line_number":41,"context_line":"            self.assertIsInstance(key, long)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def test_create_ring(self):"},{"line_number":44,"context_line":"        hosts \u003d [\u0027foo\u0027, \u0027bar\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"baa201ad_53f604d8","line":41,"updated":"2014-10-17 09:49:52.000000000","message":"there\u0027s no `long` type in Py3k, so this code isn\u0027t future-safe. Can we test with some really big value (e.g. by mocking haslib.md5)?","commit_id":"a9d6c96dfe1dafd0b98cff01be985bf0a15d3ead"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"99f8fc374016feb600e44749fbbc4e984880a494","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        replicas \u003d 1"},{"line_number":40,"context_line":"        ring \u003d hash_ring.HashRing(hosts, replicas\u003dreplicas)"},{"line_number":41,"context_line":"        for key in ring._host_hashes.keys():"},{"line_number":42,"context_line":"            self.assertIsInstance(key, six.integer_types)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def test_create_ring(self):"},{"line_number":45,"context_line":"        hosts \u003d [\u0027foo\u0027, \u0027bar\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa7fdbe_27b9002f","line":42,"updated":"2014-10-20 08:26:26.000000000","message":"I don\u0027t see, why this test could not pass before your change. Keys were integers even before.\n\nWhat I would like to see here is patch.object(hashlib, \u0027md5\u0027), making it return say [32 * \u0027a\u0027, 32 * \u0027b\u0027] and ensuring that resulting keys are 226854911280625642308916404954512140970 and 249540402408688206539808045449963355067, not 32-bit integers.","commit_id":"d29a309cd1bf3ae03ee75920e895090a977c9d3d"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b88ac5f12da31ad21e2ac95c5023fddb4405fb64","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        replicas \u003d 1"},{"line_number":40,"context_line":"        ring \u003d hash_ring.HashRing(hosts, replicas\u003dreplicas)"},{"line_number":41,"context_line":"        for key in ring._host_hashes.keys():"},{"line_number":42,"context_line":"            self.assertIsInstance(key, six.integer_types)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def test_create_ring(self):"},{"line_number":45,"context_line":"        hosts \u003d [\u0027foo\u0027, \u0027bar\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa7fdbe_74880723","line":42,"in_reply_to":"9aa7fdbe_19cb7473","updated":"2014-10-20 15:07:02.000000000","message":"well\n\n @mock.patch.object(hashlib, \u0027md5\u0027)\n def test__hash2int_returns_int(self, mock_md5):\n    mock_md5.return_value.hexdigest.side_effect \u003d [32 * \u0027a\u0027, 32 * \u0027b\u0027]\n\nIMO should work","commit_id":"d29a309cd1bf3ae03ee75920e895090a977c9d3d"},{"author":{"_account_id":3099,"name":"David Shrewsbury","email":"dshrewsb@redhat.com","username":"dshrews"},"change_message_id":"e2e20f20d3c91a5f50e4c43eb7f6e17f6fdccb8c","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        replicas \u003d 1"},{"line_number":40,"context_line":"        ring \u003d hash_ring.HashRing(hosts, replicas\u003dreplicas)"},{"line_number":41,"context_line":"        for key in ring._host_hashes.keys():"},{"line_number":42,"context_line":"            self.assertIsInstance(key, six.integer_types)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def test_create_ring(self):"},{"line_number":45,"context_line":"        hosts \u003d [\u0027foo\u0027, \u0027bar\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa7fdbe_19cb7473","line":42,"in_reply_to":"9aa7fdbe_27b9002f","updated":"2014-10-20 14:35:26.000000000","message":"@Dmitry:\n\nThis doesn\u0027t work because hashlib.md5() returns a HASH object, not an md5 hex value.","commit_id":"d29a309cd1bf3ae03ee75920e895090a977c9d3d"},{"author":{"_account_id":3099,"name":"David Shrewsbury","email":"dshrewsb@redhat.com","username":"dshrews"},"change_message_id":"c58c33e0c39d0d1b08584128f29985ba8b0f8a53","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        replicas \u003d 1"},{"line_number":40,"context_line":"        ring \u003d hash_ring.HashRing(hosts, replicas\u003dreplicas)"},{"line_number":41,"context_line":"        for key in ring._host_hashes.keys():"},{"line_number":42,"context_line":"            self.assertIsInstance(key, six.integer_types)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def test_create_ring(self):"},{"line_number":45,"context_line":"        hosts \u003d [\u0027foo\u0027, \u0027bar\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa7fdbe_cbd83156","line":42,"in_reply_to":"9aa7fdbe_74880723","updated":"2014-10-20 15:54:04.000000000","message":"Done","commit_id":"d29a309cd1bf3ae03ee75920e895090a977c9d3d"}]}
