Skip to content

Commit 34a1f1c

Browse files
iamleotWhyNotHugo
authored andcommitted
Force usage of pytz
For timezone functionalities icalendar can use both pytz and zoneinfo, preferring zoneinfo. We rely on pytz for several attributes, stick to it. Fixes pimutils#1361. Should obsolete pimutils#1363.
1 parent 50246d2 commit 34a1f1c

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

CHANGELOG.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ Package maintainers and users who have to manually update their installation
77
may want to subscribe to `GitHub's tag feed
88
<https://github.com/geier/khal/tags.atom>`_.
99

10+
0.13.0
11+
======
12+
unreleased
13+
* UPDATED REQUIREMENT icalendar is now required >= 6.0.0
14+
1015
0.12.0
1116
======
1217
2025-04-14

khal/icalendar.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@
3737

3838
logger = logging.getLogger('khal')
3939

40+
# Force use of pytz because we rely on functionalities not available in
41+
# zoneinfo.
42+
icalendar.use_pytz()
43+
4044

4145
def split_ics(ics: str, random_uid: bool=False, default_timezone=None) -> list:
4246
"""split an ics string into several according to VEVENT's UIDs

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ requires-python = ">=3.9,<3.14"
2727
dependencies = [
2828
"click>=3.2",
2929
"click_log>=0.2.0",
30-
"icalendar>=4.0.3,<6.0.0",
30+
"icalendar>=6.0.0",
3131
"urwid>=2.6.15",
3232
"pyxdg",
3333
"pytz",

0 commit comments

Comments
 (0)