'Get persistent state for this ResourceSubscription.'

def __getstate__(self):

    state = copy.copy(self.__dict__)
    state['publisher'] = None
    state['waiting'] = 0
    state['pending'] = []
    return state
