[Django] #33748: django.utils.formats.get_format should allow lazy parameter

2 views
Skip to first unread message

Django

unread,
May 28, 2022, 5:50:20 AM5/28/22
to django-...@googlegroups.com
#33748: django.utils.formats.get_format should allow lazy parameter
------------------------------------------------+------------------------
Reporter: Claude Paroz | Owner: nobody
Type: Bug | Status: new
Component: Internationalization | Version: 4.1
Severity: Release blocker | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
Commit [659d2421c7adb] (fixing #20296) triggered a regression when the
`date` template filter (possibly others are affected too) receives a lazy
string, like in `some_date|date:_('Y-m-d')`.

This fails with: `TypeError: getattr(): attribute name must be string` in
`django.utils.formats.get_format`.

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

Django

unread,
May 28, 2022, 5:53:42 AM5/28/22
to django-...@googlegroups.com
#33748: django.utils.formats.get_format should allow lazy parameter
-------------------------------------+-------------------------------------

Reporter: Claude Paroz | Owner: nobody
Type: Bug | Status: new
Component: | Version: 4.1
Internationalization |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

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

* has_patch: 0 => 1


Comment:

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

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

Django

unread,
May 30, 2022, 2:18:29 AM5/30/22
to django-...@googlegroups.com
#33748: django.utils.formats.get_format should allow lazy parameter
--------------------------------------+------------------------------------

Reporter: Claude Paroz | Owner: nobody
Type: Bug | Status: new
Component: Internationalization | Version: 4.1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted

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

* stage: Unreviewed => Accepted


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

Django

unread,
May 30, 2022, 2:19:23 AM5/30/22
to django-...@googlegroups.com
#33748: django.utils.formats.get_format should allow lazy parameter
-------------------------------------+-------------------------------------
Reporter: Claude Paroz | Owner: Claude
| Paroz
Type: Bug | Status: assigned
Component: | Version: 4.1
Internationalization |

Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* owner: nobody => Claude Paroz
* status: new => assigned


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

Django

unread,
May 31, 2022, 12:11:28 AM5/31/22
to django-...@googlegroups.com
#33748: django.utils.formats.get_format should allow lazy parameter
-------------------------------------+-------------------------------------
Reporter: Claude Paroz | Owner: Claude
| Paroz
Type: Bug | Status: assigned
Component: | Version: 4.1
Internationalization |
Severity: Release blocker | 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):

* stage: Accepted => Ready for checkin


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

Django

unread,
May 31, 2022, 1:04:01 AM5/31/22
to django-...@googlegroups.com
#33748: django.utils.formats.get_format should allow lazy parameter
-------------------------------------+-------------------------------------
Reporter: Claude Paroz | Owner: Claude
| Paroz
Type: Bug | Status: closed
Component: | Version: 4.1
Internationalization |
Severity: Release blocker | 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 <felisiak.mariusz@…>):

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


Comment:

In [changeset:"292f372768836e2aebc713064c5139e8067eebcb" 292f3727]:
{{{
#!CommitTicketReference repository=""
revision="292f372768836e2aebc713064c5139e8067eebcb"
Fixed #33748 -- Fixed date template filter crash with lazy format.

Regression in 659d2421c7adbbcd205604002d521d82d6b0b465.
}}}

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

Django

unread,
May 31, 2022, 1:04:29 AM5/31/22
to django-...@googlegroups.com
#33748: django.utils.formats.get_format should allow lazy parameter
-------------------------------------+-------------------------------------
Reporter: Claude Paroz | Owner: Claude
| Paroz
Type: Bug | Status: closed
Component: | Version: 4.1
Internationalization |
Severity: Release blocker | 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:"000e8e0d38895cb4534ab82d81c18faab77784ad" 000e8e0]:
{{{
#!CommitTicketReference repository=""
revision="000e8e0d38895cb4534ab82d81c18faab77784ad"
[4.1.x] Fixed #33748 -- Fixed date template filter crash with lazy format.

Regression in 659d2421c7adbbcd205604002d521d82d6b0b465.

Backport of 292f372768836e2aebc713064c5139e8067eebcb from main
}}}

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

Reply all
Reply to author
Forward
0 new messages