Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đã đóng
#740 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Một pull request liên quan đã được merge.

  • #747 của @tobixen — đã merge

Đánh giá

Độ khó
3/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
22/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
api

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Python
Star
412
Fork
113
Merge trung bình
1 ngày 2 giờ
Pull request đã merge (30 ngày)
43

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của python-caldav/caldav

Tất cả issue của python-caldav/caldav

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.