)]}'
{"oslo_versionedobjects/fields.py":[{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"359ec21f6a7b5cd34f8f19083eee1b1da68cf53b","unresolved":false,"context_lines":[{"line_number":736,"context_line":"        for name, field in obj.fields.items():"},{"line_number":737,"context_line":"            if field \u003d\u003d self:"},{"line_number":738,"context_line":"                return name"},{"line_number":739,"context_line":"        return \u0027unknown\u0027"},{"line_number":740,"context_line":""},{"line_number":741,"context_line":"    def coerce(self, obj, attr, value):"},{"line_number":742,"context_line":"        super(StateMachine, self).coerce(obj, attr, value)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_b8281a9b","line":739,"updated":"2016-02-01 23:00:30.000000000","message":"I\u0027m trying to think this though in my head, but it\u0027s not even remotely possible to get to this unknown, there HAS to be a field with our name right? If there wasn\u0027t a field with this name, how are we even in coerce on that field?\n\nThe only reason I say this is because I don\u0027t want a message to be \"MyThing.unknown is not allowed to transition out of active state\" because that can get just as confusing as not having a field name...","commit_id":"b16584c6af06e749cfbc74dcc6c8c7a4f4303271"},{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"c9d4d2d0f993437e0c45074ce19ea59604fa06ae","unresolved":false,"context_lines":[{"line_number":736,"context_line":"        for name, field in obj.fields.items():"},{"line_number":737,"context_line":"            if field \u003d\u003d self:"},{"line_number":738,"context_line":"                return name"},{"line_number":739,"context_line":"        return \u0027unknown\u0027"},{"line_number":740,"context_line":""},{"line_number":741,"context_line":"    def coerce(self, obj, attr, value):"},{"line_number":742,"context_line":"        super(StateMachine, self).coerce(obj, attr, value)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a57f1b5_ee5525c6","line":739,"in_reply_to":"7a5de9d1_b18c7b80","updated":"2016-02-10 14:45:15.000000000","message":"Out of curiosity, if you do attempt to do coerce on your own, what do you pass in as obj then? Just some stub object that really doesn\u0027t impact anything? If that\u0027s the case, then yeah I think this is called directly really rarely, but it is defensive which is good, so I\u0027ll be fine with unknown (since it\u0027ll basically never show up).","commit_id":"b16584c6af06e749cfbc74dcc6c8c7a4f4303271"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"0c06dfa27d6a2ad712b9e83344eb9f2d743a6fb9","unresolved":false,"context_lines":[{"line_number":736,"context_line":"        for name, field in obj.fields.items():"},{"line_number":737,"context_line":"            if field \u003d\u003d self:"},{"line_number":738,"context_line":"                return name"},{"line_number":739,"context_line":"        return \u0027unknown\u0027"},{"line_number":740,"context_line":""},{"line_number":741,"context_line":"    def coerce(self, obj, attr, value):"},{"line_number":742,"context_line":"        super(StateMachine, self).coerce(obj, attr, value)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_ca129c58","line":739,"in_reply_to":"7a5de9d1_b18c7b80","updated":"2016-02-02 22:11:17.000000000","message":"Perhaps return \"?\" instead? That at least can\u0027t be a valid python attribute.","commit_id":"b16584c6af06e749cfbc74dcc6c8c7a4f4303271"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"3779e945facb47d79d8bc6b3e157f09ac09779f6","unresolved":false,"context_lines":[{"line_number":736,"context_line":"        for name, field in obj.fields.items():"},{"line_number":737,"context_line":"            if field \u003d\u003d self:"},{"line_number":738,"context_line":"                return name"},{"line_number":739,"context_line":"        return \u0027unknown\u0027"},{"line_number":740,"context_line":""},{"line_number":741,"context_line":"    def coerce(self, obj, attr, value):"},{"line_number":742,"context_line":"        super(StateMachine, self).coerce(obj, attr, value)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_b18c7b80","line":739,"in_reply_to":"7a5de9d1_b8281a9b","updated":"2016-02-02 21:00:17.000000000","message":"The only thing I was thinking was if someone created a field and used its coerce method directly, which you could do. So I was just trying to be defensive.","commit_id":"b16584c6af06e749cfbc74dcc6c8c7a4f4303271"}],"oslo_versionedobjects/tests/test_fields.py":[{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"359ec21f6a7b5cd34f8f19083eee1b1da68cf53b","unresolved":false,"context_lines":[{"line_number":286,"context_line":"            ex \u003d None"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"        self.assertIsNotNone(ex, \u0027Invalid transition failed to raise error\u0027)"},{"line_number":289,"context_line":"        self.assertEqual(\u0027AnObject.status is not allowed to transition out \u0027"},{"line_number":290,"context_line":"                         \u0027of \\\u0027ERROR\\\u0027 state to \\\u0027ACTIVE\\\u0027 state, choose from \u0027"},{"line_number":291,"context_line":"                         \u0027[\\\u0027PENDING\\\u0027]\u0027,"},{"line_number":292,"context_line":"                         str(ex))"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_1d5cc07b","line":289,"updated":"2016-02-01 23:00:30.000000000","message":"nit: you should use double quotes around these strings so you don\u0027t have to escape the single quotes in the rest of the message.","commit_id":"b16584c6af06e749cfbc74dcc6c8c7a4f4303271"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"3779e945facb47d79d8bc6b3e157f09ac09779f6","unresolved":false,"context_lines":[{"line_number":286,"context_line":"            ex \u003d None"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"        self.assertIsNotNone(ex, \u0027Invalid transition failed to raise error\u0027)"},{"line_number":289,"context_line":"        self.assertEqual(\u0027AnObject.status is not allowed to transition out \u0027"},{"line_number":290,"context_line":"                         \u0027of \\\u0027ERROR\\\u0027 state to \\\u0027ACTIVE\\\u0027 state, choose from \u0027"},{"line_number":291,"context_line":"                         \u0027[\\\u0027PENDING\\\u0027]\u0027,"},{"line_number":292,"context_line":"                         str(ex))"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_91e61f43","line":289,"in_reply_to":"7a5de9d1_1d5cc07b","updated":"2016-02-02 21:00:17.000000000","message":"I could, but I often do this because I prefer the consistency of not mixing quotes in a single scope. I haaate that :)","commit_id":"b16584c6af06e749cfbc74dcc6c8c7a4f4303271"},{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"c9d4d2d0f993437e0c45074ce19ea59604fa06ae","unresolved":false,"context_lines":[{"line_number":286,"context_line":"            ex \u003d None"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"        self.assertIsNotNone(ex, \u0027Invalid transition failed to raise error\u0027)"},{"line_number":289,"context_line":"        self.assertEqual(\u0027AnObject.status is not allowed to transition out \u0027"},{"line_number":290,"context_line":"                         \u0027of \\\u0027ERROR\\\u0027 state to \\\u0027ACTIVE\\\u0027 state, choose from \u0027"},{"line_number":291,"context_line":"                         \u0027[\\\u0027PENDING\\\u0027]\u0027,"},{"line_number":292,"context_line":"                         str(ex))"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a57f1b5_6e829502","line":289,"in_reply_to":"7a5de9d1_91e61f43","updated":"2016-02-10 14:45:15.000000000","message":"You would rather escape single quotes than change to double quotes? You\u0027re weird :)","commit_id":"b16584c6af06e749cfbc74dcc6c8c7a4f4303271"}]}
