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

Transition from pytz to zoneinfo #609

Open
3 tasks
niccokunzmann opened this issue Mar 27, 2024 · 0 comments
Open
3 tasks

Transition from pytz to zoneinfo #609

niccokunzmann opened this issue Mar 27, 2024 · 0 comments
Labels
nlnet Development is funded by NLNet & NGI Zero Core https://nlnet.nl/project/OpenWebCalendar

Comments

@niccokunzmann
Copy link
Member

niccokunzmann commented Mar 27, 2024

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?

See also:

Possibly related:

Code that needs touching:
The Timezone class contains logic to parse and create timezones from icalendar specifications:

class Timezone(Component):

@niccokunzmann niccokunzmann added the nlnet Development is funded by NLNet & NGI Zero Core https://nlnet.nl/project/OpenWebCalendar label Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nlnet Development is funded by NLNet & NGI Zero Core https://nlnet.nl/project/OpenWebCalendar
Projects
None yet
Development

No branches or pull requests

1 participant