Repository navigation
fix: drop empty CATEGORIES lines in vcal.fix - #773
Merged
Merged
Conversation
The icalendar library inserts an empty CATEGORIES property when component.categories is read on a component without one (collective/icalendar#1722). Saved after that, tasks end up with "CATEGORIES:" next to the real CATEGORIES line. vcal.fix() now drops such empty lines on load, as a temporary workaround until the upstream bug is fixed. Data saved from an icalendar instance is not cleaned on save; it is cleaned the next time it is loaded. The warning logged on any fixup no longer blames the server: broken data may come from the server, the client or a library in between. Prompt: (...) The empty CATEGORIES-lines comes from a weird bug in the icalendar library, _reading_ `foo.categories` will silently insert the new line, it's filed upstream and workarounds have been made in the icalendar-searcher library, but I'm concerned it may crop up other places too, so we may need some auto-cleaning-script for this, as well as a workaround in the vcal.fix function under ~/caldav. (...) Prompts (comments made inline in the document while reviewing it): > (on the fixup warning blaming the calendar server) Any broken icalendar data may be due to the server breaking the standard, some the client breaking it and the server opting for round-trip preservation rather than cleanup, or some arbitrary library in between breaking things. We should keep a WARNING in place when we clean up broken icalendar data regardless of what we're cleaning, but we should refrain from participating in any blame-game > (on the write path not being cleaned on save) Cleanup on save is not something going into 3.5.0. Fix the message to point this out, but also file an issue so that we can do fixups on save later. Assisted-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit message: