Skip to content

Commit 492ee42

Browse files
tobixenclaude
andcommitted
refactor: replace no_supported_components_support flag with get-supported-components feature
The old incompatibility flag caused testGetSupportedComponents to be skipped entirely for some servers. Now that get_supported_components() has an RFC-compliant fallback, the test never raises; remove the skip. Replace the flag with the new-style "get-supported-components" feature (unsupported) in robur and purelymail. Also add the "create-calendar.with-supported-component-types" feature definition for the upcoming server-tester check. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent a087743 commit 492ee42

2 files changed

Lines changed: 7 additions & 11 deletions

File tree

caldav/compatibility_hints.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ class FeatureSet:
8585
"get-supported-components": {
8686
"description": "Server returns the supported-calendar-component-set property (RFC 4791 section 5.2.3). The property is optional: when absent the RFC mandates that all component types are accepted, so 'unsupported' here is not a protocol violation, but the client cannot determine the actual supported set without trying.",
8787
},
88+
"create-calendar.with-supported-component-types": {
89+
"description": "Server honours the supported-calendar-component-set restriction set at MKCALENDAR time. When 'full', the server both advertises (or enforces) the restriction; when 'unsupported', the restriction is silently ignored (wrong-type objects can be saved to the calendar). When 'ungraceful', the MKCALENDAR request itself fails when a component set is specified.",
90+
},
8891
"rate-limit": {
8992
"type": "client-feature",
9093
"description": "client (or test code) must sleep a bit between requests. Pro-active rate limiting is done through interval and count, server-flagged rate-limiting is controlled through default_sleep/max_sleep",
@@ -812,9 +815,6 @@ def dotted_feature_set_list(self, compact=False):
812815
'non_existing_raises_other':
813816
"""Robur raises AuthorizationError when trying to access a non-existing resource (while 404 is expected). Probably so one shouldn't probe a public name space?""",
814817

815-
'no_supported_components_support':
816-
"""The supported components prop query does not work""",
817-
818818
'no_relships':
819819
"""The calendar server does not support child/parent relationships between calendar components""",
820820

@@ -1230,11 +1230,11 @@ def dotted_feature_set_list(self, compact=False):
12301230
'old_flags': [
12311231
'non_existing_raises_other', ## AuthorizationError instead of NotFoundError
12321232
'no_scheduling',
1233-
'no_supported_components_support',
12341233
'no_relships',
12351234
],
12361235
'test-calendar': {'cleanup-regime': 'wipe-calendar'},
12371236
"sync-token": {"support": "ungraceful"},
1237+
"get-supported-components": {"support": "unsupported"},
12381238
}
12391239

12401240
posteo = {
@@ -1407,12 +1407,9 @@ def dotted_feature_set_list(self, compact=False):
14071407
'old_flags': [
14081408
## Known, work in progress
14091409
'no_scheduling',
1410-
1411-
## Known, not a breach of standard
1412-
'no_supported_components_support',
1413-
1414-
## I haven't raised this one with them yet
1415-
]
1410+
],
1411+
## Known, not a breach of standard
1412+
"get-supported-components": {"support": "unsupported"},
14161413
}
14171414

14181415
gmx = {

tests/test_caldav.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1819,7 +1819,6 @@ def testCreateCalendarAndEventFromVobject(self):
18191819
assert len(c.get_events()) == cnt
18201820

18211821
def testGetSupportedComponents(self):
1822-
self.skip_on_compatibility_flag("no_supported_components_support")
18231822
c = self._fixCalendar()
18241823

18251824
components = c.get_supported_components()

0 commit comments

Comments
 (0)