delete() sends no If-Match, so a concurrent change is deleted silently
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
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
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của python-caldav/caldav
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
python-caldav/caldav#687 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
python-caldav/caldav#780 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
compatibility refactoring
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 32/100
python-caldav/caldav#778 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Support for ical objectsĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 18/100
python-caldav/caldav#777 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
python-caldav/caldav#774 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của python-caldav/caldav
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
huggingface/sentence-transformers#4186 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
QuantEcon/QuantEcon.py#988 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
fabriziosalmi/certmate#1247 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation good first issue
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 72/100
sujithputta02/Esapay#13 ·