calendaring_sync.objects.conflict module#

What the server has or said in a conflict, kept on its record until resolved.

class calendaring_sync.objects.conflict.ConflictKind(*values)[source]#

Bases: StrEnum

How the server’s copy and the local edit disagree.

BOTH_CHANGED = 'both_changed'#

Both sides changed the object.

REMOVED_REMOTELY = 'removed_remotely'#

The server removed the object, and you changed it.

DELETED_LOCALLY = 'deleted_locally'#

You deleted the object, and the server changed it.

BOTH_CREATED = 'both_created'#

The server has a new object at the id your unsent create chose.

LOGICAL_KEY_TAKEN = 'logical_key_taken'#

The server refused your create, or your change, because another object holds its logical key. Once that object stops holding it, the edit is pending again.

NOT_ALLOWED = 'not_allowed'#

The server won’t take your create, change or delete as you sent it, for example because you may only read the object, or because it won’t store such content. It stays open until you resolve it.

class calendaring_sync.objects.conflict.Conflict(kind, remote_version, remote_fingerprint, remote_content, remote_containers, remote_logical_key, opened_at, holder=None, reason=None)[source]#

Bases: object

What the server has or said about an object, kept where it conflicts with your edit.

For most conflicts that’s the server’s copy. For an edit the server refused, it holds no copy, only what the server said: the object holding the logical key, or its reason.

Together with its record’s synced copy and Record.edit, it makes up the conflict record: the record’s content is the object as both sides last agreed on it, edit.content is yours, and remote_content is the server’s. A resolution can compare all three, for example to keep both sides where they changed different parts of the object.

kind#

How the two sides disagree.

Type:

ConflictKind

remote_version#

The version of the server’s copy, None if it has none, the server removed the object, or after a fingerprint scheme change until the server’s copy is fetched again.

Type:

str | None

remote_fingerprint#

The fingerprint of the server’s copy, None if the server removed the object, or after a fingerprint scheme change until the server’s copy is fetched again.

Type:

str | None

remote_content#

The server’s copy, None if the server removed the object.

Type:

bytes | None

remote_containers#

The containers of the server’s copy.

Type:

frozenset[str]

remote_logical_key#

The logical key of the server’s copy, if it has one.

Type:

str | None

opened_at#

When the conflict was first stored.

Type:

datetime

holder#

For an edit refused because another object holds its logical key, that object’s object id when the server named it; None otherwise.

Type:

str | None

reason#

For an edit the server didn’t allow, the server’s explanation as the adapter reports it, to show to a person; None otherwise, or when the server gave none.

Type:

str | None

classmethod from_change(kind, change, opened_at)[source]#

Return a conflict whose server side is what a change reported.

Return type:

Self

Last updated on 2026-11-11.