Collation: accent-insensitive and locale-aware searches must be decided client-side
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start with CalDAVSearcher.add_property_filter(), which overrides the signature without accent_sensitive, then _build_search_xml_query and _collation_to_caldav, which decide what goes on the wire. The first step is the research the issue asks for: check how real CalDAV servers match the collations, using caldav-server-tester. Done means that positive contains and == searches send no broader text-match, !contains is post-filtered, and tests cover each collation, case and accent combination, plus a functional muller/Müller test.
索引モデルが issue の本文から書いたものです。
説明
Disclaimer: AI-generated text below the line, generated by Claude Opus 5.5, from the prompt(s):
strip release numbers from the ROADMAP and push it, file the caldav collation work [the collation work in icalendar-searcher added an
accent_sensitiveparameter, whichcaldavhas to follow up]
icalendar-searcher (pull request: https://github.com/pycalendar/icalendar-searcher/pull/20) gives add_property_filter() an accent_sensitive parameter beside case_sensitive, and makes contains collation-aware under Collation.UNICODE / Collation.LOCALE (ICU StringSearch, the same collator as ==). The decision and its CalDAV mapping are written down in icalendar-searcher's docs/ROADMAP.md, Phase 3.
None of the collations a CalDAV server is required to support (RFC 4791 section 7.5) can express this. i;octet is case- and accent-sensitive, i;ascii-casemap folds ASCII case only, and i;unicode-casemap (RFC 5051) folds case but not accents. None of them is accent-insensitive or locale-aware.
So whenever the client-side collation is broader than what goes on the wire, the server returns a subset and the post-filter cannot bring the lost objects back. With accent_sensitive=False, a search for SUMMARY contains "muller" is sent as a text-match and the server drops "Herr Müller".
Research first: before any of this, find out which collations the servers actually support and how they match (caldav-server-tester, overlapping the first items of https://github.com/python-caldav/caldav/issues/567). The statement that no server can do accent-insensitive or locale-aware matching is from the RFC, not from testing; if some servers do better, the items below change.
What caldav needs to do:
-
CalDAVSearcher.add_property_filter()overrides the signature and lacksaccent_sensitive; add it, and pass it on. - In
_build_search_xml_query, send notext-matchforcontains/==when the client-side match can be broader than the server's. That isaccent_sensitive=False,Collation.LOCALE, andCollation.UNICODEwhatevercase_sensitivesays (ICU ignores ignorable characters, also when case-sensitive - "kaffee" matches "Kaffee" with a soft hyphen - which neitheri;octetnori;unicode-casemapdoes). At most a bareprop-filterasserting the property is defined, as for!=, and forcepost_filter. - A negated
text-match(!contains) is the other way round: a stricter server collation returns a superset, which is harmless as long as the client post-filters. Make sure it does. -
_collation_to_caldavmapsCollation.LOCALEtoi;ascii-casemapeven whencase_sensitive=True. With the item above,LOCALEno longer reaches it for positive matches, so either drop the branch or make iti;octetwhen case-sensitive. - Bump the icalendar-searcher requirement to the release carrying
accent_sensitive. - Tests: the XML builder for each (collation, case, accent) combination, and a functional test that "muller" finds "Müller" with
accent_sensitive=False.
Related: https://github.com/python-caldav/caldav/issues/567 (probing what the servers actually do with the collations). Once that is known, the item above could send a text-match to servers that are known to do better than the RFC requires.
- 主要言語
- Python
- スター
- 412
- フォーク
- 113
- 平均マージ
- 11時間 37分
- マージ済み PR(30日)
- 50
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
python-caldav/caldav のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
python-caldav/caldav#799 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
python-caldav/caldav#792 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
python-caldav/caldav#788 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
python-caldav/caldav#687 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 75/100
python-caldav/caldav#796 ·
メンテナーはふだん 1 日以内に返信
python-caldav/caldav の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
mohitmishra786/readprism#322 ·
メンテナーはふだん 1 日以内に返信
-
good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
API-key credentials accept a blank key: empty via the API, spaces-only via the builder's Add API key dialog対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
Significant-Gravitas/AutoGPT#15727 ·
メンテナーはふだん 1 日以内に返信