[Django] #32365: Update timezone implementation to use zoneinfo

48 views
Skip to first unread message

Django

unread,
Jan 19, 2021, 5:13:29 AM1/19/21
to django-...@googlegroups.com
#32365: Update timezone implementation to use zoneinfo
------------------------------------------+------------------------
Reporter: Carlton Gibson | Owner: nobody
Type: New feature | Status: new
Component: Utilities | Version: 3.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------+------------------------
Python 3.9 introduced `zoneinfo` timezone objects, with backports
available to Python 3.6.

As [https://groups.google.com/g/django-developers/c/PtIyadoC-fI per
discussion on mailing list] we will adopt `zoneinfo` in Django 4.0, using
a `pytz` compatibility shim for those who need it until Django 5.0.

In addition, as per [https://groups.google.com/g/django-
developers/c/cXIyCcjMOds/m/L1H2hlHpCgAJ follow-up discussion], we will
make it possible to use `zoneinfo` objects from Django 3.2, leaving any
handling of DST changes to early-adopter user code. (`make_aware()`'s
`is_dst` likely to be deprecated in Django 4.0 — see follow-up discussion
and [https://github.com/django/django/pull/13877#issuecomment-758769902
comment on initial PR].)

--
Ticket URL: <https://code.djangoproject.com/ticket/32365>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 19, 2021, 5:19:27 AM1/19/21
to django-...@googlegroups.com
#32365: Update timezone implementation to use zoneinfo
--------------------------------+--------------------------------------

Reporter: Carlton Gibson | Owner: nobody
Type: New feature | Status: new
Component: Utilities | Version: 3.1
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+--------------------------------------

Comment (by Carlton Gibson):

[https://github.com/django/django/pull/13877 Initial PR for Django 3.2]

--
Ticket URL: <https://code.djangoproject.com/ticket/32365#comment:1>

Django

unread,
Jan 19, 2021, 5:33:58 AM1/19/21
to django-...@googlegroups.com
#32365: Update timezone implementation to use zoneinfo
--------------------------------+------------------------------------

Reporter: Carlton Gibson | Owner: nobody
Type: New feature | Status: new
Component: Utilities | Version: 3.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/32365#comment:2>

Django

unread,
Jan 19, 2021, 5:59:48 AM1/19/21
to django-...@googlegroups.com
#32365: Update timezone implementation to use zoneinfo
--------------------------------+------------------------------------

Reporter: Carlton Gibson | Owner: nobody
Type: New feature | Status: new
Component: Utilities | Version: 3.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+------------------------------------

Comment (by Carlton Gibson <carlton@…>):

In [changeset:"10d126198434810529e0220b0c6896ed64ca0e88" 10d12619]:
{{{
#!CommitTicketReference repository=""
revision="10d126198434810529e0220b0c6896ed64ca0e88"
Refs #32365 -- Allowed use of non-pytz timezone implementations.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32365#comment:3>

Django

unread,
Jan 19, 2021, 6:01:30 AM1/19/21
to django-...@googlegroups.com
#32365: Update timezone implementation to use zoneinfo
--------------------------------+------------------------------------

Reporter: Carlton Gibson | Owner: nobody
Type: New feature | Status: new
Component: Utilities | Version: 3.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+------------------------------------

Comment (by Carlton Gibson <carlton.gibson@…>):

In [changeset:"a5d70cca12aaa1067871eb4e67ab2ed088d1edd6" a5d70cca]:
{{{
#!CommitTicketReference repository=""
revision="a5d70cca12aaa1067871eb4e67ab2ed088d1edd6"
[3.2.x] Refs #32365 -- Allowed use of non-pytz timezone implementations.

Backport of 10d126198434810529e0220b0c6896ed64ca0e88 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32365#comment:4>

Django

unread,
Sep 16, 2021, 5:55:08 AM9/16/21
to django-...@googlegroups.com
#32365: Update timezone implementation to use zoneinfo
-------------------------------------+-------------------------------------
Reporter: Carlton Gibson | Owner: Carlton
| Gibson
Type: New feature | Status: assigned
Component: Utilities | Version: 3.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* owner: nobody => Carlton Gibson
* status: new => assigned
* has_patch: 0 => 1
* stage: Accepted => Ready for checkin


Comment:

[https://github.com/django/django/pull/14848 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/32365#comment:5>

Django

unread,
Sep 16, 2021, 7:04:06 AM9/16/21
to django-...@googlegroups.com
#32365: Update timezone implementation to use zoneinfo
-------------------------------------+-------------------------------------
Reporter: Carlton Gibson | Owner: Carlton
| Gibson
Type: New feature | Status: closed
Component: Utilities | Version: 3.1
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* status: assigned => closed
* resolution: => fixed


Comment:

In 306607d5b99b6eca6ae2c1e726d8eb32b9b2ca1b:

Fixed #32365 -- Made zoneinfo the default timezone implementation.

Thanks to Adam Johnson, Aymeric Augustin, David Smith, Mariusz Felisiak,
Nick
Pope, and Paul Ganssle for reviews.

--
Ticket URL: <https://code.djangoproject.com/ticket/32365#comment:6>

Django

unread,
Mar 23, 2022, 9:33:28 AM3/23/22
to django-...@googlegroups.com
#32365: Update timezone implementation to use zoneinfo
-------------------------------------+-------------------------------------
Reporter: Carlton Gibson | Owner: Carlton
| Gibson
Type: New feature | Status: closed
Component: Utilities | Version: 3.1

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Carlton Gibson <carlton.gibson@…>):

In [changeset:"d46e158ee21cb067a65d44699e6dce00b3dab8e3" d46e158]:
{{{
#!CommitTicketReference repository=""
revision="d46e158ee21cb067a65d44699e6dce00b3dab8e3"
Refs #32365 -- Made migration writer use datetime.timezone.utc.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32365#comment:7>

Django

unread,
Mar 24, 2022, 2:09:29 AM3/24/22
to django-...@googlegroups.com
#32365: Update timezone implementation to use zoneinfo
-------------------------------------+-------------------------------------
Reporter: Carlton Gibson | Owner: Carlton
| Gibson
Type: New feature | Status: closed
Component: Utilities | Version: 3.1

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"bb61f0186d5c490caa44f3e3672d81e14414d33c" bb61f018]:
{{{
#!CommitTicketReference repository=""
revision="bb61f0186d5c490caa44f3e3672d81e14414d33c"
Refs #32365 -- Removed internal uses of utils.timezone.utc alias.

Remaining test case ensures that uses of the alias are mapped
canonically by the migration writer.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32365#comment:8>

Django

unread,
Mar 29, 2022, 8:48:05 AM3/29/22
to django-...@googlegroups.com
#32365: Update timezone implementation to use zoneinfo
-------------------------------------+-------------------------------------
Reporter: Carlton Gibson | Owner: Carlton
| Gibson
Type: New feature | Status: closed
Component: Utilities | Version: 3.1

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Carlton Gibson <carlton@…>):

In [changeset:"59ab3fd0e9e606d7f0f7ca26609c06ee679ece97" 59ab3fd0]:
{{{
#!CommitTicketReference repository=""
revision="59ab3fd0e9e606d7f0f7ca26609c06ee679ece97"
Refs #32365 -- Deprecated django.utils.timezone.utc.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32365#comment:9>

Django

unread,
Jan 17, 2023, 5:49:43 AM1/17/23
to django-...@googlegroups.com
#32365: Update timezone implementation to use zoneinfo
-------------------------------------+-------------------------------------
Reporter: Carlton Gibson | Owner: Carlton
| Gibson
Type: New feature | Status: closed
Component: Utilities | Version: 3.1

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"2fad1632571af551d6065d7eced93ffe93a8a945" 2fad163]:
{{{
#!CommitTicketReference repository=""
revision="2fad1632571af551d6065d7eced93ffe93a8a945"
Refs #32365 -- Removed is_dst argument for various methods and functions.

Per deprecation timeline.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32365#comment:11>

Django

unread,
Jan 17, 2023, 5:49:44 AM1/17/23
to django-...@googlegroups.com
#32365: Update timezone implementation to use zoneinfo
-------------------------------------+-------------------------------------
Reporter: Carlton Gibson | Owner: Carlton
| Gibson
Type: New feature | Status: closed
Component: Utilities | Version: 3.1

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"e6f82438d4e3750e8d299bfd79dac98eebe9f1e0" e6f8243]:
{{{
#!CommitTicketReference repository=""
revision="e6f82438d4e3750e8d299bfd79dac98eebe9f1e0"
Refs #32365 -- Removed support for pytz timezones per deprecation
timeline.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32365#comment:10>

Django

unread,
Jan 17, 2023, 5:49:45 AM1/17/23
to django-...@googlegroups.com
#32365: Update timezone implementation to use zoneinfo
-------------------------------------+-------------------------------------
Reporter: Carlton Gibson | Owner: Carlton
| Gibson
Type: New feature | Status: closed
Component: Utilities | Version: 3.1

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"d6816bff73b37af05c968c009419c7c608e37307" d6816bff]:
{{{
#!CommitTicketReference repository=""
revision="d6816bff73b37af05c968c009419c7c608e37307"
Refs #32365 -- Removed django.utils.timezone.utc per deprecation timeline.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32365#comment:12>

Django

unread,
Nov 11, 2024, 6:24:32 AM11/11/24
to django-...@googlegroups.com
#32365: Update timezone implementation to use zoneinfo
-------------------------------------+-------------------------------------
Reporter: Carlton Gibson | Owner: Carlton
| Gibson
Type: New feature | Status: closed
Component: Utilities | Version: 3.1
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Sarah Boyce <42296566+sarahboyce@…>):

In [changeset:"46eb256ccedcac6b1f6bc957461506d881d468fb" 46eb256]:
{{{#!CommitTicketReference repository=""
revision="46eb256ccedcac6b1f6bc957461506d881d468fb"
Refs #32365 -- Removed pytz from list of test dependencies in unit test
docs.

Follow up to e6f82438d4e3750e8d299bfd79dac98eebe9f1e0.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32365#comment:13>

Django

unread,
Nov 11, 2024, 6:26:18 AM11/11/24
to django-...@googlegroups.com
#32365: Update timezone implementation to use zoneinfo
-------------------------------------+-------------------------------------
Reporter: Carlton Gibson | Owner: Carlton
| Gibson
Type: New feature | Status: closed
Component: Utilities | Version: 3.1
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Sarah Boyce <42296566+sarahboyce@…>):

In [changeset:"6f32087a09f34cffdd77ad7de6b7fc2c9e59712b" 6f32087]:
{{{#!CommitTicketReference repository=""
revision="6f32087a09f34cffdd77ad7de6b7fc2c9e59712b"
[5.1.x] Refs #32365 -- Removed pytz from list of test dependencies in unit
test docs.

Follow up to e6f82438d4e3750e8d299bfd79dac98eebe9f1e0.

Backport of 46eb256ccedcac6b1f6bc957461506d881d468fb from main.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32365#comment:14>
Reply all
Reply to author
Forward
0 new messages