)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":27909,"name":"Aija Jauntēva","email":"code@clusums.eu","username":"ajya"},"change_message_id":"8c969d77e2c2db1b56f913df32f49112bb2760b9","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Debayan Ray \u003cdebayan.ray@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-07-11 09:52:52 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Introduces ``cache_it`` decorator"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Right now the nested resource property methods contain a lot of"},{"line_number":10,"context_line":"repetitive code for caching purpose. This utility ``cache_it``"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5f7c97a3_c3f7955a","line":7,"range":{"start_line":7,"start_character":9,"end_line":7,"end_character":10},"updated":"2018-07-11 12:43:35.000000000","message":"\"Introduce\"?","commit_id":"af6b6ea5f14866ad1f9e884b0c36b9ec053942dc"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"822bc1ac8c23572ff993890ebd360e0176697269","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Debayan Ray \u003cdebayan.ray@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-07-11 09:52:52 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Introduces ``cache_it`` decorator"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Right now the nested resource property methods contain a lot of"},{"line_number":10,"context_line":"repetitive code for caching purpose. This utility ``cache_it``"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5f7c97a3_3384845d","line":7,"range":{"start_line":7,"start_character":9,"end_line":7,"end_character":10},"in_reply_to":"5f7c97a3_c3f7955a","updated":"2018-07-12 07:35:01.000000000","message":"Done","commit_id":"af6b6ea5f14866ad1f9e884b0c36b9ec053942dc"},{"author":{"_account_id":27909,"name":"Aija Jauntēva","email":"code@clusums.eu","username":"ajya"},"change_message_id":"8c969d77e2c2db1b56f913df32f49112bb2760b9","unresolved":false,"context_lines":[{"line_number":10,"context_line":"repetitive code for caching purpose. This utility ``cache_it``"},{"line_number":11,"context_line":"decorator attempts to reduce that code bloat to some extent."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Also removed unnecessary array boxing of generator object in"},{"line_number":14,"context_line":"``utils.max_safe()`` function."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I7404a15beb029cb282ac6b84bb8b8fdb97ebcd4c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5f7c97a3_43e4e5a8","line":14,"range":{"start_line":13,"start_character":0,"end_line":14,"end_character":30},"updated":"2018-07-11 12:43:35.000000000","message":"I think this should be another patch, does not look like it has anything to do with `cache_it` decorator.","commit_id":"af6b6ea5f14866ad1f9e884b0c36b9ec053942dc"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"822bc1ac8c23572ff993890ebd360e0176697269","unresolved":false,"context_lines":[{"line_number":10,"context_line":"repetitive code for caching purpose. This utility ``cache_it``"},{"line_number":11,"context_line":"decorator attempts to reduce that code bloat to some extent."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Also removed unnecessary array boxing of generator object in"},{"line_number":14,"context_line":"``utils.max_safe()`` function."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I7404a15beb029cb282ac6b84bb8b8fdb97ebcd4c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5f7c97a3_538ca07f","line":14,"range":{"start_line":13,"start_character":0,"end_line":14,"end_character":30},"in_reply_to":"5f7c97a3_43e4e5a8","updated":"2018-07-12 07:35:01.000000000","message":"Makes sense, will remove its traces from this patch.","commit_id":"af6b6ea5f14866ad1f9e884b0c36b9ec053942dc"}],"sushy/resources/base.py":[{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"e9baa2a8e52f68ec7262871b3c2abc2e023e2b2e","unresolved":false,"context_lines":[{"line_number":401,"context_line":"        \"\"\""},{"line_number":402,"context_line":"        return [self.get_member(id_) for id_ in self.members_identities]"},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"    def _do_refresh(self, force):"},{"line_number":405,"context_line":"        \"\"\"Do refresh related activities."},{"line_number":406,"context_line":""},{"line_number":407,"context_line":"        Invalidate / Undefine the cache attributes here for fresh evaluation"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_71c14b2f","line":404,"range":{"start_line":404,"start_character":8,"end_line":404,"end_character":19},"updated":"2018-10-10 09:53:07.000000000","message":"Would it make sense to clear cache in the base class to save on method override in the subclasses?","commit_id":"8c129a84a6282ade4cf6b67bea9a7a62e34179d9"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"02d2c6c6ab7758d0cb8e423221d3b8cb57d1464d","unresolved":false,"context_lines":[{"line_number":401,"context_line":"        \"\"\""},{"line_number":402,"context_line":"        return [self.get_member(id_) for id_ in self.members_identities]"},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"    def _do_refresh(self, force):"},{"line_number":405,"context_line":"        \"\"\"Do refresh related activities."},{"line_number":406,"context_line":""},{"line_number":407,"context_line":"        Invalidate / Undefine the cache attributes here for fresh evaluation"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_f8e55408","line":404,"range":{"start_line":404,"start_character":8,"end_line":404,"end_character":19},"in_reply_to":"3f79a3b5_71c14b2f","updated":"2018-10-22 07:02:28.000000000","message":"Some resource classes may not have any cache attributes defined. For them it may be unnecessary.","commit_id":"8c129a84a6282ade4cf6b67bea9a7a62e34179d9"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d0156e81118716e0115d190e1d25b3882ff3cb11","unresolved":false,"context_lines":[{"line_number":409,"context_line":"        can also follow in future, if needed."},{"line_number":410,"context_line":"        \"\"\""},{"line_number":411,"context_line":"        super(ResourceCollectionBase, self)._do_refresh(force\u003dforce)"},{"line_number":412,"context_line":"        utils.cache_clear(self, force)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_05018eb5","line":412,"updated":"2018-10-24 10:41:59.000000000","message":"cannot we move this to the base class?","commit_id":"27c725cbb8a2a5d55d9e74519ad5e386b2fe50c4"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"154fc733d7d79860003cd2ea92d04790b8ec13fd","unresolved":false,"context_lines":[{"line_number":409,"context_line":"        can also follow in future, if needed."},{"line_number":410,"context_line":"        \"\"\""},{"line_number":411,"context_line":"        super(ResourceCollectionBase, self)._do_refresh(force\u003dforce)"},{"line_number":412,"context_line":"        utils.cache_clear(self, force)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_f242010d","line":412,"in_reply_to":"3f79a3b5_05018eb5","updated":"2018-10-25 05:31:27.000000000","message":"\u003e cannot we move this to the base class?\n\nIlya also pointed this out to me here [1]. Possibly it wouldn\u0027t matter after all if I move this up.\n\n[1] https://review.openstack.org/#/c/581645/5/sushy/resources/base.py@404","commit_id":"27c725cbb8a2a5d55d9e74519ad5e386b2fe50c4"}],"sushy/resources/manager/manager.py":[{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"e9baa2a8e52f68ec7262871b3c2abc2e023e2b2e","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        \"\"\""},{"line_number":88,"context_line":"        super(Manager, self).__init__(connector, identity, redfish_version)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def _do_refresh(self, force):"},{"line_number":91,"context_line":"        super(Manager, self)._do_refresh(force\u003dforce)"},{"line_number":92,"context_line":"        utils.cache_clear(self, force)"},{"line_number":93,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_5630c506","line":90,"range":{"start_line":90,"start_character":26,"end_line":90,"end_character":31},"updated":"2018-10-10 09:53:07.000000000","message":"Do we need to keep this parameter defaulted?","commit_id":"8c129a84a6282ade4cf6b67bea9a7a62e34179d9"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"02d2c6c6ab7758d0cb8e423221d3b8cb57d1464d","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        \"\"\""},{"line_number":88,"context_line":"        super(Manager, self).__init__(connector, identity, redfish_version)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def _do_refresh(self, force):"},{"line_number":91,"context_line":"        super(Manager, self)._do_refresh(force\u003dforce)"},{"line_number":92,"context_line":"        utils.cache_clear(self, force)"},{"line_number":93,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_15c0197d","line":90,"range":{"start_line":90,"start_character":26,"end_line":90,"end_character":31},"in_reply_to":"3f79a3b5_5630c506","updated":"2018-10-22 07:02:28.000000000","message":"What I noticed is the actual definition of this method in ResourceBase carries a non-defaulted method argument [1] and I believe it\u0027s right that way. So, I am trying to maintain the consistency all through out. What that means is whenever ``_do_refresh()`` is invoked it has to be invoked with explicit argument.\n\n[1] https://github.com/openstack/sushy/blob/master/sushy/resources/base.py#L312","commit_id":"8c129a84a6282ade4cf6b67bea9a7a62e34179d9"}],"sushy/resources/sessionservice/sessionservice.py":[{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"e9baa2a8e52f68ec7262871b3c2abc2e023e2b2e","unresolved":false,"context_lines":[{"line_number":76,"context_line":"            self._conn, self._get_sessions_collection_path(),"},{"line_number":77,"context_line":"            redfish_version\u003dself.redfish_version)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def _do_refresh(self, force):"},{"line_number":80,"context_line":"        \"\"\"Do custom resource specific refresh activities"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        On refresh, all sub-resources are marked as stale, i.e."}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_767ce1b5","line":79,"range":{"start_line":79,"start_character":8,"end_line":79,"end_character":19},"updated":"2018-10-10 09:53:07.000000000","message":"Do we need to call `_do_refresh` on the parent class? It seems to be called elsewhere.","commit_id":"8c129a84a6282ade4cf6b67bea9a7a62e34179d9"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"02d2c6c6ab7758d0cb8e423221d3b8cb57d1464d","unresolved":false,"context_lines":[{"line_number":76,"context_line":"            self._conn, self._get_sessions_collection_path(),"},{"line_number":77,"context_line":"            redfish_version\u003dself.redfish_version)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def _do_refresh(self, force):"},{"line_number":80,"context_line":"        \"\"\"Do custom resource specific refresh activities"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        On refresh, all sub-resources are marked as stale, i.e."}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_b52b6530","line":79,"range":{"start_line":79,"start_character":8,"end_line":79,"end_character":19},"in_reply_to":"3f79a3b5_767ce1b5","updated":"2018-10-22 07:02:28.000000000","message":"Ideally it should. But as long as the base definition doesn\u0027t carry any implementation definition [1] it seems fine. But what if something gets added in future? then we will again have to come back to it to induct that base method call in here. So I will better add that now!\n\n[1] https://github.com/openstack/sushy/blob/master/sushy/resources/base.py#L312","commit_id":"8c129a84a6282ade4cf6b67bea9a7a62e34179d9"}],"sushy/resources/system/bios.py":[{"author":{"_account_id":27909,"name":"Aija Jauntēva","email":"code@clusums.eu","username":"ajya"},"change_message_id":"8c969d77e2c2db1b56f913df32f49112bb2760b9","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @property"},{"line_number":64,"context_line":"    @utils.cache_it"},{"line_number":65,"context_line":"    def pending_settings_resource(self):"},{"line_number":66,"context_line":"        \"\"\"Pending BIOS settings resource\"\"\""},{"line_number":67,"context_line":"        return Bios("},{"line_number":68,"context_line":"            self._conn,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_031fcd71","line":65,"range":{"start_line":65,"start_character":4,"end_line":65,"end_character":40},"updated":"2018-07-11 12:43:35.000000000","message":"we don\u0027t want this to be public property (it was not before). Can this somehow support private cached properties?","commit_id":"af6b6ea5f14866ad1f9e884b0c36b9ec053942dc"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"822bc1ac8c23572ff993890ebd360e0176697269","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @property"},{"line_number":64,"context_line":"    @utils.cache_it"},{"line_number":65,"context_line":"    def pending_settings_resource(self):"},{"line_number":66,"context_line":"        \"\"\"Pending BIOS settings resource\"\"\""},{"line_number":67,"context_line":"        return Bios("},{"line_number":68,"context_line":"            self._conn,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_13cdc8b9","line":65,"range":{"start_line":65,"start_character":4,"end_line":65,"end_character":40},"in_reply_to":"5f7c97a3_031fcd71","updated":"2018-07-12 07:35:01.000000000","message":"I have taken care of this now. Please have a look.","commit_id":"af6b6ea5f14866ad1f9e884b0c36b9ec053942dc"},{"author":{"_account_id":27909,"name":"Aija Jauntēva","email":"code@clusums.eu","username":"ajya"},"change_message_id":"b61af3b970204e550959b9999cb81d04e2a0e5e0","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        \"\"\""},{"line_number":99,"context_line":"        self._settings.commit(self._conn,"},{"line_number":100,"context_line":"                              {\u0027Attributes\u0027: value})"},{"line_number":101,"context_line":"        utils.cache_clear(self, force_refresh\u003dFalse,"},{"line_number":102,"context_line":"                          only_these\u003d[\u0027_pending_settings_resource\u0027])"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def _get_reset_bios_action_element(self):"},{"line_number":105,"context_line":"        actions \u003d self._actions"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_6877e2a0","line":102,"range":{"start_line":101,"start_character":8,"end_line":102,"end_character":68},"updated":"2018-07-18 08:52:44.000000000","message":"Can this be other way around? So that still using \u0027invalidate\u0027 and inside \u0027invalidate\u0027 it also clears the cache?","commit_id":"6ee2d08647eb4c653784f7847b823a38566f5c35"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ca29df6929cfc11b6b4ac1d941279ef3a2c3389c","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        self._settings.commit(self._conn,"},{"line_number":100,"context_line":"                              {\u0027Attributes\u0027: value})"},{"line_number":101,"context_line":"        utils.cache_clear(self, force_refresh\u003dFalse,"},{"line_number":102,"context_line":"                          only_these\u003d[\u0027_pending_settings_resource\u0027])"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def _get_reset_bios_action_element(self):"},{"line_number":105,"context_line":"        actions \u003d self._actions"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_40265bbc","line":102,"updated":"2018-07-19 12:54:20.000000000","message":"the cache is on \u0027self\u0027, not inside \u0027_pending_settings_resource\u0027, so I suspect it won\u0027t work","commit_id":"6ee2d08647eb4c653784f7847b823a38566f5c35"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"6c5b374f85510ecdc0ed8ebced0b3a73dbf078f8","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        self._settings.commit(self._conn,"},{"line_number":100,"context_line":"                              {\u0027Attributes\u0027: value})"},{"line_number":101,"context_line":"        utils.cache_clear(self, force_refresh\u003dFalse,"},{"line_number":102,"context_line":"                          only_these\u003d[\u0027_pending_settings_resource\u0027])"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def _get_reset_bios_action_element(self):"},{"line_number":105,"context_line":"        actions \u003d self._actions"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_efc4f362","line":102,"in_reply_to":"5f7c97a3_40265bbc","updated":"2018-09-24 11:07:54.000000000","message":"Yeah, that\u0027s true. The cache vars are stored on \u0027self\u0027. As a matter of fact, the cache variable will be internally named as ``_cahe__pending_settings_resource`` attached to \u0027self\u0027.","commit_id":"6ee2d08647eb4c653784f7847b823a38566f5c35"}],"sushy/resources/system/simple_storage.py":[{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"e9baa2a8e52f68ec7262871b3c2abc2e023e2b2e","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        \"\"\""},{"line_number":85,"context_line":"        return utils.max_safe(self.disks_sizes_bytes)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def _do_refresh(self, force):"},{"line_number":88,"context_line":"        super(SimpleStorageCollection, self)._do_refresh(force\u003dforce)"},{"line_number":89,"context_line":"        utils.cache_clear(self, force)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_31d99327","line":87,"range":{"start_line":87,"start_character":26,"end_line":87,"end_character":31},"updated":"2018-10-10 09:53:07.000000000","message":"Default disappeared","commit_id":"8c129a84a6282ade4cf6b67bea9a7a62e34179d9"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"02d2c6c6ab7758d0cb8e423221d3b8cb57d1464d","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        \"\"\""},{"line_number":85,"context_line":"        return utils.max_safe(self.disks_sizes_bytes)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def _do_refresh(self, force):"},{"line_number":88,"context_line":"        super(SimpleStorageCollection, self)._do_refresh(force\u003dforce)"},{"line_number":89,"context_line":"        utils.cache_clear(self, force)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_d5eaa1d7","line":87,"range":{"start_line":87,"start_character":26,"end_line":87,"end_character":31},"in_reply_to":"3f79a3b5_31d99327","updated":"2018-10-22 07:02:28.000000000","message":"As explained in https://review.openstack.org/#/c/581645/5/sushy/resources/manager/manager.py@90","commit_id":"8c129a84a6282ade4cf6b67bea9a7a62e34179d9"}],"sushy/resources/system/storage/storage.py":[{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"e9baa2a8e52f68ec7262871b3c2abc2e023e2b2e","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            self._conn, utils.get_sub_resource_path_by(self, \u0027Volumes\u0027),"},{"line_number":96,"context_line":"            redfish_version\u003dself.redfish_version)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def _do_refresh(self, force):"},{"line_number":99,"context_line":"        \"\"\"Do resource specific refresh activities.\"\"\""},{"line_number":100,"context_line":"        # Note(deray): invalidate / undefine the attributes here for fresh"},{"line_number":101,"context_line":"        # evaluation in subsequent calls to it\u0027s exposed property."}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_91d187fb","line":98,"range":{"start_line":98,"start_character":26,"end_line":98,"end_character":31},"updated":"2018-10-10 09:53:07.000000000","message":"Default disappeared","commit_id":"8c129a84a6282ade4cf6b67bea9a7a62e34179d9"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"02d2c6c6ab7758d0cb8e423221d3b8cb57d1464d","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            self._conn, utils.get_sub_resource_path_by(self, \u0027Volumes\u0027),"},{"line_number":96,"context_line":"            redfish_version\u003dself.redfish_version)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def _do_refresh(self, force):"},{"line_number":99,"context_line":"        \"\"\"Do resource specific refresh activities.\"\"\""},{"line_number":100,"context_line":"        # Note(deray): invalidate / undefine the attributes here for fresh"},{"line_number":101,"context_line":"        # evaluation in subsequent calls to it\u0027s exposed property."}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_75b38d0a","line":98,"range":{"start_line":98,"start_character":26,"end_line":98,"end_character":31},"in_reply_to":"3f79a3b5_91d187fb","updated":"2018-10-22 07:02:28.000000000","message":"ditto","commit_id":"8c129a84a6282ade4cf6b67bea9a7a62e34179d9"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"e9baa2a8e52f68ec7262871b3c2abc2e023e2b2e","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        \"\"\""},{"line_number":151,"context_line":"        return utils.max_safe(self.volumes_sizes_bytes)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def _do_refresh(self, force):"},{"line_number":154,"context_line":"        \"\"\"Do resource specific refresh activities\"\"\""},{"line_number":155,"context_line":"        super(StorageCollection, self)._do_refresh(force\u003dforce)"},{"line_number":156,"context_line":"        utils.cache_clear(self, force)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_d1c7ff3c","line":153,"range":{"start_line":153,"start_character":26,"end_line":153,"end_character":31},"updated":"2018-10-10 09:53:07.000000000","message":"Default disappeared","commit_id":"8c129a84a6282ade4cf6b67bea9a7a62e34179d9"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"02d2c6c6ab7758d0cb8e423221d3b8cb57d1464d","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        \"\"\""},{"line_number":151,"context_line":"        return utils.max_safe(self.volumes_sizes_bytes)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def _do_refresh(self, force):"},{"line_number":154,"context_line":"        \"\"\"Do resource specific refresh activities\"\"\""},{"line_number":155,"context_line":"        super(StorageCollection, self)._do_refresh(force\u003dforce)"},{"line_number":156,"context_line":"        utils.cache_clear(self, force)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_15ca596e","line":153,"range":{"start_line":153,"start_character":26,"end_line":153,"end_character":31},"in_reply_to":"3f79a3b5_d1c7ff3c","updated":"2018-10-22 07:02:28.000000000","message":"ditto","commit_id":"8c129a84a6282ade4cf6b67bea9a7a62e34179d9"}],"sushy/resources/system/system.py":[{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"e9baa2a8e52f68ec7262871b3c2abc2e023e2b2e","unresolved":false,"context_lines":[{"line_number":332,"context_line":"            self._conn, utils.get_sub_resource_path_by(self, \"Storage\"),"},{"line_number":333,"context_line":"            redfish_version\u003dself.redfish_version)"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"    def _do_refresh(self, force):"},{"line_number":336,"context_line":"        \"\"\"Do custom resource specific refresh activities"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        On refresh, all sub-resources are marked as stale, i.e."}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_91eae79d","line":335,"range":{"start_line":335,"start_character":26,"end_line":335,"end_character":31},"updated":"2018-10-10 09:53:07.000000000","message":"Default disappeared","commit_id":"8c129a84a6282ade4cf6b67bea9a7a62e34179d9"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"02d2c6c6ab7758d0cb8e423221d3b8cb57d1464d","unresolved":false,"context_lines":[{"line_number":332,"context_line":"            self._conn, utils.get_sub_resource_path_by(self, \"Storage\"),"},{"line_number":333,"context_line":"            redfish_version\u003dself.redfish_version)"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"    def _do_refresh(self, force):"},{"line_number":336,"context_line":"        \"\"\"Do custom resource specific refresh activities"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        On refresh, all sub-resources are marked as stale, i.e."}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_3573d551","line":335,"range":{"start_line":335,"start_character":26,"end_line":335,"end_character":31},"in_reply_to":"3f79a3b5_91eae79d","updated":"2018-10-22 07:02:28.000000000","message":"ditto","commit_id":"8c129a84a6282ade4cf6b67bea9a7a62e34179d9"}],"sushy/tests/unit/test_utils.py":[{"author":{"_account_id":27909,"name":"Aija Jauntēva","email":"code@clusums.eu","username":"ajya"},"change_message_id":"8c969d77e2c2db1b56f913df32f49112bb2760b9","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        self.assertFalse(self.res._nested_resource._is_stale)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def test_cache_it_get_a(self):"},{"line_number":159,"context_line":"        with mock.patch.object("},{"line_number":160,"context_line":"                self.res, \u0027_do_some_complex_stuff\u0027,"},{"line_number":161,"context_line":"                wraps\u003dself.res._do_some_complex_stuff, autospec\u003dTrue) as act:"},{"line_number":162,"context_line":"            result \u003d self.res.get_a()"},{"line_number":163,"context_line":"            self.assertTrue(act.called)"},{"line_number":164,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_a39b7877","line":161,"range":{"start_line":159,"start_character":0,"end_line":161,"end_character":77},"updated":"2018-07-11 12:43:35.000000000","message":"can this be moved to decorator? In the project patch decorators are used.","commit_id":"af6b6ea5f14866ad1f9e884b0c36b9ec053942dc"},{"author":{"_account_id":27909,"name":"Aija Jauntēva","email":"code@clusums.eu","username":"ajya"},"change_message_id":"8c969d77e2c2db1b56f913df32f49112bb2760b9","unresolved":false,"context_lines":[{"line_number":158,"context_line":"    def test_cache_it_get_a(self):"},{"line_number":159,"context_line":"        with mock.patch.object("},{"line_number":160,"context_line":"                self.res, \u0027_do_some_complex_stuff\u0027,"},{"line_number":161,"context_line":"                wraps\u003dself.res._do_some_complex_stuff, autospec\u003dTrue) as act:"},{"line_number":162,"context_line":"            result \u003d self.res.get_a()"},{"line_number":163,"context_line":"            self.assertTrue(act.called)"},{"line_number":164,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_83343c4b","line":161,"range":{"start_line":161,"start_character":73,"end_line":161,"end_character":77},"updated":"2018-07-11 12:43:35.000000000","message":"can this get better name? I can\u0027t determine what the meaning of this, e.g., just \u0027act\u0027 or \u0027action\u0027? And maybe it should also have mock in the name, maybe `method_mock`.","commit_id":"af6b6ea5f14866ad1f9e884b0c36b9ec053942dc"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"822bc1ac8c23572ff993890ebd360e0176697269","unresolved":false,"context_lines":[{"line_number":158,"context_line":"    def test_cache_it_get_a(self):"},{"line_number":159,"context_line":"        with mock.patch.object("},{"line_number":160,"context_line":"                self.res, \u0027_do_some_complex_stuff\u0027,"},{"line_number":161,"context_line":"                wraps\u003dself.res._do_some_complex_stuff, autospec\u003dTrue) as act:"},{"line_number":162,"context_line":"            result \u003d self.res.get_a()"},{"line_number":163,"context_line":"            self.assertTrue(act.called)"},{"line_number":164,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_73267cce","line":161,"range":{"start_line":161,"start_character":73,"end_line":161,"end_character":77},"in_reply_to":"5f7c97a3_83343c4b","updated":"2018-07-12 07:35:01.000000000","message":"\u003e can this get better name? I can\u0027t determine what the meaning of\n \u003e this, e.g., just \u0027act\u0027 or \u0027action\u0027? And maybe it should also have\n \u003e mock in the name, maybe `method_mock`.\n\nI have changed it. Please see if it looks ok now.","commit_id":"af6b6ea5f14866ad1f9e884b0c36b9ec053942dc"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"822bc1ac8c23572ff993890ebd360e0176697269","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        self.assertFalse(self.res._nested_resource._is_stale)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def test_cache_it_get_a(self):"},{"line_number":159,"context_line":"        with mock.patch.object("},{"line_number":160,"context_line":"                self.res, \u0027_do_some_complex_stuff\u0027,"},{"line_number":161,"context_line":"                wraps\u003dself.res._do_some_complex_stuff, autospec\u003dTrue) as act:"},{"line_number":162,"context_line":"            result \u003d self.res.get_a()"},{"line_number":163,"context_line":"            self.assertTrue(act.called)"},{"line_number":164,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_f3136c64","line":161,"range":{"start_line":159,"start_character":0,"end_line":161,"end_character":77},"in_reply_to":"5f7c97a3_a39b7877","updated":"2018-07-12 07:35:01.000000000","message":"\u003e can this be moved to decorator? In the project patch decorators are\n \u003e used.\n\nNo. As this is a spy (rather than a mock) which needs to wrap the self.res\u0027s method. Hence can\u0027t be put into test method level decorator.","commit_id":"af6b6ea5f14866ad1f9e884b0c36b9ec053942dc"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ca29df6929cfc11b6b4ac1d941279ef3a2c3389c","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        utils.cache_clear(self.res, False, only_these\u003d[\u0027get_a\u0027])"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        self.assertIsNone(self.res._cache_get_a)"},{"line_number":173,"context_line":"        self.assertFalse(self.res._cache_nested_resource._is_stale)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def test_cache_clear_failure(self):"},{"line_number":176,"context_line":"        self.assertRaises("}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_a0116f52","line":173,"updated":"2018-07-19 12:54:20.000000000","message":"can we check that other cached values were not cleared?","commit_id":"6ee2d08647eb4c653784f7847b823a38566f5c35"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"8c97bb66b35c3b94c8b16d8c49853dd3e60020f2","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        utils.cache_clear(self.res, False, only_these\u003d[\u0027get_a\u0027])"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        self.assertIsNone(self.res._cache_get_a)"},{"line_number":173,"context_line":"        self.assertFalse(self.res._cache_nested_resource._is_stale)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def test_cache_clear_failure(self):"},{"line_number":176,"context_line":"        self.assertRaises("}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_035023d5","line":173,"in_reply_to":"3f79a3b5_af8a7b10","updated":"2018-09-24 16:04:17.000000000","message":"Just realized that this:\n\n    self.assertFalse(self.res._cache_nested_resource._is_stale)\n\nindicate that the other cache value is retained (i.e. not invalidated). Nevertheless, I am providing another non-resource attribute to show it anyway.","commit_id":"6ee2d08647eb4c653784f7847b823a38566f5c35"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"6c5b374f85510ecdc0ed8ebced0b3a73dbf078f8","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        utils.cache_clear(self.res, False, only_these\u003d[\u0027get_a\u0027])"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        self.assertIsNone(self.res._cache_get_a)"},{"line_number":173,"context_line":"        self.assertFalse(self.res._cache_nested_resource._is_stale)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def test_cache_clear_failure(self):"},{"line_number":176,"context_line":"        self.assertRaises("}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_af8a7b10","line":173,"in_reply_to":"5f7c97a3_a0116f52","updated":"2018-09-24 11:07:54.000000000","message":"Will do.","commit_id":"6ee2d08647eb4c653784f7847b823a38566f5c35"}],"sushy/utils.py":[{"author":{"_account_id":27909,"name":"Aija Jauntēva","email":"code@clusums.eu","username":"ajya"},"change_message_id":"8c969d77e2c2db1b56f913df32f49112bb2760b9","unresolved":false,"context_lines":[{"line_number":114,"context_line":"    \"\"\"Utility decorator to cache the return value of the decorated method."},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    This decorator is to be used with any Sushy resource class method."},{"line_number":117,"context_line":"    This expects the Sushy class to already define a variable with an"},{"line_number":118,"context_line":"    undercore (\u0027_\u0027) prepended to the decorated method name (it decorates)"},{"line_number":119,"context_line":"    as part of the class (or instance). This is referred to as the \"caching"},{"line_number":120,"context_line":"    attribute\"."}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_436e24ff","line":117,"range":{"start_line":117,"start_character":36,"end_line":117,"end_character":61},"updated":"2018-07-11 12:43:35.000000000","message":"just thinking, can this be improved and added dynamically by this decorator?","commit_id":"af6b6ea5f14866ad1f9e884b0c36b9ec053942dc"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"822bc1ac8c23572ff993890ebd360e0176697269","unresolved":false,"context_lines":[{"line_number":114,"context_line":"    \"\"\"Utility decorator to cache the return value of the decorated method."},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    This decorator is to be used with any Sushy resource class method."},{"line_number":117,"context_line":"    This expects the Sushy class to already define a variable with an"},{"line_number":118,"context_line":"    undercore (\u0027_\u0027) prepended to the decorated method name (it decorates)"},{"line_number":119,"context_line":"    as part of the class (or instance). This is referred to as the \"caching"},{"line_number":120,"context_line":"    attribute\"."}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_73ff5c02","line":117,"range":{"start_line":117,"start_character":36,"end_line":117,"end_character":61},"in_reply_to":"5f7c97a3_436e24ff","updated":"2018-07-12 07:35:01.000000000","message":"\u003e just thinking, can this be improved and added dynamically by this\n \u003e decorator?\n\nI have improved it as suggested. Please have a look.","commit_id":"af6b6ea5f14866ad1f9e884b0c36b9ec053942dc"},{"author":{"_account_id":27909,"name":"Aija Jauntēva","email":"code@clusums.eu","username":"ajya"},"change_message_id":"8c969d77e2c2db1b56f913df32f49112bb2760b9","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                self._get_summary \u003d None:"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    If the returned value is a Sushy resource instance, it handles the case"},{"line_number":144,"context_line":"    of calling the ``refresh()`` method on that resource with the ``force``"},{"line_number":145,"context_line":"    argument set to False."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        class SomeResource(base.ResourceBase):"},{"line_number":148,"context_line":"            ..."}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_460ab21e","line":145,"range":{"start_line":144,"start_character":18,"end_line":145,"end_character":25},"updated":"2018-07-11 12:43:35.000000000","message":"I\u0027m guessing that this is for stale resources, can it be clarified to make this explicit?","commit_id":"af6b6ea5f14866ad1f9e884b0c36b9ec053942dc"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"822bc1ac8c23572ff993890ebd360e0176697269","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                self._get_summary \u003d None:"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    If the returned value is a Sushy resource instance, it handles the case"},{"line_number":144,"context_line":"    of calling the ``refresh()`` method on that resource with the ``force``"},{"line_number":145,"context_line":"    argument set to False."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        class SomeResource(base.ResourceBase):"},{"line_number":148,"context_line":"            ..."}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_ae3827cb","line":145,"range":{"start_line":144,"start_character":18,"end_line":145,"end_character":25},"in_reply_to":"5f7c97a3_460ab21e","updated":"2018-07-12 07:35:01.000000000","message":"Will make an attempt in the next patch-set. Not very good with English ;) Help me if you can, please.","commit_id":"af6b6ea5f14866ad1f9e884b0c36b9ec053942dc"},{"author":{"_account_id":27909,"name":"Aija Jauntēva","email":"code@clusums.eu","username":"ajya"},"change_message_id":"8c969d77e2c2db1b56f913df32f49112bb2760b9","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                if self._nested_resource is not None:"},{"line_number":160,"context_line":"                    self._nested_resource.invalidate(force)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    Please note that this is not thread safe."},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    :raises: AttributeError, if the undercore (\u0027_\u0027) prepended attribute"},{"line_number":165,"context_line":"        is not already defined on the resource instance (or class)."}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_83b75c86","line":162,"range":{"start_line":162,"start_character":4,"end_line":162,"end_character":45},"updated":"2018-07-11 12:43:35.000000000","message":"This might be an issue. Any chance to make this thread safe?","commit_id":"af6b6ea5f14866ad1f9e884b0c36b9ec053942dc"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"822bc1ac8c23572ff993890ebd360e0176697269","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                if self._nested_resource is not None:"},{"line_number":160,"context_line":"                    self._nested_resource.invalidate(force)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    Please note that this is not thread safe."},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    :raises: AttributeError, if the undercore (\u0027_\u0027) prepended attribute"},{"line_number":165,"context_line":"        is not already defined on the resource instance (or class)."}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_ee213fa0","line":162,"range":{"start_line":162,"start_character":4,"end_line":162,"end_character":45},"in_reply_to":"5f7c97a3_83b75c86","updated":"2018-07-12 07:35:01.000000000","message":"\u003e This might be an issue. Any chance to make this thread safe?\n\nI don\u0027t think if I want to make it thread safe. Even if you see the earlier cache implementation that was not thread safe per se. But still if you insist I may be open for a second thought. Lets wait for others\u0027 opinion on this. Btw, it is possible to make this thread safe.","commit_id":"af6b6ea5f14866ad1f9e884b0c36b9ec053942dc"},{"author":{"_account_id":27909,"name":"Aija Jauntēva","email":"code@clusums.eu","username":"ajya"},"change_message_id":"8c969d77e2c2db1b56f913df32f49112bb2760b9","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        from sushy.resources import base"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"        if isinstance(cached_val, base.ResourceBase):"},{"line_number":179,"context_line":"            # Note(deray): if cached value is a Sushy Resource instance then"},{"line_number":180,"context_line":"            # make sure the ``refresh()`` method gets called on that resource"},{"line_number":181,"context_line":"            # with the ``force`` argument set to False."},{"line_number":182,"context_line":"            cached_val.refresh(force\u003dFalse)"},{"line_number":183,"context_line":"        return cached_val"},{"line_number":184,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_6651ee0d","line":181,"range":{"start_line":179,"start_character":12,"end_line":181,"end_character":55},"updated":"2018-07-11 12:43:35.000000000","message":"This duplicates the docstring, so maybe not necessary here? Anyway without a comment it is clear what it is doing.","commit_id":"af6b6ea5f14866ad1f9e884b0c36b9ec053942dc"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"822bc1ac8c23572ff993890ebd360e0176697269","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        from sushy.resources import base"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"        if isinstance(cached_val, base.ResourceBase):"},{"line_number":179,"context_line":"            # Note(deray): if cached value is a Sushy Resource instance then"},{"line_number":180,"context_line":"            # make sure the ``refresh()`` method gets called on that resource"},{"line_number":181,"context_line":"            # with the ``force`` argument set to False."},{"line_number":182,"context_line":"            cached_val.refresh(force\u003dFalse)"},{"line_number":183,"context_line":"        return cached_val"},{"line_number":184,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_ee085f28","line":181,"range":{"start_line":179,"start_character":12,"end_line":181,"end_character":55},"in_reply_to":"5f7c97a3_6651ee0d","updated":"2018-07-12 07:35:01.000000000","message":"Will remove then.","commit_id":"af6b6ea5f14866ad1f9e884b0c36b9ec053942dc"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ca29df6929cfc11b6b4ac1d941279ef3a2c3389c","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    If the returned value is a Sushy resource instance, it handles the case"},{"line_number":147,"context_line":"    of calling the ``refresh()`` method on that resource with the ``force``"},{"line_number":148,"context_line":"    argument set to False."},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    .. code-block:: python"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_8016b349","line":148,"updated":"2018-07-19 12:54:20.000000000","message":"++ can be done in a follow-up","commit_id":"6ee2d08647eb4c653784f7847b823a38566f5c35"},{"author":{"_account_id":27909,"name":"Aija Jauntēva","email":"code@clusums.eu","username":"ajya"},"change_message_id":"b61af3b970204e550959b9999cb81d04e2a0e5e0","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        def _do_refresh(self, force):"},{"line_number":144,"context_line":"          cache_clear(self, force)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    If the returned value is a Sushy resource instance, it handles the case"},{"line_number":147,"context_line":"    of calling the ``refresh()`` method on that resource with the ``force``"},{"line_number":148,"context_line":"    argument set to False."},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    .. code-block:: python"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_281faa5a","line":148,"range":{"start_line":146,"start_character":56,"end_line":148,"end_character":26},"updated":"2018-07-18 08:52:44.000000000","message":"This says \u0027what\u0027 it does, but it does not say \u0027why\u0027 - why for Sushy resource instance is it necessary to do this?. Can the comment be updated to answer \u0027why\u0027?","commit_id":"6ee2d08647eb4c653784f7847b823a38566f5c35"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"8c97bb66b35c3b94c8b16d8c49853dd3e60020f2","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    If the returned value is a Sushy resource instance, it handles the case"},{"line_number":147,"context_line":"    of calling the ``refresh()`` method on that resource with the ``force``"},{"line_number":148,"context_line":"    argument set to False."},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    .. code-block:: python"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_c301cb6f","line":148,"in_reply_to":"3f79a3b5_8f99bf6e","updated":"2018-09-24 16:04:17.000000000","message":"Done","commit_id":"6ee2d08647eb4c653784f7847b823a38566f5c35"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"6c5b374f85510ecdc0ed8ebced0b3a73dbf078f8","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    If the returned value is a Sushy resource instance, it handles the case"},{"line_number":147,"context_line":"    of calling the ``refresh()`` method on that resource with the ``force``"},{"line_number":148,"context_line":"    argument set to False."},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    .. code-block:: python"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_8f99bf6e","line":148,"in_reply_to":"5f7c97a3_8016b349","updated":"2018-09-24 11:07:54.000000000","message":"Will do as part of this patch only!","commit_id":"6ee2d08647eb4c653784f7847b823a38566f5c35"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"e9baa2a8e52f68ec7262871b3c2abc2e023e2b2e","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            self._conn, \"Path/to/NestedResource\","},{"line_number":165,"context_line":"            redfish_version\u003dself.redfish_version)"},{"line_number":166,"context_line":"        ..."},{"line_number":167,"context_line":"        def _do_refresh(self, force):"},{"line_number":168,"context_line":"          # selective attribute clearing"},{"line_number":169,"context_line":"          cache_clear(self, force, only_these\u003d[\u0027nested_resource\u0027])"},{"line_number":170,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_f1579b59","line":167,"range":{"start_line":167,"start_character":30,"end_line":167,"end_character":35},"updated":"2018-10-10 09:53:07.000000000","message":"Does `force` need to be defaulted?","commit_id":"8c129a84a6282ade4cf6b67bea9a7a62e34179d9"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"02d2c6c6ab7758d0cb8e423221d3b8cb57d1464d","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            self._conn, \"Path/to/NestedResource\","},{"line_number":165,"context_line":"            redfish_version\u003dself.redfish_version)"},{"line_number":166,"context_line":"        ..."},{"line_number":167,"context_line":"        def _do_refresh(self, force):"},{"line_number":168,"context_line":"          # selective attribute clearing"},{"line_number":169,"context_line":"          cache_clear(self, force, only_these\u003d[\u0027nested_resource\u0027])"},{"line_number":170,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_b58cc52d","line":167,"range":{"start_line":167,"start_character":30,"end_line":167,"end_character":35},"in_reply_to":"3f79a3b5_f1579b59","updated":"2018-10-22 07:02:28.000000000","message":"no. As a matter of fact I believe its better not to be defaulted. Let the invoker pass on explicitly value of force argument to it!","commit_id":"8c129a84a6282ade4cf6b67bea9a7a62e34179d9"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"e9baa2a8e52f68ec7262871b3c2abc2e023e2b2e","unresolved":false,"context_lines":[{"line_number":191,"context_line":"            if hasattr(res_selfie, \u0027_cache_attr_names\u0027):"},{"line_number":192,"context_line":"                cache_attr_names \u003d res_selfie._cache_attr_names"},{"line_number":193,"context_line":"            else:"},{"line_number":194,"context_line":"                cache_attr_names \u003d res_selfie._cache_attr_names \u003d []"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"            if cache_attr_name not in cache_attr_names:"},{"line_number":197,"context_line":"                cache_attr_names.append(cache_attr_name)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_8c417039","line":194,"range":{"start_line":194,"start_character":66,"end_line":194,"end_character":68},"updated":"2018-10-10 09:53:07.000000000","message":"nit: does it need to be a `list` rather than a `set`?","commit_id":"8c129a84a6282ade4cf6b67bea9a7a62e34179d9"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"02d2c6c6ab7758d0cb8e423221d3b8cb57d1464d","unresolved":false,"context_lines":[{"line_number":191,"context_line":"            if hasattr(res_selfie, \u0027_cache_attr_names\u0027):"},{"line_number":192,"context_line":"                cache_attr_names \u003d res_selfie._cache_attr_names"},{"line_number":193,"context_line":"            else:"},{"line_number":194,"context_line":"                cache_attr_names \u003d res_selfie._cache_attr_names \u003d []"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"            if cache_attr_name not in cache_attr_names:"},{"line_number":197,"context_line":"                cache_attr_names.append(cache_attr_name)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_b5036575","line":194,"range":{"start_line":194,"start_character":66,"end_line":194,"end_character":68},"in_reply_to":"3f79a3b5_8c417039","updated":"2018-10-22 07:02:28.000000000","message":"Good point. Will make it a set then.","commit_id":"8c129a84a6282ade4cf6b67bea9a7a62e34179d9"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"e9baa2a8e52f68ec7262871b3c2abc2e023e2b2e","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                cache_attr_names \u003d res_selfie._cache_attr_names \u003d []"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"            if cache_attr_name not in cache_attr_names:"},{"line_number":197,"context_line":"                cache_attr_names.append(cache_attr_name)"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        from sushy.resources import base"},{"line_number":200,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_d17fffb9","line":197,"range":{"start_line":197,"start_character":40,"end_line":197,"end_character":55},"updated":"2018-10-10 09:53:07.000000000","message":"Do we need to store the same value twice? Once as instance attracts and then as a list element?","commit_id":"8c129a84a6282ade4cf6b67bea9a7a62e34179d9"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"02d2c6c6ab7758d0cb8e423221d3b8cb57d1464d","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                cache_attr_names \u003d res_selfie._cache_attr_names \u003d []"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"            if cache_attr_name not in cache_attr_names:"},{"line_number":197,"context_line":"                cache_attr_names.append(cache_attr_name)"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        from sushy.resources import base"},{"line_number":200,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_5508d17e","line":197,"range":{"start_line":197,"start_character":40,"end_line":197,"end_character":55},"in_reply_to":"3f79a3b5_d17fffb9","updated":"2018-10-22 07:02:28.000000000","message":"The intention is to get hold of the names of all the caching attributes w/o the need of filtering on the resource instance attributes (possibly by filtering with ``^_cache_``) every now and then when its required. After all its just a collection of few names. Are you concerned about its memory overhead?","commit_id":"8c129a84a6282ade4cf6b67bea9a7a62e34179d9"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"e9baa2a8e52f68ec7262871b3c2abc2e023e2b2e","unresolved":false,"context_lines":[{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        from sushy.resources import base"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        if isinstance(cache_attr_val, base.ResourceBase):"},{"line_number":202,"context_line":"            cache_attr_val.refresh(force\u003dFalse)"},{"line_number":203,"context_line":"        elif isinstance(cache_attr_val, collections.Iterable):"},{"line_number":204,"context_line":"            for elem in cache_attr_val:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_917747d2","line":201,"range":{"start_line":201,"start_character":43,"end_line":201,"end_character":55},"updated":"2018-10-10 09:53:07.000000000","message":"Is it important to make sure that we are dealing with this particular class considering that we are sort of control what\u0027s being returned from `res_accessor_method`?\n\nMay be we could simplify the code (and resolve this circular import nuisance) if we would replace `instance` with `hasattr(cache_attr_val, \u0027refresh\u0027) `...?","commit_id":"8c129a84a6282ade4cf6b67bea9a7a62e34179d9"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"02d2c6c6ab7758d0cb8e423221d3b8cb57d1464d","unresolved":false,"context_lines":[{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        from sushy.resources import base"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        if isinstance(cache_attr_val, base.ResourceBase):"},{"line_number":202,"context_line":"            cache_attr_val.refresh(force\u003dFalse)"},{"line_number":203,"context_line":"        elif isinstance(cache_attr_val, collections.Iterable):"},{"line_number":204,"context_line":"            for elem in cache_attr_val:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_55e451a8","line":201,"range":{"start_line":201,"start_character":43,"end_line":201,"end_character":55},"in_reply_to":"3f79a3b5_917747d2","updated":"2018-10-22 07:02:28.000000000","message":"\u003e Is it important to make sure that we are dealing with this\n \u003e particular class considering that we are sort of control what\u0027s\n \u003e being returned from `res_accessor_method`?\n\nYeah it\u0027s really required to make this code depend on Sushy Resource. As from the code, if it is then ``refresh`` method is invoked instead of getting rid of the object altogether. I can fully understand that this hackish circular import solution is a deterrent. Just thought that as this utilitarian thing belongs to Sushy lib only may be it can be given a benefit of the doubt ;)\n\n \u003e \n \u003e May be we could simplify the code (and resolve this circular import\n \u003e nuisance) if we would replace `instance` with `hasattr(cache_attr_val,\n \u003e \u0027refresh\u0027) `...?\n\nSo, in other words you are insisting to follow the duck typing way instead of actually verifying against ResourceBase. Hmmm... I am just a little scared what if any of those python Iterables (that\u0027s other one we check against) contain a ``refresh`` attribute or any other non Resource or Iterable value contain a ``refresh`` attribute. Whatever the logic we adopt it has to be applied for ``utils.cache_clear`` method as well. Frankly, I am non-opinionated here and will follow what you suggest. Please let me know what you think!","commit_id":"8c129a84a6282ade4cf6b67bea9a7a62e34179d9"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"e9baa2a8e52f68ec7262871b3c2abc2e023e2b2e","unresolved":false,"context_lines":[{"line_number":211,"context_line":""},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"def cache_clear(res_instance, force_refresh, only_these\u003dNone):"},{"line_number":214,"context_line":"    \"\"\"Clear the cached values of the resource even selectively."},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    If the cache variable refers to a resource instance then the"},{"line_number":217,"context_line":"    ``invalidate()`` method is called on that. Otherwise it is set to None."}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_5130cf06","line":214,"range":{"start_line":214,"start_character":7,"end_line":214,"end_character":46},"updated":"2018-10-10 09:53:07.000000000","message":"nit: \u0027Clear some or all cached values of the resource\u0027\n?","commit_id":"8c129a84a6282ade4cf6b67bea9a7a62e34179d9"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"02d2c6c6ab7758d0cb8e423221d3b8cb57d1464d","unresolved":false,"context_lines":[{"line_number":211,"context_line":""},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"def cache_clear(res_instance, force_refresh, only_these\u003dNone):"},{"line_number":214,"context_line":"    \"\"\"Clear the cached values of the resource even selectively."},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    If the cache variable refers to a resource instance then the"},{"line_number":217,"context_line":"    ``invalidate()`` method is called on that. Otherwise it is set to None."}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_952bc999","line":214,"range":{"start_line":214,"start_character":7,"end_line":214,"end_character":46},"in_reply_to":"3f79a3b5_5130cf06","updated":"2018-10-22 07:02:28.000000000","message":"Done","commit_id":"8c129a84a6282ade4cf6b67bea9a7a62e34179d9"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"e9baa2a8e52f68ec7262871b3c2abc2e023e2b2e","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        for which the cached value/s need to be cleared only. When None, all"},{"line_number":227,"context_line":"        the cached values are cleared."},{"line_number":228,"context_line":"    \"\"\""},{"line_number":229,"context_line":"    cache_attr_names \u003d getattr(res_instance, \u0027_cache_attr_names\u0027, [])"},{"line_number":230,"context_line":"    if only_these is not None:"},{"line_number":231,"context_line":"        if not isinstance(only_these, collections.Iterable):"},{"line_number":232,"context_line":"            raise TypeError(\"\u0027only_these\u0027 must be Iterable.\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_2cfb7c15","line":229,"range":{"start_line":229,"start_character":4,"end_line":229,"end_character":20},"updated":"2018-10-10 09:53:07.000000000","message":"nit: this could be moved down to the `else` at #236 as it gets overwritten","commit_id":"8c129a84a6282ade4cf6b67bea9a7a62e34179d9"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"e9baa2a8e52f68ec7262871b3c2abc2e023e2b2e","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        for which the cached value/s need to be cleared only. When None, all"},{"line_number":227,"context_line":"        the cached values are cleared."},{"line_number":228,"context_line":"    \"\"\""},{"line_number":229,"context_line":"    cache_attr_names \u003d getattr(res_instance, \u0027_cache_attr_names\u0027, [])"},{"line_number":230,"context_line":"    if only_these is not None:"},{"line_number":231,"context_line":"        if not isinstance(only_these, collections.Iterable):"},{"line_number":232,"context_line":"            raise TypeError(\"\u0027only_these\u0027 must be Iterable.\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_b12043b3","line":229,"range":{"start_line":229,"start_character":46,"end_line":229,"end_character":63},"updated":"2018-10-10 09:53:07.000000000","message":"nit: would it harden the code a bit if we keep these magic attribute names in a constant?","commit_id":"8c129a84a6282ade4cf6b67bea9a7a62e34179d9"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"02d2c6c6ab7758d0cb8e423221d3b8cb57d1464d","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        for which the cached value/s need to be cleared only. When None, all"},{"line_number":227,"context_line":"        the cached values are cleared."},{"line_number":228,"context_line":"    \"\"\""},{"line_number":229,"context_line":"    cache_attr_names \u003d getattr(res_instance, \u0027_cache_attr_names\u0027, [])"},{"line_number":230,"context_line":"    if only_these is not None:"},{"line_number":231,"context_line":"        if not isinstance(only_these, collections.Iterable):"},{"line_number":232,"context_line":"            raise TypeError(\"\u0027only_these\u0027 must be Iterable.\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_b8259caf","line":229,"range":{"start_line":229,"start_character":4,"end_line":229,"end_character":20},"in_reply_to":"3f79a3b5_2cfb7c15","updated":"2018-10-22 07:02:28.000000000","message":"This is required at L234. There can be a name which can get passed through ``only_these`` but hasn\u0027t yet been created on resource instance as yet!","commit_id":"8c129a84a6282ade4cf6b67bea9a7a62e34179d9"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"02d2c6c6ab7758d0cb8e423221d3b8cb57d1464d","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        for which the cached value/s need to be cleared only. When None, all"},{"line_number":227,"context_line":"        the cached values are cleared."},{"line_number":228,"context_line":"    \"\"\""},{"line_number":229,"context_line":"    cache_attr_names \u003d getattr(res_instance, \u0027_cache_attr_names\u0027, [])"},{"line_number":230,"context_line":"    if only_these is not None:"},{"line_number":231,"context_line":"        if not isinstance(only_these, collections.Iterable):"},{"line_number":232,"context_line":"            raise TypeError(\"\u0027only_these\u0027 must be Iterable.\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_58224856","line":229,"range":{"start_line":229,"start_character":46,"end_line":229,"end_character":63},"in_reply_to":"3f79a3b5_b12043b3","updated":"2018-10-22 07:02:28.000000000","message":"Hard coded the cached attribute collection var name to a constant named CACHE_ATTR_NAMES_VAR_NAME.","commit_id":"8c129a84a6282ade4cf6b67bea9a7a62e34179d9"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"e9baa2a8e52f68ec7262871b3c2abc2e023e2b2e","unresolved":false,"context_lines":[{"line_number":239,"context_line":""},{"line_number":240,"context_line":"        from sushy.resources import base"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"        if isinstance(cache_attr_val, base.ResourceBase):"},{"line_number":243,"context_line":"            cache_attr_val.invalidate(force_refresh)"},{"line_number":244,"context_line":"        elif isinstance(cache_attr_val, collections.Iterable):"},{"line_number":245,"context_line":"            for elem in cache_attr_val:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_4cfef804","line":242,"range":{"start_line":242,"start_character":43,"end_line":242,"end_character":55},"updated":"2018-10-10 09:53:07.000000000","message":"ditto","commit_id":"8c129a84a6282ade4cf6b67bea9a7a62e34179d9"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"02d2c6c6ab7758d0cb8e423221d3b8cb57d1464d","unresolved":false,"context_lines":[{"line_number":239,"context_line":""},{"line_number":240,"context_line":"        from sushy.resources import base"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"        if isinstance(cache_attr_val, base.ResourceBase):"},{"line_number":243,"context_line":"            cache_attr_val.invalidate(force_refresh)"},{"line_number":244,"context_line":"        elif isinstance(cache_attr_val, collections.Iterable):"},{"line_number":245,"context_line":"            for elem in cache_attr_val:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_9828e036","line":242,"range":{"start_line":242,"start_character":43,"end_line":242,"end_character":55},"in_reply_to":"3f79a3b5_4cfef804","updated":"2018-10-22 07:02:28.000000000","message":"Refer above comment","commit_id":"8c129a84a6282ade4cf6b67bea9a7a62e34179d9"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d0156e81118716e0115d190e1d25b3882ff3cb11","unresolved":false,"context_lines":[{"line_number":197,"context_line":"    cache_attr_name \u003d \u0027_cache_\u0027 + res_accessor_method.__name__"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    @six.wraps(res_accessor_method)"},{"line_number":200,"context_line":"    def func_wrapper(res_selfie):"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"        cache_attr_val \u003d getattr(res_selfie, cache_attr_name, None)"},{"line_number":203,"context_line":"        if cache_attr_val is None:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_25060acf","line":200,"updated":"2018-10-24 10:41:59.000000000","message":"\"selfie\" lol :)","commit_id":"27c725cbb8a2a5d55d9e74519ad5e386b2fe50c4"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"154fc733d7d79860003cd2ea92d04790b8ec13fd","unresolved":false,"context_lines":[{"line_number":197,"context_line":"    cache_attr_name \u003d \u0027_cache_\u0027 + res_accessor_method.__name__"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    @six.wraps(res_accessor_method)"},{"line_number":200,"context_line":"    def func_wrapper(res_selfie):"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"        cache_attr_val \u003d getattr(res_selfie, cache_attr_name, None)"},{"line_number":203,"context_line":"        if cache_attr_val is None:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_1238dd9b","line":200,"in_reply_to":"3f79a3b5_25060acf","updated":"2018-10-25 05:31:27.000000000","message":"he he","commit_id":"27c725cbb8a2a5d55d9e74519ad5e386b2fe50c4"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d0156e81118716e0115d190e1d25b3882ff3cb11","unresolved":false,"context_lines":[{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        if isinstance(cache_attr_val, base.ResourceBase):"},{"line_number":217,"context_line":"            cache_attr_val.refresh(force\u003dFalse)"},{"line_number":218,"context_line":"        elif isinstance(cache_attr_val, collections.Iterable):"},{"line_number":219,"context_line":"            for elem in cache_attr_val:"},{"line_number":220,"context_line":"                if isinstance(elem, base.ResourceBase):"},{"line_number":221,"context_line":"                    elem.refresh(force\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_c50636cd","line":218,"updated":"2018-10-24 10:41:59.000000000","message":"s/Iterable/Sequence/ ? I don\u0027t think you want to handle iterators/generators here, because you would exhaust them","commit_id":"27c725cbb8a2a5d55d9e74519ad5e386b2fe50c4"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"154fc733d7d79860003cd2ea92d04790b8ec13fd","unresolved":false,"context_lines":[{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        if isinstance(cache_attr_val, base.ResourceBase):"},{"line_number":217,"context_line":"            cache_attr_val.refresh(force\u003dFalse)"},{"line_number":218,"context_line":"        elif isinstance(cache_attr_val, collections.Iterable):"},{"line_number":219,"context_line":"            for elem in cache_attr_val:"},{"line_number":220,"context_line":"                if isinstance(elem, base.ResourceBase):"},{"line_number":221,"context_line":"                    elem.refresh(force\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_323dd98c","line":218,"in_reply_to":"3f79a3b5_c50636cd","updated":"2018-10-25 05:31:27.000000000","message":"Yes, you are right. Will change it.","commit_id":"27c725cbb8a2a5d55d9e74519ad5e386b2fe50c4"}]}
