Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Apply vcal.fix() fixups on save, not only on load

Aperta
#774 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Start from CalendarObjectResource._set_data and vcal.fix() to see where fixups run on load, then trace the save path that sends the icalendar data to the server unchanged. The open questions are which fixups are safe to apply on save and how this interacts with sending given bytes unchanged (issue 763). Done means fixups run on save without breaking byte passthrough, with the warning behaviour settled.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Disclaimer: AI-generated text below the line, generated by Claude Opus 5.5, from the prompt:

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.


vcal.fix() only runs when raw icalendar data is set on an object (CalendarObjectResource._set_data, on load). Data built or edited through the icalendar instance and then saved goes to the server as-is.

A concrete case: reading component.categories on a component without categories makes the icalendar library insert an empty CATEGORIES: (https://github.com/collective/icalendar/issues/1722). If the object is saved after that, the empty line is stored on the server. The fixup added for it in vcal.fix() (https://github.com/python-caldav/caldav/pull/773, for 3.5.0) only drops it the next time the object is loaded.

Running the fixups on save as well would stop such breakage from reaching the server. Things to consider:

  • Which fixups are safe to apply on the way out.
  • It interacts with https://github.com/python-caldav/caldav/issues/763: sending given bytes unchanged must stay possible.
  • The fixup warning is logged on every modification, so it would also fire on save.
Lingua principale
Python
Stelle
412
Fork
113
Merge medio
1g 2h
PR unite (30g)
41

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di python-caldav/caldav

Tutte le issue di python-caldav/caldav

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.