Know when icalendar_instance was modified
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Start by reading the linked icalendar#1914 proposal and caldav issue #613 to understand the dependency and the existing DataState design. Then inspect IcalendarState and the data access and save paths; the issue gives no file or test names. Done means safely detecting modifications, caching serialization, and skipping unchanged saves while accounting for in-place list mutations and the vobject path.
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 prompts:
Have a look at https://github.com/collective/icalendar/issues/1914 - how could this help us in this library?
Make an issue in the caldav tracker, but make it clear that it depends on #1914 [collective/icalendar#1914] and that it has low priority.
Low priority. Blocked on https://github.com/collective/icalendar/issues/1914, which is an open proposal and not implemented yet.
Since https://github.com/python-caldav/caldav/issues/613, a CalendarObjectResource keeps its data in a DataState. In IcalendarState, caldav cannot know whether the user has changed the icalendar.Calendar it handed out, so get_data() calls to_ical() again on every call, and save() cannot tell an unchanged object from a changed one.
icalendar#1914 proposes a ComponentFactory that is also used for parsing, plus Component.convert_to(factory). With it, caldav could parse into its own subclasses of icalendar.Event/Todo/Journal (and Calendar) that override __setitem__, __delitem__, pop and update to mark the object as modified. I checked this against icalendar 7.3.1.dev188 with a Todo subclass: writes through the typed properties all go through those methods (summary, status, DUE, DURATION, DTSTART, categories = [...], add(), del). In-place changes such as categories.append(...) do not.
What it would allow:
IcalendarState.get_data()could cache the serialised string and drop the cache on a write, so it would not callto_ical()on every read.save()could skip a write, or log one, when nothing was changed.- The objects that come out of recurrence expansion (recurring-ical-events) would keep the subclass if r-i-e uses the same factory. That is what collective/icalendar#1914 is meant for.
Limits:
- In-place mutation of returned lists is not seen, so a snapshot comparison is still needed as a fallback before trusting "unchanged".
- It depends on icalendar sending every write through those dict methods. That is true today, but it is an implementation detail, and icalendar would have to promise it.
isinstance(x, icalendar.Event)still holds for a subclass, so user code is not affected, but it raises caldav's minimum icalendar version.- The vobject path gets nothing from this.
The same approach has been chosen for change tracking in https://github.com/pycalendar/calendaring (see open question 13 in docs/design/API_DESIGN.md). If it works there, caldav can follow.
- Ngôn ngữ chính
- Python
- Star
- 412
- Fork
- 113
- Merge trung bình
- 1 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 34
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
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
python-caldav/caldav#763 ·
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 48/100
python-caldav/caldav#725 ·
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 48/100
python-caldav/caldav#720 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
python-caldav/caldav#704 ·
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ự
-
area: agents area: docs good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
openapi/gknowledge#23 ·
-
get() for StrEnumCó thể đã có người làm @FeJo5952 đã nhận hôm nay. Đang mởgood first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
collective/icalendar#1921 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Improvement Python Spans
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
getsentry/sentry-python#7994 · 1 bình luận ·
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 82/100
alphagov/notifications-api#5004 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
equinor/radix-flux#3922 ·
Maintainer thường phản hồi trong vòng 1 ngày