)]}'
{"nova/objects/instance.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"00b2e1f432b9a34b7b610fd0e196fe5422077e0b","unresolved":false,"context_lines":[{"line_number":412,"context_line":"                                         expected_attrs\u003dNone):"},{"line_number":413,"context_line":"        \"\"\"Method to help with migration of extra attributes to objects."},{"line_number":414,"context_line":""},{"line_number":415,"context_line":"        Converts a database entity to a formal object."},{"line_number":416,"context_line":"        \"\"\""},{"line_number":417,"context_line":"        instance._context \u003d context"},{"line_number":418,"context_line":"        # NOTE(danms): We can be called with a dict instead of a"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f93b717_800f2f2d","line":415,"updated":"2018-01-25 17:47:48.000000000","message":"This is kinda weird, I would remove it if you respin.","commit_id":"3fcdc74794a1f0f7abff0938252449bd23ffec57"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"00b2e1f432b9a34b7b610fd0e196fe5422077e0b","unresolved":false,"context_lines":[{"line_number":414,"context_line":""},{"line_number":415,"context_line":"        Converts a database entity to a formal object."},{"line_number":416,"context_line":"        \"\"\""},{"line_number":417,"context_line":"        instance._context \u003d context"},{"line_number":418,"context_line":"        # NOTE(danms): We can be called with a dict instead of a"},{"line_number":419,"context_line":"        # SQLAlchemy object, so we have to be careful here"},{"line_number":420,"context_line":"        if hasattr(db_inst, \u0027__dict__\u0027):"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f93b717_c00d3738","line":417,"updated":"2018-01-25 17:47:48.000000000","message":"What is this about?","commit_id":"3fcdc74794a1f0f7abff0938252449bd23ffec57"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"37fdbdb25687ed281bc72b614c780fd983edb388","unresolved":false,"context_lines":[{"line_number":414,"context_line":""},{"line_number":415,"context_line":"        Converts a database entity to a formal object."},{"line_number":416,"context_line":"        \"\"\""},{"line_number":417,"context_line":"        instance._context \u003d context"},{"line_number":418,"context_line":"        # NOTE(danms): We can be called with a dict instead of a"},{"line_number":419,"context_line":"        # SQLAlchemy object, so we have to be careful here"},{"line_number":420,"context_line":"        if hasattr(db_inst, \u0027__dict__\u0027):"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f93b717_80c2cf84","line":417,"in_reply_to":"5f93b717_803defbc","updated":"2018-01-25 17:58:02.000000000","message":"It\u0027s set on L342 on instance, then you pass instance into this. Nothing unsets it, so it\u0027s still set. Thus, it shouldn\u0027t be done again here.","commit_id":"3fcdc74794a1f0f7abff0938252449bd23ffec57"},{"author":{"_account_id":24711,"name":"Jackie Truong","email":"jacklyn.truong@jhuapl.edu","username":"jackie-truong"},"change_message_id":"0b9f83b4fd5568abbf88f6e4831a241cc2a43ba9","unresolved":false,"context_lines":[{"line_number":414,"context_line":""},{"line_number":415,"context_line":"        Converts a database entity to a formal object."},{"line_number":416,"context_line":"        \"\"\""},{"line_number":417,"context_line":"        instance._context \u003d context"},{"line_number":418,"context_line":"        # NOTE(danms): We can be called with a dict instead of a"},{"line_number":419,"context_line":"        # SQLAlchemy object, so we have to be careful here"},{"line_number":420,"context_line":"        if hasattr(db_inst, \u0027__dict__\u0027):"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f93b717_00d8ff50","line":417,"in_reply_to":"5f93b717_80c2cf84","updated":"2018-01-25 18:05:55.000000000","message":"Done","commit_id":"3fcdc74794a1f0f7abff0938252449bd23ffec57"},{"author":{"_account_id":24711,"name":"Jackie Truong","email":"jacklyn.truong@jhuapl.edu","username":"jackie-truong"},"change_message_id":"bc9a2dfb140c09103965a1da4fa0f0414cfb5e14","unresolved":false,"context_lines":[{"line_number":414,"context_line":""},{"line_number":415,"context_line":"        Converts a database entity to a formal object."},{"line_number":416,"context_line":"        \"\"\""},{"line_number":417,"context_line":"        instance._context \u003d context"},{"line_number":418,"context_line":"        # NOTE(danms): We can be called with a dict instead of a"},{"line_number":419,"context_line":"        # SQLAlchemy object, so we have to be careful here"},{"line_number":420,"context_line":"        if hasattr(db_inst, \u0027__dict__\u0027):"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f93b717_803defbc","line":417,"in_reply_to":"5f93b717_c00d3738","updated":"2018-01-25 17:50:40.000000000","message":"I thought it had to be done, since the context gets passed from create() to _from_db_obj(). But maybe not? I can remove if not.","commit_id":"3fcdc74794a1f0f7abff0938252449bd23ffec57"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e01738cfc40563a82246aef7cf34724ae7359150","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        Converts a database entity to a formal object."},{"line_number":341,"context_line":"        \"\"\""},{"line_number":342,"context_line":"        instance._context \u003d context"},{"line_number":343,"context_line":"        if expected_attrs is None:"},{"line_number":344,"context_line":"            expected_attrs \u003d []"},{"line_number":345,"context_line":"        # Most of the field names match right now, so be quick"},{"line_number":346,"context_line":"        for field in instance.fields:"},{"line_number":347,"context_line":"            if field in INSTANCE_OPTIONAL_ATTRS:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f93b717_94d9b184","line":344,"range":{"start_line":343,"start_character":8,"end_line":344,"end_character":31},"updated":"2018-01-25 20:47:51.000000000","message":"You need this in the _extra_attributes_from_db_object method too.","commit_id":"950d579154f470f9971b54b4925eb1176972fa5d"},{"author":{"_account_id":7012,"name":"Brianna Poulos","email":"Brianna.Poulos@jhuapl.edu","username":"brianna-poulos"},"change_message_id":"6e63b1f2912ca43d8b0677eb065d10e23d35e976","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        Converts a database entity to a formal object."},{"line_number":341,"context_line":"        \"\"\""},{"line_number":342,"context_line":"        instance._context \u003d context"},{"line_number":343,"context_line":"        if expected_attrs is None:"},{"line_number":344,"context_line":"            expected_attrs \u003d []"},{"line_number":345,"context_line":"        # Most of the field names match right now, so be quick"},{"line_number":346,"context_line":"        for field in instance.fields:"},{"line_number":347,"context_line":"            if field in INSTANCE_OPTIONAL_ATTRS:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f93b717_6fdc4c74","line":344,"range":{"start_line":343,"start_character":8,"end_line":344,"end_character":31},"in_reply_to":"5f93b717_94d9b184","updated":"2018-01-25 21:15:08.000000000","message":"Good call. Done.","commit_id":"950d579154f470f9971b54b4925eb1176972fa5d"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e01738cfc40563a82246aef7cf34724ae7359150","unresolved":false,"context_lines":[{"line_number":419,"context_line":"        else:"},{"line_number":420,"context_line":"            have_extra \u003d \u0027extra\u0027 in db_inst and db_inst[\u0027extra\u0027]"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"        if \u0027numa_topology\u0027 in expected_attrs:"},{"line_number":423,"context_line":"            if have_extra:"},{"line_number":424,"context_line":"                instance._load_numa_topology("},{"line_number":425,"context_line":"                    db_inst[\u0027extra\u0027].get(\u0027numa_topology\u0027))"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f93b717_b4f2ad05","line":422,"updated":"2018-01-25 20:47:51.000000000","message":"This and the other \"if X in expected_attrs\" will raise TypeError if expected_attrs\u003dNone. You need to set expected_attrs to an empty list if it\u0027s None.\n\nAlternatively, I suppose you could remove the default value (\u003dNone) from the expected_attrs keyword argument and expect non-None to be passed considering this method won\u0027t do anything if there aren\u0027t expected_attrs.","commit_id":"950d579154f470f9971b54b4925eb1176972fa5d"},{"author":{"_account_id":7012,"name":"Brianna Poulos","email":"Brianna.Poulos@jhuapl.edu","username":"brianna-poulos"},"change_message_id":"6e63b1f2912ca43d8b0677eb065d10e23d35e976","unresolved":false,"context_lines":[{"line_number":419,"context_line":"        else:"},{"line_number":420,"context_line":"            have_extra \u003d \u0027extra\u0027 in db_inst and db_inst[\u0027extra\u0027]"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"        if \u0027numa_topology\u0027 in expected_attrs:"},{"line_number":423,"context_line":"            if have_extra:"},{"line_number":424,"context_line":"                instance._load_numa_topology("},{"line_number":425,"context_line":"                    db_inst[\u0027extra\u0027].get(\u0027numa_topology\u0027))"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f93b717_0fd7c84d","line":422,"in_reply_to":"5f93b717_b4f2ad05","updated":"2018-01-25 21:15:08.000000000","message":"Thank you for suggesting the different options.  I\u0027ve set it to an empty list.","commit_id":"950d579154f470f9971b54b4925eb1176972fa5d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ae91f5231a6777dfbabcf62b8bc17fee0b481b09","unresolved":false,"context_lines":[{"line_number":409,"context_line":""},{"line_number":410,"context_line":"    @staticmethod"},{"line_number":411,"context_line":"    def _extra_attributes_from_db_object(instance, db_inst,"},{"line_number":412,"context_line":"                                         expected_attrs\u003dNone):"},{"line_number":413,"context_line":"        \"\"\"Method to help with migration of extra attributes to objects."},{"line_number":414,"context_line":"        \"\"\""},{"line_number":415,"context_line":"        if expected_attrs is None:"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f93b717_f23844d4","line":412,"updated":"2018-01-25 22:48:01.000000000","message":"Melanie\u0027s other suggestion would really be better here because we really don\u0027t ever need to call this without expected_attrs. However, I shan\u0027t delay further on that basis.","commit_id":"46ecf410d4baa5d36dd64b0c255843245fdead28"}]}
