Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Collation: accent-insensitive and locale-aware searches must be decided client-side

オープン
#769 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
api, search

調査の方向性

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_sensitive parameter, which caldav has 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 lacks accent_sensitive; add it, and pass it on.
  • In _build_search_xml_query, send no text-match for contains / == when the client-side match can be broader than the server's. That is accent_sensitive=False, Collation.LOCALE, and Collation.UNICODE whatever case_sensitive says (ICU ignores ignorable characters, also when case-sensitive - "kaffee" matches "Ka­ffee" with a soft hyphen - which neither i;octet nor i;unicode-casemap does). At most a bare prop-filter asserting the property is defined, as for !=, and force post_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_caldav maps Collation.LOCALE to i;ascii-casemap even when case_sensitive=True. With the item above, LOCALE no longer reaches it for positive matches, so either drop the branch or make it i;octet when 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

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

python-caldav/caldav のほかの issue

python-caldav/caldav の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。