)]}'
{"oslo_versionedobjects/fields.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e159bd88c661161846a15bf03289c960cc6ff33f","unresolved":false,"context_lines":[{"line_number":247,"context_line":""},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"class Enum(String):"},{"line_number":250,"context_line":"    def __init__(self, valid_values\u003dNone, **kwargs):"},{"line_number":251,"context_line":"        self._valid_values \u003d valid_values"},{"line_number":252,"context_line":"        super(Enum, self).__init__(**kwargs)"},{"line_number":253,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa53dc9_36db9b7e","line":250,"updated":"2015-04-07 15:20:54.000000000","message":"Hmm, I\u0027m not sure what an enum field with no valid values means. Surely we need to have that list to function, right?","commit_id":"eb0bd8284de11e31f5ceab80fc5a8b49e8457137"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"a74a6b4e593ec68ca1e009e61250b6ea503b1283","unresolved":false,"context_lines":[{"line_number":247,"context_line":""},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"class Enum(String):"},{"line_number":250,"context_line":"    def __init__(self, valid_values\u003dNone, **kwargs):"},{"line_number":251,"context_line":"        self._valid_values \u003d valid_values"},{"line_number":252,"context_line":"        super(Enum, self).__init__(**kwargs)"},{"line_number":253,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa53dc9_5dff53aa","line":250,"in_reply_to":"9aa53dc9_36db9b7e","updated":"2015-04-07 18:44:32.000000000","message":"Ack. will throw error if it is None/empty or not a list.","commit_id":"eb0bd8284de11e31f5ceab80fc5a8b49e8457137"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e159bd88c661161846a15bf03289c960cc6ff33f","unresolved":false,"context_lines":[{"line_number":255,"context_line":"        if self._valid_values and value not in self._valid_values:"},{"line_number":256,"context_line":"            msg \u003d _(\"Field value %s is invalid\") % value"},{"line_number":257,"context_line":"            raise ValueError(msg)"},{"line_number":258,"context_line":"        return super(Enum, self).coerce(obj, attr, value)"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    def stringify(self, value):"},{"line_number":261,"context_line":"        if self._valid_values and value not in self._valid_values:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa53dc9_5673bf80","line":258,"updated":"2015-04-07 15:20:54.000000000","message":"There is a potential for issue here. If I have a list of valid_values that are not serializable in their own right, then when I go to send it over the wire, I\u0027ll fail. I would think we should catch that early on. Maybe we try to serialize each of the valid values, and then if that succeeds, we know we don\u0027t need to check it later?","commit_id":"eb0bd8284de11e31f5ceab80fc5a8b49e8457137"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e159bd88c661161846a15bf03289c960cc6ff33f","unresolved":false,"context_lines":[{"line_number":258,"context_line":"        return super(Enum, self).coerce(obj, attr, value)"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    def stringify(self, value):"},{"line_number":261,"context_line":"        if self._valid_values and value not in self._valid_values:"},{"line_number":262,"context_line":"            msg \u003d _(\"Field value %s is invalid\") % value"},{"line_number":263,"context_line":"            raise ValueError(msg)"},{"line_number":264,"context_line":"        return super(Enum, self).stringify(value)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa53dc9_d6ba2fe1","line":261,"updated":"2015-04-07 15:20:54.000000000","message":"If we remove the possibility for valid_values to be None (I don\u0027t even know what that means) then this could never be true and should be removed.","commit_id":"eb0bd8284de11e31f5ceab80fc5a8b49e8457137"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"a74a6b4e593ec68ca1e009e61250b6ea503b1283","unresolved":false,"context_lines":[{"line_number":258,"context_line":"        return super(Enum, self).coerce(obj, attr, value)"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    def stringify(self, value):"},{"line_number":261,"context_line":"        if self._valid_values and value not in self._valid_values:"},{"line_number":262,"context_line":"            msg \u003d _(\"Field value %s is invalid\") % value"},{"line_number":263,"context_line":"            raise ValueError(msg)"},{"line_number":264,"context_line":"        return super(Enum, self).stringify(value)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa53dc9_bd21bf4f","line":261,"in_reply_to":"9aa53dc9_d6ba2fe1","updated":"2015-04-07 18:44:32.000000000","message":"ack we don\u0027t need to check if valid_values is None","commit_id":"eb0bd8284de11e31f5ceab80fc5a8b49e8457137"}]}
