def __eq__(self, other): """Make sure that specialized releases are only comparable to the same other specialized release. This for instance lets us treat them separately for serialization purposes. """ return Model.__eq__( self, other) and self._for_project_id == other._for_project_id
def __getstate__(self): state = Model.__getstate__(self) # do not pickle cached info. We want to fetch this on demand # again. In particular if we were to pickle interfaces we would # pickle a CanonicalKeyView which old sentry workers do not know # about state.pop('_project_cache', None) state.pop('_group_cache', None) state.pop('interfaces', None) return state
def __getstate__(self): state = Model.__getstate__(self) # do not pickle cached info. We want to fetch this on demand # again. In particular if we were to pickle interfaces we would # pickle a CanonicalKeyView which old sentry workers do not know # about state.pop('_project_cache', None) state.pop('_group_cache', None) state.pop('interfaces', None) return state