-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
Mandatory properties are neither enforced nor set to a default #596
Comments
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! |
I'll gladly do! I will dive into the code as soon as I have time for it. |
@danielschenk I had another thought about it. What we can do with icalendar is ICS -> Python object -> ICS So, what I would propose is a method See also: |
See also: #662 |
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: