Skip to content

Proposal: Drop dependency on pytz in favor of zoneinfo #8562

Discussion options

You must be logged in to vote

Agreed. Django now uses zoneinfo by default, and backports backports.zoneinfo if the user is not running pyhton 3.9.

pytz support will be dropped in Django 5.0. Django-rest should switch to using zoneinfo by default.

More info from here

Time zone support uses zoneinfo, which is part of the Python standard library from Python 3.9. The backports.zoneinfo package is automatically installed alongside Django if you are using Python 3.8.
Changed in Django 3.2:

zoneinfo was made the default timezone implementation. You may continue to use pytz during the 4.x release cycle via the USE_DEPRECATED_PYTZ setting.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by auvipy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants