Re: [Django] #36712: Deferred type annotations on template tags lead to TypeError with Python 3.14

12 views
Skip to first unread message

Django

unread,
Nov 11, 2025, 9:46:37 AMNov 11
to django-...@googlegroups.com
#36712: Deferred type annotations on template tags lead to TypeError with Python
3.14
-------------------------------------+-------------------------------------
Reporter: Patrick Rauscher | Owner: Augusto
| Pontes
Type: Bug | Status: assigned
Component: Template system | Version: 5.2
Severity: Release blocker | Resolution:
Keywords: typing, inspect, | Triage Stage: Accepted
deferred annotations |
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Augusto Pontes):

Replying to [comment:7 Simon Charette]:
> Just renamed the ticket to avoid "deferred annotation" ambiguity with
ORM language.

Ok, thanks
--
Ticket URL: <https://code.djangoproject.com/ticket/36712#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Nov 20, 2025, 6:14:48 PM (12 days ago) Nov 20
to django-...@googlegroups.com
#36712: Deferred type annotations on template tags lead to TypeError with Python
3.14
-------------------------------------+-------------------------------------
Reporter: Patrick Rauscher | Owner: Jacob
| Walls
Type: Bug | Status: assigned
Component: Template system | Version: 5.2
Severity: Release blocker | Resolution:
Keywords: typing, inspect, | Triage Stage: Accepted
deferred annotations |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* has_patch: 1 => 0
* needs_tests: 1 => 0
* owner: Augusto Pontes => Jacob Walls

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

Django

unread,
Nov 29, 2025, 7:13:38 PM (3 days ago) Nov 29
to django-...@googlegroups.com
#36712: Deferred type annotations on template tags lead to TypeError with Python
3.14
-------------------------------------+-------------------------------------
Reporter: Patrick Rauscher | Owner: Jacob
| Walls
Type: Bug | Status: assigned
Component: Template system | Version: 5.2
Severity: Release blocker | Resolution:
Keywords: typing, inspect, | Triage Stage: Accepted
deferred annotations |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* has_patch: 0 => 1

Comment:

[https://github.com/django/django/pull/20340 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/36712#comment:10>

Django

unread,
Dec 1, 2025, 8:48:38 PM (2 days ago) Dec 1
to django-...@googlegroups.com
#36712: Deferred type annotations on template tags lead to TypeError with Python
3.14
-------------------------------------+-------------------------------------
Reporter: Patrick Rauscher | Owner: Jacob
| Walls
Type: Bug | Status: assigned
Component: Template system | Version: 5.2
Severity: Release blocker | Resolution:
Keywords: typing, inspect, | Triage Stage: Ready for
deferred annotations | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* stage: Accepted => Ready for checkin

Comment:

Natalia approved on github and asked me to merge, marking RFC
--
Ticket URL: <https://code.djangoproject.com/ticket/36712#comment:11>

Django

unread,
Dec 1, 2025, 8:49:04 PM (2 days ago) Dec 1
to django-...@googlegroups.com
#36712: Deferred type annotations on template tags lead to TypeError with Python
3.14
-------------------------------------+-------------------------------------
Reporter: Patrick Rauscher | Owner: Jacob
| Walls
Type: Bug | Status: closed
Component: Template system | Version: 5.2
Severity: Release blocker | Resolution: fixed
Keywords: typing, inspect, | Triage Stage: Ready for
deferred annotations | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls <jacobtylerwalls@…>):

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

Comment:

In [changeset:"34186e731ca20a2344b1f88fd543a854d6b13a00" 34186e73]:
{{{#!CommitTicketReference repository=""
revision="34186e731ca20a2344b1f88fd543a854d6b13a00"
Fixed #36712 -- Evaluated type annotations lazily in template tag
registration.

Ideally, this will be reverted when an upstream solution is available for
https://github.com/python/cpython/issues/141560.

Thanks Patrick Rauscher for the report and Augusto Pontes for the
first iteration and test.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36712#comment:12>

Django

unread,
Dec 1, 2025, 8:50:13 PM (2 days ago) Dec 1
to django-...@googlegroups.com
#36712: Deferred type annotations on template tags lead to TypeError with Python
3.14
-------------------------------------+-------------------------------------
Reporter: Patrick Rauscher | Owner: Jacob
| Walls
Type: Bug | Status: closed
Component: Template system | Version: 5.2
Severity: Release blocker | Resolution: fixed
Keywords: typing, inspect, | Triage Stage: Ready for
deferred annotations | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Jacob Walls <jacobtylerwalls@…>):

In [changeset:"ec7327453d266d31a00060aeb5b9f19e5adfb0a4" ec732745]:
{{{#!CommitTicketReference repository=""
revision="ec7327453d266d31a00060aeb5b9f19e5adfb0a4"
[6.0.x] Fixed #36712 -- Evaluated type annotations lazily in template tag
registration.

Ideally, this will be reverted when an upstream solution is available for
https://github.com/python/cpython/issues/141560.

Thanks Patrick Rauscher for the report and Augusto Pontes for the
first iteration and test.

Backport of 34186e731ca20a2344b1f88fd543a854d6b13a00 from main.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36712#comment:13>

Django

unread,
Dec 1, 2025, 8:52:51 PM (2 days ago) Dec 1
to django-...@googlegroups.com
#36712: Deferred type annotations on template tags lead to TypeError with Python
3.14
-------------------------------------+-------------------------------------
Reporter: Patrick Rauscher | Owner: Jacob
| Walls
Type: Bug | Status: closed
Component: Template system | Version: 5.2
Severity: Release blocker | Resolution: fixed
Keywords: typing, inspect, | Triage Stage: Ready for
deferred annotations | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Jacob Walls <jacobtylerwalls@…>):

In [changeset:"da1dfe64c821ba03ca7b0c936184cca1ad641316" da1dfe64]:
{{{#!CommitTicketReference repository=""
revision="da1dfe64c821ba03ca7b0c936184cca1ad641316"
[5.2.x] Fixed #36712 -- Evaluated type annotations lazily in template tag
registration.

Ideally, this will be reverted when an upstream solution is available for
https://github.com/python/cpython/issues/141560.

Thanks Patrick Rauscher for the report and Augusto Pontes for the
first iteration and test.

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