File tree Expand file tree Collapse file tree 2 files changed +13
-8
lines changed
Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,8 @@ def create_release_schedule_calendar() -> str:
8181def release_schedule_calendar_lines (
8282 releases : list [tuple [int , ReleaseInfo ]], /
8383) -> list [str ]:
84+ dtstamp = dt .datetime .now (dt .timezone .utc ).strftime ('%Y%m%dT%H%M%SZ' )
85+
8486 lines = [
8587 'BEGIN:VCALENDAR' ,
8688 'VERSION:2.0' ,
@@ -98,9 +100,10 @@ def release_schedule_calendar_lines(
98100 note = ()
99101 lines += (
100102 'BEGIN:VEVENT' ,
101- f'SUMMARY:Python { release .stage } ' ,
102- f'DTSTART;VALUE=DATE:{ release .date .strftime ("%Y%m%d" )} ' ,
103+ f'DTSTAMP:{ dtstamp } ' ,
103104 f'UID:python-{ normalised_stage } @releases.python.org' ,
105+ f'DTSTART;VALUE=DATE:{ release .date .strftime ("%Y%m%d" )} ' ,
106+ f'SUMMARY:Python { release .stage } ' ,
104107 * note ,
105108 f'URL:https://peps.python.org/pep-{ pep_number :04d} /' ,
106109 'END:VEVENT' ,
Original file line number Diff line number Diff line change @@ -37,11 +37,13 @@ def test_create_release_calendar_first_event() -> None:
3737
3838 # Assert
3939 assert cal_lines [5 ] == 'BEGIN:VEVENT'
40- assert cal_lines [6 ] == 'SUMMARY:Python X.Y.Z final'
41- assert cal_lines [7 ] == 'DTSTART;VALUE=DATE:20000101'
42- assert cal_lines [8 ] == 'UID:python-X.Y.Zfinal@releases.python.org'
43- assert cal_lines [9 ] == (
40+ assert cal_lines [6 ].startswith ('DTSTAMP:' )
41+ assert cal_lines [6 ].endswith ('Z' )
42+ assert cal_lines [7 ] == 'UID:python-X.Y.Zfinal@releases.python.org'
43+ assert cal_lines [8 ] == 'DTSTART;VALUE=DATE:20000101'
44+ assert cal_lines [9 ] == 'SUMMARY:Python X.Y.Z final'
45+ assert cal_lines [10 ] == (
4446 'DESCRIPTION:Note: These characters need escaping: \\ \\ \\ , \\ ; \\ n'
4547 )
46- assert cal_lines [10 ] == 'URL:https://peps.python.org/pep-9999/'
47- assert cal_lines [11 ] == 'END:VEVENT'
48+ assert cal_lines [11 ] == 'URL:https://peps.python.org/pep-9999/'
49+ assert cal_lines [12 ] == 'END:VEVENT'
You can’t perform that action at this time.
0 commit comments