Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workaround for https://github.com/python-caldav/caldav/issues/360 #369

Merged
merged 1 commit into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ This project should more or less adhere to [Semantic Versioning](https://semver.

* Code formatting / style fixes.
* Search method did some logic handling non-conformant servers (loading data from the server if the search response didn't include the icalendar data, ignoring trash from the Google server when it returns data without a VTODO/VEVENT/VJOURNAL component.
* Tests - a breakage was introduced for servers not supporting MKCALENDAR - details in https://github.com/python-caldav/caldav/pull/368
* Revisited a problem that Google sometimes delivers junk when doing searches - credits to github user @zhwei in https://github.com/python-caldav/caldav/pull/366
* There were some compatibility-logic loading objects if the server does not deliver icalendar data (as it's suppsoed to do according to the RFC), but only if passing the `expand`-flag to the `search`-method. Fixed that it loads regardless of weather `expand` is set or not. Also in https://github.com/python-caldav/caldav/pull/366
* Tests - a breakage was introduced for servers not supporting MKCALENDAR - details in https://github.com/python-caldav/caldav/pull/368
* Tests - all tests passes for python 3.12 as well - as expected.

### Changed

Expand Down
4 changes: 4 additions & 0 deletions tests/compatibility_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@

'search_needs_comptype':
"""The server may not always come up with anything useful when searching for objects and omitting to specify weather one wants to see tasks or events""",

'robur_rrule_freq_yearly_expands_monthly':
"""Robur expands a yearly event into a monthly event. I believe I've reported this one upstream at some point, but can't find back to it"""
}

xandikos = [
Expand Down Expand Up @@ -375,6 +378,7 @@
'text_search_not_working',
'no_relships',
'isnotdefined_not_working',
'robur_rrule_freq_yearly_expands_monthly'
]

posteo = [
Expand Down
12 changes: 9 additions & 3 deletions tests/test_caldav.py
Original file line number Diff line number Diff line change
Expand Up @@ -2451,10 +2451,16 @@ def testRecurringDateSearch(self):
## resultset should be one vcalendar with two events.
assert len(r1) == 1
assert "RRULE" not in r1[0].data
assert r1[0].data.count("END:VEVENT") == 2
if self.check_compatibility_flag("robur_rrule_freq_yearly_expands_monthly"):
assert r1[0].data.count("END:VEVENT") == 13
else:
assert r1[0].data.count("END:VEVENT") == 2
## However, the new search method will by default split it into
## two events
assert len(r2) == 2
## two events. Or 13, in the case of robur
if self.check_compatibility_flag("robur_rrule_freq_yearly_expands_monthly"):
assert len(r2) == 13
else:
assert len(r2) == 2
assert "RRULE" not in r2[0].data
assert "RRULE" not in r2[1].data
assert r2[0].data.count("END:VEVENT") == 1
Expand Down
Loading