)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"e947a8903dd406af6260afabefa865ee57737b3a","unresolved":true,"context_lines":[{"line_number":19,"context_line":"the number of Namespace instances constructed can be much greater than"},{"line_number":20,"context_line":"the number whose account and container properties are used. The author"},{"line_number":21,"context_line":"found that this approach became more efficient when the rate of"},{"line_number":22,"context_line":"constructing instances was ~5x greater than the rate of using the"},{"line_number":23,"context_line":"account or container getters."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Change-Id: Iebb09d6eff2165c25f80abca360210242cf3e6b7"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"2deed22c_6148ae54","line":22,"updated":"2023-12-07 00:57:50.000000000","message":"not sure I understand this. are you saying constructing Namespace is 5x faster than ShardRange?","commit_id":"56a5bc18cdc39129580270cdfc754aec4b760910"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"932fb386b54568861620b8a0b4753ec618b8db63","unresolved":false,"context_lines":[{"line_number":19,"context_line":"the number of Namespace instances constructed can be much greater than"},{"line_number":20,"context_line":"the number whose account and container properties are used. The author"},{"line_number":21,"context_line":"found that this approach became more efficient when the rate of"},{"line_number":22,"context_line":"constructing instances was ~5x greater than the rate of using the"},{"line_number":23,"context_line":"account or container getters."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Change-Id: Iebb09d6eff2165c25f80abca360210242cf3e6b7"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"63355a64_78e2f7c3","line":22,"in_reply_to":"2deed22c_6148ae54","updated":"2023-12-07 14:21:08.000000000","message":"Done","commit_id":"56a5bc18cdc39129580270cdfc754aec4b760910"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"e947a8903dd406af6260afabefa865ee57737b3a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"bd95cc34_d692891d","updated":"2023-12-07 00:57:50.000000000","message":"LGTM. Only need to add explicit non-ascii test cases, you can squash my changes if they look good to you.","commit_id":"56a5bc18cdc39129580270cdfc754aec4b760910"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"932fb386b54568861620b8a0b4753ec618b8db63","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"85a956e0_eb6f9e31","updated":"2023-12-07 14:21:08.000000000","message":"I benchmarked this change against the version of Namespace in master using https://paste.openstack.org/show/b6LZ7QxyPHMOS8YhstVo/\n\nValidating the name format adds ~10% to instantiation. I considered not validating the name, but it felt weird having getters for account and container that might blow up when called.\n\nStoring account and container as separate attributes adds to the instantiation time, whereas splitting the name in the account and container getters is only slower in the whole if we always use those getters for every Namespace that we instantiate (which we typically don\u0027t).\n\n```\nconstructor only (text)...\nNamespace 1.397431\nNamespace with no validate 1.258941 (0.900897x)\nNamespace with split account and container slots 1.456352 (1.042164x)\nShardRange 3.089215 (2.210639x)\n\nconstructor only (bytes)...\nNamespace 1.464949\nNamespace with no validate 1.321366 (0.901988x)\nNamespace with split account and container slots 1.514862 (1.034071x)\nShardRange 3.182693 (2.172562x)\n\nconstructor (bytes) and 1 in 1 call getters...\nNamespace 0.192158\nNamespace with split account and container slots 0.185224 (0.963917x)\n\nconstructor (bytes) and 1 in 2 call getters...\nNamespace 0.339008\nNamespace with split account and container slots 0.339515 (1.001495x)\n\nconstructor (bytes) and 1 in 10 call getters...\nNamespace 1.506933\nNamespace with split account and container slots 1.528673 (1.014427x)\n\n```","commit_id":"93c634d9e350eb6b022933d79d037f1124dc1796"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"6436226e75655cef5792305a17e0d59d6f684ac6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"5d137c98_b4e2bb26","updated":"2023-12-08 10:51:00.000000000","message":"I took out the account and container setters - as discussed, they are not used","commit_id":"19096673d15f52a30187828819618549ad30d4a9"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"15dff5ab454c670cfb69c30a90657fa67b14c87a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"df62a754_3aef45eb","updated":"2023-12-07 23:04:03.000000000","message":"Need to carry this patch for the release being built.","commit_id":"19096673d15f52a30187828819618549ad30d4a9"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a8fd436df32beee591599ea5b2d4c718edb4a9eb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"95689c20_7a26e820","updated":"2023-12-08 17:50:02.000000000","message":"recheck\n\nunrelated failure","commit_id":"50f6829cc8b652d289e90b7830742840b8db0982"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"f5040b9fa9c6118e172178682536207ca4c78114","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"4a9b88b4_934d1172","updated":"2023-12-08 22:08:42.000000000","message":"LGTM. I like the latest implementation better. If it\u0027s not needed, let\u0027s remove account/container getter/setter in ShardRange. I feel it\u0027s good to have only one interface to set account/container, which is through setting names.","commit_id":"f54be2450cdece69049dde4d1f677dc87130038e"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c3b33d650f65a1b4da626bbb854bc591fc0a530f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"1e7a209b_735be161","updated":"2023-12-12 19:22:29.000000000","message":"I think this iteration landed on the correct compromise in the implementation.\n\nIt *may* be useful for maintenance to DRY out the assertions:\n\n903533: tests: conslidate Namespace/ShardRange _check_name | https://review.opendev.org/c/openstack/swift/+/903533","commit_id":"93f812a5186f31bcdfcfb97f7f885605ada6819a"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"de1e54c73c6f9b27d36a222c9560c7459a7053b2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"93172cb9_40eaa66e","updated":"2023-12-11 15:14:19.000000000","message":"benchmarking the time to instantiate 500000 objects:\n\nthis patchset Namespace is ~0.96 x patchset 7\n\n```\nMASTER\nconstructor only (text)...\nNamespace 5.998709\nShardRange 15.192244 (2.532586x)\n\nconstructor only (bytes)...\nNamespace 6.351293\nShardRange 15.921977 (2.506888x)\n\nTHIS PATCHSET\nconstructor only (text)...\nNamespace 5.765652\nShardRange 15.286167 (2.651247x)\n\nconstructor only (bytes)...\nNamespace 6.099446\nShardRange 16.012724 (2.625275x)\n```","commit_id":"93f812a5186f31bcdfcfb97f7f885605ada6819a"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ff6538394989f9f617464ae483b33089f9f2954c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"1acfcdef_94671dea","updated":"2023-12-11 18:59:37.000000000","message":"recheck","commit_id":"93f812a5186f31bcdfcfb97f7f885605ada6819a"}],"swift/common/utils/__init__.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"6436226e75655cef5792305a17e0d59d6f684ac6","unresolved":true,"context_lines":[{"line_number":5243,"context_line":"        return Timestamp(timestamp)"},{"line_number":5244,"context_line":""},{"line_number":5245,"context_line":"    @property"},{"line_number":5246,"context_line":"    def account(self):"},{"line_number":5247,"context_line":"        return self._name.split(\u0027/\u0027)[0]"},{"line_number":5248,"context_line":""},{"line_number":5249,"context_line":"    @account.setter"}],"source_content_type":"text/x-python","patch_set":4,"id":"8461c106_b128bfea","line":5246,"updated":"2023-12-08 10:51:00.000000000","message":"I found that the getters have to be defined in this class for the setters to be allowed\n\nhttps://stackoverflow.com/questions/38301453/do-properties-support-inheritance","commit_id":"671225c996ba85575bb7b02fb539a00eb2ff1cfc"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"f5040b9fa9c6118e172178682536207ca4c78114","unresolved":false,"context_lines":[{"line_number":5243,"context_line":"        return Timestamp(timestamp)"},{"line_number":5244,"context_line":""},{"line_number":5245,"context_line":"    @property"},{"line_number":5246,"context_line":"    def account(self):"},{"line_number":5247,"context_line":"        return self._name.split(\u0027/\u0027)[0]"},{"line_number":5248,"context_line":""},{"line_number":5249,"context_line":"    @account.setter"}],"source_content_type":"text/x-python","patch_set":4,"id":"1b99657f_27bf29a1","line":5246,"in_reply_to":"8461c106_b128bfea","updated":"2023-12-08 22:08:42.000000000","message":"Acknowledged","commit_id":"671225c996ba85575bb7b02fb539a00eb2ff1cfc"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"15dff5ab454c670cfb69c30a90657fa67b14c87a","unresolved":true,"context_lines":[{"line_number":5244,"context_line":""},{"line_number":5245,"context_line":"    @property"},{"line_number":5246,"context_line":"    def account(self):"},{"line_number":5247,"context_line":"        return self._name.split(\u0027/\u0027)[0]"},{"line_number":5248,"context_line":""},{"line_number":5249,"context_line":"    @account.setter"},{"line_number":5250,"context_line":"    def account(self, value):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ff244199_ac41df0a","line":5247,"updated":"2023-12-07 23:04:03.000000000","message":"use ``return super().account``?","commit_id":"19096673d15f52a30187828819618549ad30d4a9"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"f5040b9fa9c6118e172178682536207ca4c78114","unresolved":false,"context_lines":[{"line_number":5244,"context_line":""},{"line_number":5245,"context_line":"    @property"},{"line_number":5246,"context_line":"    def account(self):"},{"line_number":5247,"context_line":"        return self._name.split(\u0027/\u0027)[0]"},{"line_number":5248,"context_line":""},{"line_number":5249,"context_line":"    @account.setter"},{"line_number":5250,"context_line":"    def account(self, value):"}],"source_content_type":"text/x-python","patch_set":5,"id":"5847d5d9_36721ab5","line":5247,"in_reply_to":"eabca0fd_b55b9175","updated":"2023-12-08 22:08:42.000000000","message":"Acknowledged","commit_id":"19096673d15f52a30187828819618549ad30d4a9"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"6436226e75655cef5792305a17e0d59d6f684ac6","unresolved":true,"context_lines":[{"line_number":5244,"context_line":""},{"line_number":5245,"context_line":"    @property"},{"line_number":5246,"context_line":"    def account(self):"},{"line_number":5247,"context_line":"        return self._name.split(\u0027/\u0027)[0]"},{"line_number":5248,"context_line":""},{"line_number":5249,"context_line":"    @account.setter"},{"line_number":5250,"context_line":"    def account(self, value):"}],"source_content_type":"text/x-python","patch_set":5,"id":"eabca0fd_b55b9175","line":5247,"in_reply_to":"ff244199_ac41df0a","updated":"2023-12-08 10:51:00.000000000","message":"yes, but if I get rid of the setter then I don\u0027t need to have the getter","commit_id":"19096673d15f52a30187828819618549ad30d4a9"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"15dff5ab454c670cfb69c30a90657fa67b14c87a","unresolved":true,"context_lines":[{"line_number":5248,"context_line":""},{"line_number":5249,"context_line":"    @account.setter"},{"line_number":5250,"context_line":"    def account(self, value):"},{"line_number":5251,"context_line":"        value \u003d \u0027\u0027 if value is None else self._encode(value)"},{"line_number":5252,"context_line":"        self.name \u003d \u0027%s/%s\u0027 % (value, self.container)"},{"line_number":5253,"context_line":""},{"line_number":5254,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":5,"id":"5dfa387d_0b2f8e1c","line":5251,"updated":"2023-12-07 23:04:03.000000000","message":"add test in TestShardRange.test_account for the case of value is None.","commit_id":"19096673d15f52a30187828819618549ad30d4a9"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"f5040b9fa9c6118e172178682536207ca4c78114","unresolved":false,"context_lines":[{"line_number":5248,"context_line":""},{"line_number":5249,"context_line":"    @account.setter"},{"line_number":5250,"context_line":"    def account(self, value):"},{"line_number":5251,"context_line":"        value \u003d \u0027\u0027 if value is None else self._encode(value)"},{"line_number":5252,"context_line":"        self.name \u003d \u0027%s/%s\u0027 % (value, self.container)"},{"line_number":5253,"context_line":""},{"line_number":5254,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":5,"id":"ff385f8a_90ff9a1b","line":5251,"in_reply_to":"32070baf_e84473fa","updated":"2023-12-08 22:08:42.000000000","message":"Acknowledged","commit_id":"19096673d15f52a30187828819618549ad30d4a9"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"6436226e75655cef5792305a17e0d59d6f684ac6","unresolved":true,"context_lines":[{"line_number":5248,"context_line":""},{"line_number":5249,"context_line":"    @account.setter"},{"line_number":5250,"context_line":"    def account(self, value):"},{"line_number":5251,"context_line":"        value \u003d \u0027\u0027 if value is None else self._encode(value)"},{"line_number":5252,"context_line":"        self.name \u003d \u0027%s/%s\u0027 % (value, self.container)"},{"line_number":5253,"context_line":""},{"line_number":5254,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":5,"id":"32070baf_e84473fa","line":5251,"in_reply_to":"5dfa387d_0b2f8e1c","updated":"2023-12-08 10:51:00.000000000","message":"None was covered in test_name_validation (None would end up triggering an error) but I remembered we said to get rid if the setters, they are not used.","commit_id":"19096673d15f52a30187828819618549ad30d4a9"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"15dff5ab454c670cfb69c30a90657fa67b14c87a","unresolved":true,"context_lines":[{"line_number":5253,"context_line":""},{"line_number":5254,"context_line":"    @property"},{"line_number":5255,"context_line":"    def container(self):"},{"line_number":5256,"context_line":"        return self._name.split(\u0027/\u0027)[1]"},{"line_number":5257,"context_line":""},{"line_number":5258,"context_line":"    @container.setter"},{"line_number":5259,"context_line":"    def container(self, value):"}],"source_content_type":"text/x-python","patch_set":5,"id":"8522fe22_bb5dd7c5","line":5256,"updated":"2023-12-07 23:04:03.000000000","message":"use ``return super().container``?","commit_id":"19096673d15f52a30187828819618549ad30d4a9"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"6436226e75655cef5792305a17e0d59d6f684ac6","unresolved":true,"context_lines":[{"line_number":5253,"context_line":""},{"line_number":5254,"context_line":"    @property"},{"line_number":5255,"context_line":"    def container(self):"},{"line_number":5256,"context_line":"        return self._name.split(\u0027/\u0027)[1]"},{"line_number":5257,"context_line":""},{"line_number":5258,"context_line":"    @container.setter"},{"line_number":5259,"context_line":"    def container(self, value):"}],"source_content_type":"text/x-python","patch_set":5,"id":"d82da896_8745c087","line":5256,"in_reply_to":"8522fe22_bb5dd7c5","updated":"2023-12-08 10:51:00.000000000","message":"ditto","commit_id":"19096673d15f52a30187828819618549ad30d4a9"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"f5040b9fa9c6118e172178682536207ca4c78114","unresolved":false,"context_lines":[{"line_number":5253,"context_line":""},{"line_number":5254,"context_line":"    @property"},{"line_number":5255,"context_line":"    def container(self):"},{"line_number":5256,"context_line":"        return self._name.split(\u0027/\u0027)[1]"},{"line_number":5257,"context_line":""},{"line_number":5258,"context_line":"    @container.setter"},{"line_number":5259,"context_line":"    def container(self, value):"}],"source_content_type":"text/x-python","patch_set":5,"id":"e9dbe7f4_5d1c6251","line":5256,"in_reply_to":"d82da896_8745c087","updated":"2023-12-08 22:08:42.000000000","message":"Acknowledged","commit_id":"19096673d15f52a30187828819618549ad30d4a9"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"15dff5ab454c670cfb69c30a90657fa67b14c87a","unresolved":true,"context_lines":[{"line_number":5257,"context_line":""},{"line_number":5258,"context_line":"    @container.setter"},{"line_number":5259,"context_line":"    def container(self, value):"},{"line_number":5260,"context_line":"        value \u003d \u0027\u0027 if value is None else self._encode(value)"},{"line_number":5261,"context_line":"        self.name \u003d \u0027%s/%s\u0027 % (self.account, value)"},{"line_number":5262,"context_line":""},{"line_number":5263,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":5,"id":"b2eef8ed_e07d06b1","line":5260,"updated":"2023-12-07 23:04:03.000000000","message":"add test in TestShardRange.test_container for the case of value is None.","commit_id":"19096673d15f52a30187828819618549ad30d4a9"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"f5040b9fa9c6118e172178682536207ca4c78114","unresolved":false,"context_lines":[{"line_number":5257,"context_line":""},{"line_number":5258,"context_line":"    @container.setter"},{"line_number":5259,"context_line":"    def container(self, value):"},{"line_number":5260,"context_line":"        value \u003d \u0027\u0027 if value is None else self._encode(value)"},{"line_number":5261,"context_line":"        self.name \u003d \u0027%s/%s\u0027 % (self.account, value)"},{"line_number":5262,"context_line":""},{"line_number":5263,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":5,"id":"1d3e13b9_31d32914","line":5260,"in_reply_to":"b2eef8ed_e07d06b1","updated":"2023-12-08 22:08:42.000000000","message":"Acknowledged","commit_id":"19096673d15f52a30187828819618549ad30d4a9"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"cdadf982ca11ebebbbde3065d66f5ef631e8c07a","unresolved":true,"context_lines":[{"line_number":4563,"context_line":"    namespace."},{"line_number":4564,"context_line":""},{"line_number":4565,"context_line":"    :param name: the name of the ``Namespace``; this SHOULD take the form of a"},{"line_number":4566,"context_line":"        path to a container i.e. \u003caccount_name\u003e/\u003ccontainer_name\u003e."},{"line_number":4567,"context_line":"    :param lower: the lower bound of object names contained in the namespace;"},{"line_number":4568,"context_line":"        the lower bound *is not* included in the namespace."},{"line_number":4569,"context_line":"    :param upper: the upper bound of object names contained in the namespace;"}],"source_content_type":"text/x-python","patch_set":7,"id":"43fe4dd0_67bcaf1f","line":4566,"updated":"2023-12-11 05:31:09.000000000","message":"OK, sorry I haven\u0027t been too invloved with this of late.\nLast I heard the namespace objects name were going to be less rigid, ie no be a path and therefore the account and container properties (or __slots__ which I know we\u0027re not slotting and why). But now, it\u0027s back... which is fine, but I don\u0027t think Im on the same page atm.","commit_id":"f54be2450cdece69049dde4d1f677dc87130038e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f0a41da942cc9d78e46b548f31ab44902db21ded","unresolved":true,"context_lines":[{"line_number":4563,"context_line":"    namespace."},{"line_number":4564,"context_line":""},{"line_number":4565,"context_line":"    :param name: the name of the ``Namespace``; this SHOULD take the form of a"},{"line_number":4566,"context_line":"        path to a container i.e. \u003caccount_name\u003e/\u003ccontainer_name\u003e."},{"line_number":4567,"context_line":"    :param lower: the lower bound of object names contained in the namespace;"},{"line_number":4568,"context_line":"        the lower bound *is not* included in the namespace."},{"line_number":4569,"context_line":"    :param upper: the upper bound of object names contained in the namespace;"}],"source_content_type":"text/x-python","patch_set":7,"id":"81181d52_f57eadda","line":4566,"in_reply_to":"43fe4dd0_67bcaf1f","updated":"2023-12-11 14:25:49.000000000","message":"@Matt - I got pushback on the account and container getters being useful and closely tied to shard naming. I also realised that whilst there are use cases where Namespaces do not need to have the a/c form of name, those use cases do not require a name at all! So I stopped defending that cause 😊\n\nWe\u0027re not adding any slots here and nor are validating the name, so the Namespace class remains efficient. It boils down to adding convenience methods really.","commit_id":"f54be2450cdece69049dde4d1f677dc87130038e"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"cdadf982ca11ebebbbde3065d66f5ef631e8c07a","unresolved":true,"context_lines":[{"line_number":4672,"context_line":"    def container(self):"},{"line_number":4673,"context_line":"        # note: this may raise an IndexError if name does not have the expected"},{"line_number":4674,"context_line":"        # form \u0027a/c\u0027; that is a deliberate trade-off against the overhead of"},{"line_number":4675,"context_line":"        # validating the name every time a Namespace is instantiated."},{"line_number":4676,"context_line":"        return self._name.split(\u0027/\u0027)[1]"},{"line_number":4677,"context_line":""},{"line_number":4678,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":7,"id":"46660393_9047b786","line":4675,"updated":"2023-12-11 05:31:09.000000000","message":"Great comment!\n\nJust thinking out loud here. But I wonder if there is a chance for an index error what\u0027s the best way to handle that.. let the IndexError bubble up and let the called have to deal with it., or do we default to the name there is an index error... on second thought that could cause more unexteded errors, so I think I\u0027d rather it fail.","commit_id":"f54be2450cdece69049dde4d1f677dc87130038e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f0a41da942cc9d78e46b548f31ab44902db21ded","unresolved":true,"context_lines":[{"line_number":4672,"context_line":"    def container(self):"},{"line_number":4673,"context_line":"        # note: this may raise an IndexError if name does not have the expected"},{"line_number":4674,"context_line":"        # form \u0027a/c\u0027; that is a deliberate trade-off against the overhead of"},{"line_number":4675,"context_line":"        # validating the name every time a Namespace is instantiated."},{"line_number":4676,"context_line":"        return self._name.split(\u0027/\u0027)[1]"},{"line_number":4677,"context_line":""},{"line_number":4678,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":7,"id":"e14fcd22_e17de736","line":4675,"in_reply_to":"46660393_9047b786","updated":"2023-12-11 14:25:49.000000000","message":"If we get an IndexError then we\u0027ve written a bug. Before we may have got a ValueError because we constructed ShardRanges (and we still will when we create ShardRanges).\n\nI also thought about defaulting to returning the name\n\ni.e. name \u003d\u003d account \u003d\u003d container\n\nbut POLA https://en.wikipedia.org/wiki/Principle_of_least_astonishment#:~:text\u003dIn%20user%20interface%20design%20and,not%20astonish%20or%20surprise%20users.","commit_id":"f54be2450cdece69049dde4d1f677dc87130038e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f0a41da942cc9d78e46b548f31ab44902db21ded","unresolved":true,"context_lines":[{"line_number":4680,"context_line":"        return self._name"},{"line_number":4681,"context_line":""},{"line_number":4682,"context_line":"    @name.setter"},{"line_number":4683,"context_line":"    def name(self, name):"},{"line_number":4684,"context_line":"        # We deliberately do not validate that the name has the form \u0027a/c\u0027"},{"line_number":4685,"context_line":"        # because we want Namespace instantiation to be fast. Namespaces are"},{"line_number":4686,"context_line":"        # typically created using state that has previously been serialized"}],"source_content_type":"text/x-python","patch_set":7,"id":"b878de2a_c7d1f4b9","line":4683,"updated":"2023-12-11 14:25:49.000000000","message":"I realised we don\u0027t need this setter either so I\u0027ll take it out.","commit_id":"f54be2450cdece69049dde4d1f677dc87130038e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f0a41da942cc9d78e46b548f31ab44902db21ded","unresolved":true,"context_lines":[{"line_number":5247,"context_line":"        return self._name"},{"line_number":5248,"context_line":""},{"line_number":5249,"context_line":"    @name.setter"},{"line_number":5250,"context_line":"    def name(self, name):"},{"line_number":5251,"context_line":"        # Override the superclass method to validate the name format. The"},{"line_number":5252,"context_line":"        # ShardRange class is typically used when shard state is created (e.g."},{"line_number":5253,"context_line":"        # by the sharder or swift-manage-shard-ranges), but it is not typically"}],"source_content_type":"text/x-python","patch_set":7,"id":"c985f883_ba8f03ca","line":5250,"updated":"2023-12-11 14:25:49.000000000","message":"this setter is used in tests and the churn was enough to persuade me to leave it alone - this is not the optimised path","commit_id":"f54be2450cdece69049dde4d1f677dc87130038e"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c3b33d650f65a1b4da626bbb854bc591fc0a530f","unresolved":true,"context_lines":[{"line_number":4669,"context_line":""},{"line_number":4670,"context_line":"    @name.setter"},{"line_number":4671,"context_line":"    def name(self, path):"},{"line_number":4672,"context_line":"        self._name \u003d self._encode(path)"},{"line_number":4673,"context_line":""},{"line_number":4674,"context_line":"    @property"},{"line_number":4675,"context_line":"    def lower(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"b1704554_53b919e5","side":"PARENT","line":4672,"updated":"2023-12-12 19:22:29.000000000","message":"good riddence!","commit_id":"7dadc5cac1e47605def54c78ebb10744e0239620"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c3b33d650f65a1b4da626bbb854bc591fc0a530f","unresolved":true,"context_lines":[{"line_number":5233,"context_line":""},{"line_number":5234,"context_line":"    @account.setter"},{"line_number":5235,"context_line":"    def account(self, value):"},{"line_number":5236,"context_line":"        self._account \u003d self._encode(value)"},{"line_number":5237,"context_line":""},{"line_number":5238,"context_line":"    @property"},{"line_number":5239,"context_line":"    def container(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"60f92a7c_d2150c04","side":"PARENT","line":5236,"updated":"2023-12-12 19:22:29.000000000","message":"oic, these are gone - so it\u0027s good they\u0027re no longer tested ;)","commit_id":"7dadc5cac1e47605def54c78ebb10744e0239620"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c3b33d650f65a1b4da626bbb854bc591fc0a530f","unresolved":true,"context_lines":[{"line_number":5258,"context_line":""},{"line_number":5259,"context_line":"    @name.setter"},{"line_number":5260,"context_line":"    def name(self, name):"},{"line_number":5261,"context_line":"        self._name \u003d self._validate_name(self._encode(name))"},{"line_number":5262,"context_line":""},{"line_number":5263,"context_line":"    @property"},{"line_number":5264,"context_line":"    def timestamp(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"2e249486_4f581ec6","line":5261,"updated":"2023-12-12 19:22:29.000000000","message":"oic, encode then validate - at least we don\u0027t have the setter on Namespace anymore.","commit_id":"93f812a5186f31bcdfcfb97f7f885605ada6819a"}],"test/unit/common/test_utils.py":[{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"e947a8903dd406af6260afabefa865ee57737b3a","unresolved":true,"context_lines":[{"line_number":7589,"context_line":"        ns \u003d utils.Namespace(path.encode(\u0027utf8\u0027), \u0027l\u0027, \u0027u\u0027)"},{"line_number":7590,"context_line":"        self._check_name_account_container(ns, path)"},{"line_number":7591,"context_line":"        # name setter"},{"line_number":7592,"context_line":"        path \u003d u\u0027\\n{SNOWMAN}/\\u1234c\u0027"},{"line_number":7593,"context_line":"        ns.name \u003d path"},{"line_number":7594,"context_line":"        self._check_name_account_container(ns, path)"},{"line_number":7595,"context_line":"        ns.name \u003d path.encode(\u0027utf-8\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"169d77b5_1e588a11","line":7592,"updated":"2023-12-07 00:57:50.000000000","message":"Clay asked for explicit tests for utf8 encoded non-ascii byte-strings before.\nhttps://review.opendev.org/c/openstack/swift/+/900350/comment/3fed3742_5224a45a/\n\nI helped to add them.\nhttps://review.opendev.org/c/openstack/swift/+/902856","commit_id":"56a5bc18cdc39129580270cdfc754aec4b760910"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"932fb386b54568861620b8a0b4753ec618b8db63","unresolved":true,"context_lines":[{"line_number":7589,"context_line":"        ns \u003d utils.Namespace(path.encode(\u0027utf8\u0027), \u0027l\u0027, \u0027u\u0027)"},{"line_number":7590,"context_line":"        self._check_name_account_container(ns, path)"},{"line_number":7591,"context_line":"        # name setter"},{"line_number":7592,"context_line":"        path \u003d u\u0027\\n{SNOWMAN}/\\u1234c\u0027"},{"line_number":7593,"context_line":"        ns.name \u003d path"},{"line_number":7594,"context_line":"        self._check_name_account_container(ns, path)"},{"line_number":7595,"context_line":"        ns.name \u003d path.encode(\u0027utf-8\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7dde5ed6_19cafb49","line":7592,"in_reply_to":"169d77b5_1e588a11","updated":"2023-12-07 14:21:08.000000000","message":"argh! that is what the SNOWMAN tests are supposed to be, but the \\N got lower-cased 😕 (I think my IDE has a key chortcut to change case that every now and again I accidentally hit by mistake. I should disable it.)\n\nI think fixing what is here is sufficient, but thank you for offering the follow up, let me know if you still think more is needed.\n\nhttps://docs.python.org/2/reference/lexical_analysis.html#string-literals","commit_id":"56a5bc18cdc39129580270cdfc754aec4b760910"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"15dff5ab454c670cfb69c30a90657fa67b14c87a","unresolved":false,"context_lines":[{"line_number":7589,"context_line":"        ns \u003d utils.Namespace(path.encode(\u0027utf8\u0027), \u0027l\u0027, \u0027u\u0027)"},{"line_number":7590,"context_line":"        self._check_name_account_container(ns, path)"},{"line_number":7591,"context_line":"        # name setter"},{"line_number":7592,"context_line":"        path \u003d u\u0027\\n{SNOWMAN}/\\u1234c\u0027"},{"line_number":7593,"context_line":"        ns.name \u003d path"},{"line_number":7594,"context_line":"        self._check_name_account_container(ns, path)"},{"line_number":7595,"context_line":"        ns.name \u003d path.encode(\u0027utf-8\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9c3a968e_cccabcb9","line":7592,"in_reply_to":"7dde5ed6_19cafb49","updated":"2023-12-07 23:04:03.000000000","message":"I see. I was wondering why Al loves string of \"SNOWMAN\" so much. :-)","commit_id":"56a5bc18cdc39129580270cdfc754aec4b760910"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c3b33d650f65a1b4da626bbb854bc591fc0a530f","unresolved":true,"context_lines":[{"line_number":8171,"context_line":"        self._check_name_account_container(sr, path)"},{"line_number":8172,"context_line":""},{"line_number":8173,"context_line":"        # constructor"},{"line_number":8174,"context_line":"        path \u003d u\u0027\\u1234a/\\n{SNOWMAN}\u0027"},{"line_number":8175,"context_line":"        sr \u003d utils.ShardRange(path, 0, \u0027l\u0027, \u0027u\u0027)"},{"line_number":8176,"context_line":"        self._check_name_account_container(sr, path)"},{"line_number":8177,"context_line":"        # name setter"}],"source_content_type":"text/x-python","patch_set":8,"id":"ea200dc4_061cbb58","side":"PARENT","line":8174,"updated":"2023-12-12 19:22:29.000000000","message":"oh wth, that wasn\u0027t right!","commit_id":"7dadc5cac1e47605def54c78ebb10744e0239620"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c3b33d650f65a1b4da626bbb854bc591fc0a530f","unresolved":true,"context_lines":[{"line_number":8195,"context_line":"        sr.container \u003d \u0027c2\u0027"},{"line_number":8196,"context_line":"        self._check_name_account_container(sr, \u0027a/c2\u0027)"},{"line_number":8197,"context_line":"        sr.container \u003d u\u0027\\n{SNOWMAN}\u0027"},{"line_number":8198,"context_line":"        self._check_name_account_container(sr, u\u0027a/\\n{SNOWMAN}\u0027)"},{"line_number":8199,"context_line":""},{"line_number":8200,"context_line":"    def test_timestamp_setter(self):"},{"line_number":8201,"context_line":"        ts_1 \u003d next(self.ts_iter)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1e8c6e06_1b2c51b6","side":"PARENT","line":8198,"updated":"2023-12-12 19:22:29.000000000","message":"does this remove all users of the account/container setters?\n\nyes it does!  Hooray!","commit_id":"7dadc5cac1e47605def54c78ebb10744e0239620"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c3b33d650f65a1b4da626bbb854bc591fc0a530f","unresolved":true,"context_lines":[{"line_number":7591,"context_line":"        self.assertEqual(\u0027foo\u0027, ns.name)"},{"line_number":7592,"context_line":"        self.assertEqual(\u0027foo\u0027, ns.account)"},{"line_number":7593,"context_line":"        with self.assertRaises(IndexError):"},{"line_number":7594,"context_line":"            ns.container"},{"line_number":7595,"context_line":""},{"line_number":7596,"context_line":"    def test_unicode_name(self):"},{"line_number":7597,"context_line":"        shard_bounds \u003d (\u0027\u0027, \u0027ham\u0027, \u0027pie\u0027, u\u0027\\N{SNOWMAN}\u0027, u\u0027\\U0001F334\u0027, \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"d004b0e1_1e5d3792","line":7594,"updated":"2023-12-12 19:22:29.000000000","message":"quite right!","commit_id":"93f812a5186f31bcdfcfb97f7f885605ada6819a"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c3b33d650f65a1b4da626bbb854bc591fc0a530f","unresolved":true,"context_lines":[{"line_number":8182,"context_line":"        self._check_to_from_dict(\u0027\u0027, \u0027\u0027)"},{"line_number":8183,"context_line":""},{"line_number":8184,"context_line":"    def _check_name_account_container(self, sr, exp_name):"},{"line_number":8185,"context_line":"        # check that the name, account, container properties are consistent"},{"line_number":8186,"context_line":"        exp_account, exp_container \u003d exp_name.split(\u0027/\u0027)"},{"line_number":8187,"context_line":"        if six.PY2:"},{"line_number":8188,"context_line":"            self.assertEqual(exp_name.encode(\u0027utf8\u0027), sr.name)"}],"source_content_type":"text/x-python","patch_set":8,"id":"b9917440_cf1c4c79","line":8185,"updated":"2023-12-12 19:22:29.000000000","message":"is this test helper just duplicated?\n\noic, there\u0027s no common base between TestShardRange \u0026 TestNamespace\n\n903533: tests: conslidate Namespace/ShardRange _check_name | https://review.opendev.org/c/openstack/swift/+/903533","commit_id":"93f812a5186f31bcdfcfb97f7f885605ada6819a"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c3b33d650f65a1b4da626bbb854bc591fc0a530f","unresolved":true,"context_lines":[{"line_number":8204,"context_line":"        self._check_name_account_container(sr, path)"},{"line_number":8205,"context_line":""},{"line_number":8206,"context_line":"        # constructor"},{"line_number":8207,"context_line":"        path \u003d u\u0027\\u1234a/\\N{SNOWMAN}\u0027"},{"line_number":8208,"context_line":"        sr \u003d utils.ShardRange(path, 0, \u0027l\u0027, \u0027u\u0027)"},{"line_number":8209,"context_line":"        self._check_name_account_container(sr, path)"},{"line_number":8210,"context_line":"        sr \u003d utils.ShardRange(path.encode(\u0027utf8\u0027), 0, \u0027l\u0027, \u0027u\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"cd7c7535_d2ac6435","line":8207,"updated":"2023-12-12 19:22:29.000000000","message":"nice catch.","commit_id":"93f812a5186f31bcdfcfb97f7f885605ada6819a"}]}
