You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In EOL of Python 3.8 is 31st October 2024. Then, zoneinfo is the library that is shipped with Python. There are problems using pytz as timezone implementations have evolved. My proposal to solve this issue is the following:
create icalendar.set_default_timezone_implementation(TimeZone) where TimeZone can be pytz.Timezone or zoneinfo.ZoneInfo or others, taking a string like "UTC" or Europe/Berlin.
Allow a switch from zoneinfo to pytz by testing all timezone dependent tests with both implementations
a version 6 release after October will then switch from pytz to zoneinfo by setting another default and removing pytz altogether as a dependency.
What are your thoughts? Who thinks this will break existing code? What is needed for a transition?
In EOL of Python 3.8 is 31st October 2024. Then, zoneinfo is the library that is shipped with Python. There are problems using pytz as timezone implementations have evolved. My proposal to solve this issue is the following:
icalendar.set_default_timezone_implementation(TimeZone)
whereTimeZone
can be pytz.Timezone or zoneinfo.ZoneInfo or others, taking a string like"UTC"
orEurope/Berlin
.What are your thoughts? Who thinks this will break existing code? What is needed for a transition?
See also:
Possibly related:
Code that needs touching:
The Timezone class contains logic to parse and create timezones from icalendar specifications:
icalendar/src/icalendar/cal.py
Line 545 in 2b1cd4e
The text was updated successfully, but these errors were encountered: