Exemplo n.º 1
0
 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
Exemplo n.º 2
0
    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
Exemplo n.º 3
0
    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