From ea1329948cf4412eff4494f18d91263d9f65de79 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Mon, 9 Feb 2026 13:48:45 -0800 Subject: [PATCH] Remove all usage of `url` field It's part of the standard, but calendar software tends to ignore it, preferring the `location` field. --- example/test_calendar.yaml | 2 +- tests/test_calendar.py | 2 +- tests/test_events.py | 10 +++------- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/example/test_calendar.yaml b/example/test_calendar.yaml index d54824d..07817af 100644 --- a/example/test_calendar.yaml +++ b/example/test_calendar.yaml @@ -50,7 +50,7 @@ events: # All-day event - summary: Earth Day begin: 2021-04-22 - url: https://earthday.org + location: https://earthday.org repeat: interval: # seconds, minutes, hours, days, weeks, months, years diff --git a/tests/test_calendar.py b/tests/test_calendar.py index 3d6784b..ee539b7 100644 --- a/tests/test_calendar.py +++ b/tests/test_calendar.py @@ -24,7 +24,7 @@ def test_calendar_event(): events: - summary: Earth Day begin: 2021-04-22 - url: https://earthday.org + location: https://earthday.org location: Earth """ ) diff --git a/tests/test_events.py b/tests/test_events.py index 389c055..89be105 100644 --- a/tests/test_events.py +++ b/tests/test_events.py @@ -11,8 +11,7 @@ def test_basic_structure(): """ summary: Earth Day begin: 2021-04-22 - url: https://earthday.org - location: Earth + location: https://earthday.org """ ) ) @@ -23,8 +22,7 @@ def test_basic_structure(): for line in lines[:-1]: assert line.endswith("\r") assert "SUMMARY:Earth Day" in event_str - assert "URL:https://earthday.org" in event_str - assert "LOCATION:Earth" in event_str + assert "LOCATION:https://earthday.org" in event_str # All events must have a DTSTAMP assert "DTSTAMP" in event_str @@ -35,7 +33,7 @@ def test_all_day_event(): """ summary: Earth Day begin: 2021-04-22 - url: https://earthday.org + location: https://earthday.org """ ) ) @@ -53,7 +51,6 @@ def test_rrule(): """ summary: Earth Day begin: 2021-04-22 - url: https://earthday.org repeat: interval: years: 1 @@ -139,7 +136,6 @@ def test_event_with_custom_ics(): """ summary: Earth Day begin: 2021-04-22 - url: https://earthday.org ics: | RRULE:FREQ=YEARLY;UNTIL=20280422T000000 """