Skip to content
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

Adjust for and require icalendar>=6.0.0 #1364

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ Julian Wollrath
Mattori Birnbaum - me [at] mattori [dot] com - https://mattori.com
Pi R
Alnoman Kamil - noman [at] kamil [dot] gr - https://kamil.gr
Leonardo Taccari - iamleot [at] gmail [dot] com
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ not released yet
* NEW support for color theme, command, and formatter plugins
* FIX an issue where ikhal would forget changes to time or date fields if you
left the field with page up/down or meta+enter
* UPDATED REQUIREMENT icalendar is now required >= 6.0.0

0.11.3
======
Expand Down
8 changes: 6 additions & 2 deletions khal/icalendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@

logger = logging.getLogger('khal')

# Force use of pytz because we rely on functionalities not available in
# zoneinfo.
icalendar.use_pytz()


def split_ics(ics: str, random_uid: bool=False, default_timezone=None) -> List:
"""split an ics string into several according to VEVENT's UIDs
Expand All @@ -55,8 +59,8 @@ def split_ics(ics: str, random_uid: bool=False, default_timezone=None) -> List:
# Standard Time' for 'Pacific/Auckland' in Olson format), we convert any
# Windows format timezones to Olson.
if item.name == 'VTIMEZONE':
if item['TZID'] in icalendar.windows_to_olson.WINDOWS_TO_OLSON:
key = icalendar.windows_to_olson.WINDOWS_TO_OLSON[item['TZID']]
if item['TZID'] in icalendar.timezone.windows_to_olson.WINDOWS_TO_OLSON:
key = icalendar.timezone.windows_to_olson.WINDOWS_TO_OLSON[item['TZID']]
else:
key = item['TZID']
tzs[key] = item
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ requires-python = ">=3.8,<3.13"
dependencies = [
"click>=3.2",
"click_log>=0.2.0",
"icalendar>=4.0.3",
"icalendar>=6.0.0",
"urwid>=2.6.15",
"pyxdg",
"pytz",
Expand Down
Loading