Repository: pimutils/khal
Pull request #646 (2017-05-04 22:50:06)

Set prodid to khal/icalendar


Patch:
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 4f93fde..ac070ff 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -11,6 +11,8 @@ may want to subscribe to `GitHub's tag feed
 =====
 unreleased
 
+* FIX set PRODID to khal/icalendar
+
 * ADD new entry points recommended for packagers to use.
 
 0.9.5
diff --git a/khal/khalendar/event.py b/khal/khalendar/event.py
index f3b7c37..ff6ee7f 100644
--- a/khal/khalendar/event.py
+++ b/khal/khalendar/event.py
@@ -311,7 +311,9 @@ class Event(object):
         """
         calendar = icalendar.Calendar()
         calendar.add('version', '2.0')
-        calendar.add('prodid', '-//CALENDARSERVER.ORG//NONSGML Version 1//EN')
+        calendar.add(
+            'prodid', '-//PIMUTILS.ORG//NONSGML khal / icalendar //EN'
+        )
         return calendar
 
     @property
diff --git a/khal/utils.py b/khal/utils.py
index 1ce33ed..304c10c 100644
--- a/khal/utils.py
+++ b/khal/utils.py
@@ -632,7 +632,9 @@ def ics_from_list(events, tzs, random_uid=False, default_timezone=None):
     """
     calendar = icalendar.Calendar()
     calendar.add('version', '2.0')
-    calendar.add('prodid', '-//CALENDARSERVER.ORG//NONSGML Version 1//EN')
+    calendar.add(
+        'prodid', '-//PIMUTILS.ORG//NONSGML khal / icalendar //EN'
+    )
 
     if random_uid:
         new_uid = generate_random_uid()


Test patch:
diff --git a/tests/event_test.py b/tests/event_test.py
index 79ff17b..0af5b87 100644
--- a/tests/event_test.py
+++ b/tests/event_test.py
@@ -322,7 +322,7 @@ def test_event_raw_UTC():
     assert event.raw == '\r\n'.join([
         '''BEGIN:VCALENDAR''',
         '''VERSION:2.0''',
-        '''PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN''',
+        '''PRODID:-//PIMUTILS.ORG//NONSGML khal / icalendar //EN''',
         '''BEGIN:VEVENT''',
         '''SUMMARY:An Event''',
         '''DTSTART:20140409T093000Z''',
@@ -471,7 +471,7 @@ def test_create_timezone_static():
         assert normalize_component(event.raw) == normalize_component(
             """BEGIN:VCALENDAR
 VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+PRODID:-//PIMUTILS.ORG//NONSGML khal / icalendar //EN
 BEGIN:VTIMEZONE
 TZID:Etc/GMT+3
 BEGIN:STANDARD
diff --git a/tests/ics/cal_d.ics b/tests/ics/cal_d.ics
index c9b6e0d..2421458 100644
--- a/tests/ics/cal_d.ics
+++ b/tests/ics/cal_d.ics
@@ -1,6 +1,6 @@
 BEGIN:VCALENDAR
 VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+PRODID:-//PIMUTILS.ORG//NONSGML khal / icalendar //EN
 BEGIN:VEVENT
 SUMMARY:An Event
 DTSTART;VALUE=DATE:20140409
diff --git a/tests/ics/cal_dt_two_tz.ics b/tests/ics/cal_dt_two_tz.ics
index 64a2189..7e9a909 100644
--- a/tests/ics/cal_dt_two_tz.ics
+++ b/tests/ics/cal_dt_two_tz.ics
@@ -1,6 +1,6 @@
 BEGIN:VCALENDAR
 VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+PRODID:-//PIMUTILS.ORG//NONSGML khal / icalendar //EN
 BEGIN:VTIMEZONE
 TZID:Europe/Berlin
 BEGIN:STANDARD
diff --git a/tests/ics/cal_lots_of_timezones.ics b/tests/ics/cal_lots_of_timezones.ics
index e175f04..2cbf70d 100644
--- a/tests/ics/cal_lots_of_timezones.ics
+++ b/tests/ics/cal_lots_of_timezones.ics
@@ -1,6 +1,6 @@
 BEGIN:VCALENDAR
 VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+PRODID:-//PIMUTILS.ORG//NONSGML khal / icalendar //EN
 BEGIN:VTIMEZONE
 TZID:IndianReunion
 BEGIN:STANDARD
diff --git a/tests/ics/cal_no_dst.ics b/tests/ics/cal_no_dst.ics
index ce73b8f..d22ada6 100644
--- a/tests/ics/cal_no_dst.ics
+++ b/tests/ics/cal_no_dst.ics
@@ -1,6 +1,6 @@
 BEGIN:VCALENDAR
 VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+PRODID:-//PIMUTILS.ORG//NONSGML khal / icalendar //EN
 BEGIN:VTIMEZONE
 TZID:America/Bogota
 BEGIN:STANDARD
diff --git a/tests/ics/event_dt_local_missing_tz.ics b/tests/ics/event_dt_local_missing_tz.ics
index b51c7ac..217945d 100644
--- a/tests/ics/event_dt_local_missing_tz.ics
+++ b/tests/ics/event_dt_local_missing_tz.ics
@@ -1,6 +1,6 @@
 BEGIN:VCALENDAR
 VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+PRODID:-//PIMUTILS.ORG//NONSGML khal / icalendar //EN
 BEGIN:VEVENT
 SUMMARY:An Event
 DTSTART;TZID=FOO;VALUE=DATE-TIME:20140409T093000
diff --git a/tests/ics/event_dt_london.ics b/tests/ics/event_dt_london.ics
index 9706b5b..bf28af8 100644
--- a/tests/ics/event_dt_london.ics
+++ b/tests/ics/event_dt_london.ics
@@ -1,6 +1,6 @@
 BEGIN:VCALENDAR
 VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+PRODID:-//PIMUTILS.ORG//NONSGML khal / icalendar //EN
 BEGIN:VEVENT
 SUMMARY:An Event
 DTSTART;TZID=Europe/London;VALUE=DATE-TIME:20140409T140000
diff --git a/tests/ics/event_dt_rrule_invalid_until.ics b/tests/ics/event_dt_rrule_invalid_until.ics
index 2e87fa7..6fb1a05 100644
--- a/tests/ics/event_dt_rrule_invalid_until.ics
+++ b/tests/ics/event_dt_rrule_invalid_until.ics
@@ -1,6 +1,6 @@
 BEGIN:VCALENDAR
 VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+PRODID:-//PIMUTILS.ORG//NONSGML khal / icalendar //EN
 BEGIN:VEVENT
 SUMMARY:This event is invalid but should still be supported by khal
 DTSTART;VALUE=DATE:20071201
diff --git a/tests/ics/event_dt_rrule_invalid_until2.ics b/tests/ics/event_dt_rrule_invalid_until2.ics
index 94a9dd6..50fd95c 100644
--- a/tests/ics/event_dt_rrule_invalid_until2.ics
+++ b/tests/ics/event_dt_rrule_invalid_until2.ics
@@ -1,6 +1,6 @@
 BEGIN:VCALENDAR
 VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+PRODID:-//PIMUTILS.ORG//NONSGML khal / icalendar //EN
 BEGIN:VEVENT
 SUMMARY:This event is invalid but should still be supported by khal
 DTSTART;TZID=Europe/Berlin;VALUE=DATE-TIME:20140409T093000
diff --git a/tests/ics/event_dt_simple.ics b/tests/ics/event_dt_simple.ics
index 80358c5..1aa4c78 100644
--- a/tests/ics/event_dt_simple.ics
+++ b/tests/ics/event_dt_simple.ics
@@ -1,6 +1,6 @@
 BEGIN:VCALENDAR
 VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+PRODID:-//PIMUTILS.ORG//NONSGML khal / icalendar //EN
 BEGIN:VEVENT
 SUMMARY:An Event
 DTSTART;TZID=Europe/Berlin;VALUE=DATE-TIME:20140409T093000
diff --git a/tests/ics/event_dt_simple_inkl_vtimezone.ics b/tests/ics/event_dt_simple_inkl_vtimezone.ics
index a6eb931..d81ea52 100644
--- a/tests/ics/event_dt_simple_inkl_vtimezone.ics
+++ b/tests/ics/event_dt_simple_inkl_vtimezone.ics
@@ -1,6 +1,6 @@
 BEGIN:VCALENDAR
 VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+PRODID:-//PIMUTILS.ORG//NONSGML khal / icalendar //EN
 BEGIN:VTIMEZONE
 TZID:Europe/Berlin
 BEGIN:STANDARD
diff --git a/tests/ics/event_dt_simple_nocat.ics b/tests/ics/event_dt_simple_nocat.ics
index 083fa64..9883a48 100644
--- a/tests/ics/event_dt_simple_nocat.ics
+++ b/tests/ics/event_dt_simple_nocat.ics
@@ -1,6 +1,6 @@
 BEGIN:VCALENDAR
 VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+PRODID:-//PIMUTILS.ORG//NONSGML khal / icalendar //EN
 BEGIN:VEVENT
 SUMMARY:A not so simple Event
 DESCRIPTION:Everything has changed
diff --git a/tests/ics/event_dt_simple_updated.ics b/tests/ics/event_dt_simple_updated.ics
index ad771eb..99e5bec 100644
--- a/tests/ics/event_dt_simple_updated.ics
+++ b/tests/ics/event_dt_simple_updated.ics
@@ -1,6 +1,6 @@
 BEGIN:VCALENDAR
 VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+PRODID:-//PIMUTILS.ORG//NONSGML khal / icalendar //EN
 BEGIN:VEVENT
 SUMMARY:A not so simple Event
 DESCRIPTION:Everything has changed
diff --git a/tests/ics/event_dt_simple_zulu.ics b/tests/ics/event_dt_simple_zulu.ics
index a7d184b..7a274d4 100644
--- a/tests/ics/event_dt_simple_zulu.ics
+++ b/tests/ics/event_dt_simple_zulu.ics
@@ -1,6 +1,6 @@
 BEGIN:VCALENDAR
 VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+PRODID:-//PIMUTILS.ORG//NONSGML khal / icalendar //EN
 BEGIN:VEVENT
 SUMMARY:An Event
 DTSTART:20140409T093000Z
diff --git a/tests/ics/event_rrule_recuid.ics b/tests/ics/event_rrule_recuid.ics
index ce400cc..4fd5565 100644
--- a/tests/ics/event_rrule_recuid.ics
+++ b/tests/ics/event_rrule_recuid.ics
@@ -1,6 +1,6 @@
 BEGIN:VCALENDAR
 VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+PRODID:-//PIMUTILS.ORG//NONSGML khal / icalendar //EN
 BEGIN:VEVENT
 UID:event_rrule_recurrence_id
 SUMMARY:Arbeit
diff --git a/tests/ics/event_rrule_recuid_cancelled.ics b/tests/ics/event_rrule_recuid_cancelled.ics
index c01516d..a8ea236 100644
--- a/tests/ics/event_rrule_recuid_cancelled.ics
+++ b/tests/ics/event_rrule_recuid_cancelled.ics
@@ -1,6 +1,6 @@
 BEGIN:VCALENDAR
 VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+PRODID:-//PIMUTILS.ORG//NONSGML khal / icalendar //EN
 BEGIN:VEVENT
 UID:event_rrule_recurrence_id
 SUMMARY:Arbeit
diff --git a/tests/ics/event_rrule_recuid_invalid_tzid.ics b/tests/ics/event_rrule_recuid_invalid_tzid.ics
index 64924bd..da26993 100644
--- a/tests/ics/event_rrule_recuid_invalid_tzid.ics
+++ b/tests/ics/event_rrule_recuid_invalid_tzid.ics
@@ -1,6 +1,6 @@
 BEGIN:VCALENDAR
 VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+PRODID:-//PIMUTILS.ORG//NONSGML khal / icalendar //EN
 BEGIN:VEVENT
 UID:event_rrule_recurrence_id
 SUMMARY:Arbeit
diff --git a/tests/ics/part0.ics b/tests/ics/part0.ics
index b919d48..05cc589 100644
--- a/tests/ics/part0.ics
+++ b/tests/ics/part0.ics
@@ -1,6 +1,6 @@
 BEGIN:VCALENDAR
 VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+PRODID:-//PIMUTILS.ORG//NONSGML khal / icalendar //EN
 BEGIN:VTIMEZONE
 TZID:Europe_London
 BEGIN:DAYLIGHT
diff --git a/tests/ics/part1.ics b/tests/ics/part1.ics
index 1a449b0..0173948 100644
--- a/tests/ics/part1.ics
+++ b/tests/ics/part1.ics
@@ -1,6 +1,6 @@
 BEGIN:VCALENDAR
 VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+PRODID:-//PIMUTILS.ORG//NONSGML khal / icalendar //EN
 BEGIN:VTIMEZONE
 TZID:IndianReunion
 BEGIN:STANDARD