calendaring_sync.objects.change module#
The three ways an object can appear in a change set.
- class calendaring_sync.objects.change.Changed(version, fingerprint, content, containers=frozenset({}), logical_key=None)[source]#
Bases:
objectThe object changed on the server, or is new there.
- fingerprint#
The object’s fingerprint, computed by the adapter.
- Type:
- containers#
The containers the object belongs to.
- logical_key#
The object’s logical key, if it has one.
- Raises:
TypeError – If a field has the wrong type.
LoneSurrogateError – If a string holds a lone surrogate.
Examples
An adapter reports an object the server changed, and one it removed, in a change set from token
t1tot2:>>> from calendaring_sync import Changed, ChangeSet, Removed >>> changes = {"a": Changed("v2", "fp-a2", b"Team meeting, moved"), "b": Removed()} >>> change_set = ChangeSet("work", "t1", "t2", changes) >>> change_set.changes["a"].content b'Team meeting, moved'
- class calendaring_sync.objects.change.Removed[source]#
Bases:
objectThe object is gone from the server.
- class calendaring_sync.objects.change.Unchanged[source]#
Bases:
objectThe object hasn’t changed since the version the store holds.
Only a full listing reports this, so the object isn’t fetched again.