You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to RFC 5545, every VCAL needs a PRODID and VERSION. If those are not explicitly added, Calendar.to_ical() produces non-conforming output because they are missing.
It could be a deliberate design choice to leave this open. But I wonder, how often do people want to generate invalid output, and shouldn't the library enforce a valid calendar object somehow?
Just some suggestions here.
VERSION
As this library claims to be implementing RFC 5545, I think this should just be 2.0 by default. If you add it again with a different value, that's fine, it will be replaced.
PRODID
What about setting this to something like -//python.collective.icalendar//NONSGML python.collective.icalendar.app.event//EN? (I'm not sure how exactly these strings should be constructed, I just wrote something based on a test case I saw in this repo). Same here, if you add it again with a different value, it will be replaced.
Both of above improvements are fully backwards-compatible, AFAIK. Please let me know your thoughts.
The text was updated successfully, but these errors were encountered:
danielschenk
changed the title
Mandatory properties are not enforced
Mandatory properties are not enforced or set to a default
Mar 7, 2024
danielschenk
changed the title
Mandatory properties are not enforced or set to a default
Mandatory properties are neither enforced nor set to a default
Mar 7, 2024
I would think that is is nice to add a few default properties that make the calendar valid. If you like to create a Pull Request, that would be welcome!
According to RFC 5545, every VCAL needs a
PRODID
andVERSION
. If those are not explicitly added,Calendar.to_ical()
produces non-conforming output because they are missing.It could be a deliberate design choice to leave this open. But I wonder, how often do people want to generate invalid output, and shouldn't the library enforce a valid calendar object somehow?
Just some suggestions here.
VERSION
As this library claims to be implementing RFC 5545, I think this should just be
2.0
by default. If you add it again with a different value, that's fine, it will be replaced.PRODID
What about setting this to something like
-//python.collective.icalendar//NONSGML python.collective.icalendar.app.event//EN
? (I'm not sure how exactly these strings should be constructed, I just wrote something based on a test case I saw in this repo). Same here, if you add it again with a different value, it will be replaced.Both of above improvements are fully backwards-compatible, AFAIK. Please let me know your thoughts.
The text was updated successfully, but these errors were encountered: