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

delete() sends no If-Match, so a concurrent change is deleted silently

Chiusa
#740 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Una pull request collegata è già stata integrata.

  • #747 di @tobixen — integrata

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
22/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
api

Direzione di ricerca

Start with DAVObject.delete() and _post_delete() in the caldav package, and compare them with save(), which already sends If-Match and If-Schedule-Tag-Match. Decide how 404 should behave when a precondition is given, and check the work in linked pull request #747 before starting. Done means delete() sends the etag precondition, a 412 raises a catchable error, and tests cover both cases.

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 (Claude Code), from the prompt:

https://github.com/pycalendar/calendaring-sync/pull/19 [and the design notes of the calendaring library] - please file the issues mentioned in that pull request


DAVObject.delete() calls self.client.delete(str(self.url)) without any precondition header, and _post_delete() treats 404 as success.

save() can already send If-Match / If-Schedule-Tag-Match. delete() cannot, so a client that last saw etag A will delete the object even if someone else has changed it to etag B in the meantime. For a sync engine that is data loss: the remote edit should have become a conflict instead.

Wanted: delete() sends If-Match: <etag> when the object has a known etag (or on request, e.g. delete(if_match=True) / delete(etag=...)), and a 412 raises a distinct error the caller can catch. Whether 404 should still count as success when a precondition was given is worth deciding at the same time.

Related: https://github.com/python-caldav/caldav/issues/152 (collision avoidance on save).
Found by calendaring-sync: https://github.com/pycalendar/calendaring-sync/pull/19

Lingua principale
Python
Stelle
412
Fork
113
Merge medio
1g 7h
PR unite (30g)
34

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.