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

Principal.calendar_home_set and get_calendars() disagree on where calendars live without a calendar-home-set

クローズ
#749 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

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

調査の方向性

Read Principal.calendar_home_set in caldav/collection.py alongside BaseDAVClient._calendar_home_urls() and trace how Principal.calendar(), make_calendar(), and _async_get_calendar_home_set() use the property. Check the iCloud host-switching behavior in the setter and run the GMX-related tests to compare discovery and calendar creation paths. Done means both paths use the same fallback order and synchronous and asynchronous behavior remain consistent.

索引モデルが issue の本文から書いたものです。

説明

Disclaimer: AI-generated text below the line, generated by Claude Opus 5.5 (Claude Code) while reviewing https://github.com/python-caldav/caldav/pull/744, from the prompts:

Look into #744
Rebase and fix issues


On a server that advertises no calendar-home-set, the two discovery paths look in different places:

  • client.get_calendars() / Principal.get_calendars() (BaseDAVClient._calendar_home_urls()) search the principal URL first (the GMX fallback), and since https://github.com/python-caldav/caldav/pull/744 the client URL only when the principal holds no calendars.
  • Principal.calendar_home_set (caldav/collection.py, the setter) falls back to client.url: URL.objectify(None) is None, and client.url.join(None) is the client URL. Principal.calendar(name=..., cal_id=...), Principal.make_calendar() and their async twins go through this property.

So on GMX-like servers principal.get_calendars() can list calendars that principal.calendar(cal_id=...) will not resolve against the same base, and make_calendar() creates below the client URL rather than below the principal where the calendars were found. The inconsistency predates PR 744 - the GMX fallback in get_calendars() was added without touching the property.

Possible fix: have Principal.calendar_home_set use the same fallback order as _calendar_home_urls() (principal URL, then client URL), sharing the logic rather than duplicating it. Needs care for the async lazy path (_async_get_calendar_home_set()) and the icloud host-switching side effect in the setter.

(It's needed to get tests working under GMX again to see how it behaves)

主要言語
Python
スター
412
フォーク
113
平均マージ
1日 7時間
マージ済み PR(30日)
34

環境構築

はじめの一歩

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

python-caldav/caldav のほかの issue

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

似ている issue

Python の issue をもっと見る

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

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