Skip to content

feat: keep server bytes, save given bytes as-is - #803

Merged
tobixen merged 2 commits into
masterfrom
feat/raw-bytes
Oct 19, 2026
Merged

tobixen merged 2 commits into
masterfrom
feat/raw-bytes

Conversation

@tobixen

@tobixen tobixen commented Oct 19, 2026

Copy link
Copy Markdown
Member

Stacked on #802 - only the last commit belongs to this PR; the two before it are 802's.

Commit message:

feat: keep server bytes, save given bytes as-is

A calendar object now keeps the calendar data the server sent, before
vcal.fix(), in the read-only raw_data attribute: the GET body byte for
byte after load(), the calendar-data text after a REPORT.  It is a
snapshot of the last read, cleared by save().  save(raw_data=...) PUTs
the given UTF-8 bytes unchanged, with the usual If-Match / Schedule-Tag
preconditions, no_overwrite / no_create wildcards and no SEQUENCE
bump; the bytes win over local edits.  Sync tools need this to compare
and copy what servers store.

Fixes https://github.com/python-caldav/caldav/issues/763

Prompt: yes, but check that no other session is working on #763 [answer to whether a subagent should implement https://github.com/python-caldav/caldav/issues/763, keeping the server's bytes and sending given bytes unchanged, for caldav 3.6]
Followup-Prompt: Also continue with the subagents [resume this work after an interruption]

Assisted-By: Claude Opus 5.5 (1M context)
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>

A checkout without a generated caldav/_version.py (any fresh git
worktree) also emits the "install the build package" UserWarning, so
test_import_warns saw two warnings and failed.

Prompt: (...) We should fix test breakages
and continue [merging prs] [the jmap test failed in fresh worktrees used
for the merge train]

Assisted-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
A calendar object now keeps the calendar data the server sent, before
vcal.fix(), in the read-only raw_data attribute: the GET body byte for
byte after load(), the calendar-data text after a REPORT.  It is a
snapshot of the last read, cleared by save().  save(raw_data=...) PUTs
the given UTF-8 bytes unchanged, with the usual If-Match / Schedule-Tag
preconditions, no_overwrite / no_create wildcards and no SEQUENCE
bump; the bytes win over local edits.  Sync tools need this to compare
and copy what servers store.

Fixes #763

Prompt: yes, but check that no other session is working on #763 [answer to whether a subagent should implement #763, keeping the server's bytes and sending given bytes unchanged, for caldav 3.6]
Followup-Prompt: Also continue with the subagents [resume this work after an interruption]

Assisted-By: Claude Opus 5.5 (1M context)
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
@tobixen
tobixen merged commit 6ebba9d into master Oct 19, 2026
16 checks passed
@tobixen
tobixen deleted the feat/raw-bytes branch October 19, 2026 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant