python-caldav / caldav

Apache License 2.0
313 stars 91 forks source link

set_related: allow custom types with set_reversed=False #333

Closed Zocker1999NET closed 10 months ago

Zocker1999NET commented 10 months ago

Method failed before when using a custom relation type. Specification explicitly allows custom X-Types for non-standardized use cases. This also makes the library future-proof if futher relation types are added.

Also extract RELTYPE_REVERSER constant from method for good practice.

Tested for my use case (using a custom type) locally.

tobixen commented 10 months ago

Test breakages on 3.7 and 3.8 does not seem to be related to this patch

tobixen commented 10 months ago

Thanks for the contribution. We should also consider RFC 9253 also and extend RELTYPES_REVERSER with the new RELTYPEs.there.

Zocker1999NET commented 10 months ago

Thanks for the fast answer & merge

tobixen commented 9 months ago

@Zocker1999NET, do you by any chance have the time to comment on my related work in #336 ?