)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d555fb19cc669c8e6f37a58b78cfe3aad07742c0","unresolved":false,"context_lines":[{"line_number":11,"context_line":"version \u003d\u003d \u00272.32\u0027 possible, and led to this patch\u0027s related bug. This"},{"line_number":12,"context_line":"patch passes an APIVersionRequest object to extensions and removes"},{"line_number":13,"context_line":"APIVersionRequest\u0027s __eq__ operator to prevent future code from doing"},{"line_number":14,"context_line":"version equality comparisons, which should never be necessary."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: Ic09f4f783307b559c61b1fb522275fd4a0e5f5aa"},{"line_number":17,"context_line":"Related-bug: 1658571"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"1a430d35_1232eef1","line":14,"range":{"start_line":14,"start_character":30,"end_line":14,"end_character":62},"updated":"2017-02-03 19:35:21.000000000","message":"You\u0027ll be eating these words some day probably.","commit_id":"bb5a432b433f9277584e6c5240c7d7ecdf75bdb5"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"7585098557c555ad4f1486d0e0b0665146621828","unresolved":false,"context_lines":[{"line_number":11,"context_line":"version \u003d\u003d \u00272.32\u0027 possible, and led to this patch\u0027s related bug. This"},{"line_number":12,"context_line":"patch passes an APIVersionRequest object to extensions and removes"},{"line_number":13,"context_line":"APIVersionRequest\u0027s __eq__ operator to prevent future code from doing"},{"line_number":14,"context_line":"version equality comparisons, which should never be necessary."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: Ic09f4f783307b559c61b1fb522275fd4a0e5f5aa"},{"line_number":17,"context_line":"Related-bug: 1658571"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"1a430d35_78cf8cb0","line":14,"range":{"start_line":14,"start_character":30,"end_line":14,"end_character":62},"in_reply_to":"1a430d35_1232eef1","updated":"2017-02-03 19:51:51.000000000","message":"640k ought to be enough for anyone, he scoffed...","commit_id":"bb5a432b433f9277584e6c5240c7d7ecdf75bdb5"}],"nova/api/openstack/api_version_request.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d555fb19cc669c8e6f37a58b78cfe3aad07742c0","unresolved":false,"context_lines":[{"line_number":205,"context_line":"                (other.ver_major, other.ver_minor))"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    def __le__(self, other):"},{"line_number":208,"context_line":"        return self \u003c other or ((self.ver_major, self.ver_minor) \u003d\u003d"},{"line_number":209,"context_line":"                                (other.ver_major, other.ver_minor))"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    def __ne__(self, other):"},{"line_number":212,"context_line":"        return not ((self.ver_major, self.ver_minor) \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a430d35_522b9682","line":209,"range":{"start_line":208,"start_character":31,"end_line":209,"end_character":67},"updated":"2017-02-03 19:35:21.000000000","message":"I wonder if we should create like an __is_equal() method or something for just avoiding the duplication here, and have a big comment on that about how we don\u0027t implement __eq__ intentionally and explain why.","commit_id":"bb5a432b433f9277584e6c5240c7d7ecdf75bdb5"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"7585098557c555ad4f1486d0e0b0665146621828","unresolved":false,"context_lines":[{"line_number":205,"context_line":"                (other.ver_major, other.ver_minor))"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    def __le__(self, other):"},{"line_number":208,"context_line":"        return self \u003c other or ((self.ver_major, self.ver_minor) \u003d\u003d"},{"line_number":209,"context_line":"                                (other.ver_major, other.ver_minor))"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    def __ne__(self, other):"},{"line_number":212,"context_line":"        return not ((self.ver_major, self.ver_minor) \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a430d35_38eee422","line":209,"range":{"start_line":208,"start_character":31,"end_line":209,"end_character":67},"in_reply_to":"1a430d35_522b9682","updated":"2017-02-03 19:51:51.000000000","message":"I had that in a previous version [1]... I fear future developers will see the weirdly named equal method, think \"huh\", ignore that big comment, and use it anyways, which will defeat the whole point of this patch. I agree it makes the code cleaner though, I so I\u0027m open to being convinced :)\n\n[1] https://review.openstack.org/#/c/425876/8/nova/api/openstack/api_version_request.py","commit_id":"bb5a432b433f9277584e6c5240c7d7ecdf75bdb5"},{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"cd067f9663ee64b87596afdcafd64da310579e7e","unresolved":false,"context_lines":[{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    def __le__(self, other):"},{"line_number":215,"context_line":"        return self \u003c other or ((self.ver_major, self.ver_minor) \u003d\u003d"},{"line_number":216,"context_line":"                                (other.ver_major, other.ver_minor))"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    def __ne__(self, other):"},{"line_number":219,"context_line":"        return not ((self.ver_major, self.ver_minor) \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_0b7d986d","line":216,"updated":"2017-05-27 09:47:35.000000000","message":"yeah, there is no __eq__ now )","commit_id":"8eba9115fbf9fc85bc130737f4a8c88f1e2fb54d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"5a6376a0495a8150ad2d3bae58aa61de6cf2eaaa","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        return ((self.ver_major, self.ver_minor) \u003c"},{"line_number":224,"context_line":"                (other.ver_major, other.ver_minor))"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    def __eq__(self, other):"},{"line_number":227,"context_line":"        if not isinstance(other, APIVersionRequest):"},{"line_number":228,"context_line":"            raise self._format_type_error(other)"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"        return ((self.ver_major, self.ver_minor) \u003d\u003d"},{"line_number":231,"context_line":"                (other.ver_major, other.ver_minor))"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    def __gt__(self, other):"},{"line_number":234,"context_line":"        if not isinstance(other, APIVersionRequest):"}],"source_content_type":"text/x-python","patch_set":12,"id":"7f287b81_21a262fe","side":"PARENT","line":231,"range":{"start_line":226,"start_character":0,"end_line":231,"end_character":51},"updated":"2017-08-28 10:37:36.000000000","message":"I\u0027m still not sure why we need to get rid of this entirely? Why aren\u0027t the first two lines of this doing anything?","commit_id":"5cf3d55259404ba71dda96bcf4fbed30e5aac87c"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"9c41e9005f6f4d6d655b6f44827e0a6eb078d36e","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        return ((self.ver_major, self.ver_minor) \u003c"},{"line_number":224,"context_line":"                (other.ver_major, other.ver_minor))"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    def __eq__(self, other):"},{"line_number":227,"context_line":"        if not isinstance(other, APIVersionRequest):"},{"line_number":228,"context_line":"            raise self._format_type_error(other)"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"        return ((self.ver_major, self.ver_minor) \u003d\u003d"},{"line_number":231,"context_line":"                (other.ver_major, other.ver_minor))"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    def __gt__(self, other):"},{"line_number":234,"context_line":"        if not isinstance(other, APIVersionRequest):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f4b6375_3d362ae8","side":"PARENT","line":231,"range":{"start_line":226,"start_character":0,"end_line":231,"end_character":51},"in_reply_to":"3f4b6375_e24fd18f","updated":"2017-10-23 16:12:17.000000000","message":"Well... \u003d\u003d should never be used when doing version checking, so I don\u0027t think it\u0027s a heady handed thing to remove it to avoid potential mistakes, even if such a mistake has only happened once so far. We scrambled to fix it before the pike FF IIRC, and that\u0027s not something I\u0027d like to repeat if possible. But if you\u0027d prefer to trust devs and reviewers and leave \u003d\u003d as an available operator, I\u0027m OK with that as well.","commit_id":"5cf3d55259404ba71dda96bcf4fbed30e5aac87c"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"4ef420756afd93819ce6e2800a0819aa1d763545","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        return ((self.ver_major, self.ver_minor) \u003c"},{"line_number":224,"context_line":"                (other.ver_major, other.ver_minor))"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    def __eq__(self, other):"},{"line_number":227,"context_line":"        if not isinstance(other, APIVersionRequest):"},{"line_number":228,"context_line":"            raise self._format_type_error(other)"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"        return ((self.ver_major, self.ver_minor) \u003d\u003d"},{"line_number":231,"context_line":"                (other.ver_major, other.ver_minor))"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    def __gt__(self, other):"},{"line_number":234,"context_line":"        if not isinstance(other, APIVersionRequest):"}],"source_content_type":"text/x-python","patch_set":12,"id":"9f5c4f37_b6097fde","side":"PARENT","line":231,"range":{"start_line":226,"start_character":0,"end_line":231,"end_character":51},"in_reply_to":"7f287b81_21a262fe","updated":"2017-09-21 15:46:24.000000000","message":"Why get rid of the __eq__ operator entirely? So that mistakes like [1] don\u0027t happen again :)\n\n[1] https://review.openstack.org/#/c/304510/64/nova/api/openstack/compute/block_device_mapping.py@77","commit_id":"5cf3d55259404ba71dda96bcf4fbed30e5aac87c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9c7cab7a559b0e5de18268a69e59d1ec49e2adab","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        return ((self.ver_major, self.ver_minor) \u003c"},{"line_number":224,"context_line":"                (other.ver_major, other.ver_minor))"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    def __eq__(self, other):"},{"line_number":227,"context_line":"        if not isinstance(other, APIVersionRequest):"},{"line_number":228,"context_line":"            raise self._format_type_error(other)"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"        return ((self.ver_major, self.ver_minor) \u003d\u003d"},{"line_number":231,"context_line":"                (other.ver_major, other.ver_minor))"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    def __gt__(self, other):"},{"line_number":234,"context_line":"        if not isinstance(other, APIVersionRequest):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f4b6375_e24fd18f","side":"PARENT","line":231,"range":{"start_line":226,"start_character":0,"end_line":231,"end_character":51},"in_reply_to":"9f5c4f37_b6097fde","updated":"2017-10-23 16:06:14.000000000","message":"Ah. Hmm, seems a little heavy handed given that that issue has happened exactly once?","commit_id":"5cf3d55259404ba71dda96bcf4fbed30e5aac87c"}],"nova/api/openstack/compute/availability_zone.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d555fb19cc669c8e6f37a58b78cfe3aad07742c0","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        create_kwargs[\u0027availability_zone\u0027] \u003d server_dict.get(ATTRIBUTE_NAME)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def get_server_create_schema(self, version):"},{"line_number":154,"context_line":"        if version \u003c\u003d api_version_request.APIVersionRequest(\u00272.0\u0027):"},{"line_number":155,"context_line":"            return schema.server_create_v20"},{"line_number":156,"context_line":"        return schema.server_create"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a430d35_52871661","line":154,"range":{"start_line":154,"start_character":19,"end_line":154,"end_character":21},"updated":"2017-02-03 19:35:21.000000000","message":"This is an odd one since we don\u0027t go less than 2.0 but you have to do it this way because we don\u0027t have __eq__.","commit_id":"bb5a432b433f9277584e6c5240c7d7ecdf75bdb5"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"7585098557c555ad4f1486d0e0b0665146621828","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        create_kwargs[\u0027availability_zone\u0027] \u003d server_dict.get(ATTRIBUTE_NAME)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def get_server_create_schema(self, version):"},{"line_number":154,"context_line":"        if version \u003c\u003d api_version_request.APIVersionRequest(\u00272.0\u0027):"},{"line_number":155,"context_line":"            return schema.server_create_v20"},{"line_number":156,"context_line":"        return schema.server_create"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a430d35_7846ac24","line":154,"range":{"start_line":154,"start_character":19,"end_line":154,"end_character":21},"in_reply_to":"1a430d35_52871661","updated":"2017-02-03 19:51:51.000000000","message":"Yeah, same debate as removing __eq__ entirely or just calling it something else. Like I said in the previous comment, I think it\u0027s more rigorous with no __eq__ equivalent (hah!), but having _equals() or whatever we call it makes the code cleaner.","commit_id":"bb5a432b433f9277584e6c5240c7d7ecdf75bdb5"}],"nova/api/openstack/compute/security_groups.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c1be581a6f24dd42e0d1bcd9ea3280d39d63d00a","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from oslo_serialization import jsonutils"},{"line_number":20,"context_line":"from webob import exc"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from nova.api.openstack.api_version_request \\"},{"line_number":23,"context_line":"    import MAX_PROXY_API_SUPPORT_VERSION"},{"line_number":24,"context_line":"from nova.api.openstack import common"},{"line_number":25,"context_line":"from nova.api.openstack.compute.schemas import security_groups as \\"},{"line_number":26,"context_line":"                                                  schema_security_groups"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff82abbf_5a6fb291","side":"PARENT","line":23,"range":{"start_line":22,"start_character":0,"end_line":23,"end_character":40},"updated":"2017-11-22 09:44:30.000000000","message":"Oh yeah, boo. How odd that flake8 didn\u0027t catch this","commit_id":"5cf3d55259404ba71dda96bcf4fbed30e5aac87c"}],"nova/api/openstack/compute/servers.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d555fb19cc669c8e6f37a58b78cfe3aad07742c0","unresolved":false,"context_lines":[{"line_number":173,"context_line":"            self.create_schema_manager.map("},{"line_number":174,"context_line":"                self._create_extension_schema,"},{"line_number":175,"context_line":"                self.schema_server_create_v242,"},{"line_number":176,"context_line":"                api_version_request.APIVersionRequest(\u00272.42\u0027))"},{"line_number":177,"context_line":"            self.create_schema_manager.map("},{"line_number":178,"context_line":"                self._create_extension_schema,"},{"line_number":179,"context_line":"                self.schema_server_create_v237,"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a430d35_526396b1","line":176,"range":{"start_line":176,"start_character":16,"end_line":176,"end_character":61},"updated":"2017-02-03 19:35:21.000000000","message":"Wouldn\u0027t simply passing the object instead of the str to _create_extension_schema method do what we need and allows us to keep __eq__ since that checks if the thing being compared to is an APIVersionRequest, which would fail if compared to a str like in the bug. I know that isn\u0027t foolproof since some other API code could be passing strings and checking strings in both places...damn untyped python.\n\nI just don\u0027t like the \u003c\u003d 2.0 stuff. I\u0027m trying to think if there is an easier way to handle this, like intercepting the args passed to _create_extension_schema and validate the type we need...","commit_id":"bb5a432b433f9277584e6c5240c7d7ecdf75bdb5"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"7585098557c555ad4f1486d0e0b0665146621828","unresolved":false,"context_lines":[{"line_number":173,"context_line":"            self.create_schema_manager.map("},{"line_number":174,"context_line":"                self._create_extension_schema,"},{"line_number":175,"context_line":"                self.schema_server_create_v242,"},{"line_number":176,"context_line":"                api_version_request.APIVersionRequest(\u00272.42\u0027))"},{"line_number":177,"context_line":"            self.create_schema_manager.map("},{"line_number":178,"context_line":"                self._create_extension_schema,"},{"line_number":179,"context_line":"                self.schema_server_create_v237,"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a430d35_98cef881","line":176,"range":{"start_line":176,"start_character":16,"end_line":176,"end_character":61},"in_reply_to":"1a430d35_526396b1","updated":"2017-02-03 19:51:51.000000000","message":"In my mind the point of passing APIVersionRequest isn\u0027t just to avoid version \u003d\u003d \u0027some string\u0027, but to avoid \u003d\u003d entirely, since I can\u0027t see a non-bug case where it would be necessary. Once we add something to the API, it\u0027ll remain there until removed by a deprecation, so \u003e\u003d and \u003c\u003d should cover us. And if we do need to use \u003d\u003d because we screwed up somehow, we can always do the clunky (\u003e\u003d and \u003c\u003d). So again, more rigorous without __eq__ entirely, cleaner code with some sort of __eq__ replacement.","commit_id":"bb5a432b433f9277584e6c5240c7d7ecdf75bdb5"}],"nova/api/openstack/compute/user_data.py":[{"author":{"_account_id":15293,"name":"Karen Bradshaw","email":"kbhawkey@gmail.com","username":"karenb"},"change_message_id":"62b4cbbb4b0ac2358ca0b45106d5eb9824ac9f21","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def get_server_create_schema(self, version):"},{"line_number":43,"context_line":"        if version \u003c\u003d api_version_request.APIVersionRequest(\u00272.0\u0027):"},{"line_number":44,"context_line":"            return schema_user_data.server_create_v20"},{"line_number":45,"context_line":"        return schema_user_data.server_create"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a461143_ce78712e","line":44,"updated":"2017-01-27 15:55:05.000000000","message":"Does this update have a corresponding test(s) for checking for version 2.0 and versions less than 2.0?","commit_id":"91638ae5ff5a2fe2b1cbe64433dd8b33180787a7"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"5bc2a24c468991ce3b2a74023334ca8fdafba30d","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def get_server_create_schema(self, version):"},{"line_number":43,"context_line":"        if version \u003c\u003d api_version_request.APIVersionRequest(\u00272.0\u0027):"},{"line_number":44,"context_line":"            return schema_user_data.server_create_v20"},{"line_number":45,"context_line":"        return schema_user_data.server_create"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a461143_ce223101","line":44,"in_reply_to":"3a461143_ce78712e","updated":"2017-01-27 15:58:55.000000000","message":"I don\u0027t think new tests are necessary - the API version can\u0027t be less than 2.0. The change in comparison from \u003d\u003d to \u003c\u003d is because APIVersionRequest\u0027s __eq__ operator has been removed.","commit_id":"91638ae5ff5a2fe2b1cbe64433dd8b33180787a7"}]}
