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

RFE: use zoneinfo instead of pytz #240

Open
kloczek opened this issue May 30, 2024 · 3 comments
Open

RFE: use zoneinfo instead of pytz #240

kloczek opened this issue May 30, 2024 · 3 comments

Comments

@kloczek
Copy link

kloczek commented May 30, 2024

Switch to standard zoneinfo module.
Below may help pydantic/pydantic-core@fd262933

[tkloczko@pers-jacek flask-babel-4.0.0]$ grep -r pytz
README.md:[babel][] and [pytz][] modules.
README.md:[pytz]: https://pypi.python.org/pypi/pytz/
docs/index.rst:any Flask application with the help of `babel`_, `pytz`_ and its own copy of
docs/index.rst:.. _pytz: https://pythonhosted.org/pytz/
flask_babel/__init__.py:from pytz import timezone, UTC
flask_babel/__init__.py:        `pytz.timezone` object.
flask_babel/__init__.py:    a `pytz.timezone` object.  This returns `None` if used outside a request.
pyproject.toml:pytz = ">=2022.7"
@TkTech
Copy link
Contributor

TkTech commented Jun 19, 2024

zoneinfo is only available in Python 3.9+ and we currently support versions before that. When 3.8 hits EOL in 2024-10, we'll switch.

@kloczek
Copy link
Author

kloczek commented Jun 19, 2024

All what you wrote is 100% accurate.
In dropped in RFE commit you have example how to handle that.

@andreymal
Copy link

There is backports.zoneinfo (and Django 4.2 uses it, for example)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants