delete() sends no If-Match, so a concurrent change is deleted silently
メンテナーはふだん 1 日以内に返信
関連するプルリクエストがすでにマージされています。
- #747 @tobixen による — マージ済み
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Python
- スター
- 412
- フォーク
- 113
- 平均マージ
- 1日 2時間
- マージ済み PR(30日)
- 43
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
python-caldav/caldav のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
python-caldav/caldav#687 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
python-caldav/caldav#780 ·
メンテナーはふだん 1 日以内に返信
-
compatibility refactoring
難易度 4/5 3〜5日 初心者へのやさしさ 32/100
python-caldav/caldav#778 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 18/100
python-caldav/caldav#777 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
python-caldav/caldav#774 ·
メンテナーはふだん 1 日以内に返信
python-caldav/caldav の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
cathrynlavery/diagram-design#441 ·
メンテナーはふだん 2 日以内に返信
-
[Cleanup] Include the public header in work_split.cpp対応中かも @blozano-tt が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
tenstorrent/tt-metal#60850 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
backend::sglang bug language::python observability
難易度 2/5 半日 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
OpenShot/openshot-qt#6202 ·
メンテナーはふだん 1 日以内に返信