swev-id: django__django-15741 fix get_format lazy literal#552
swev-id: django__django-15741 fix get_format lazy literal#552casey-brooks wants to merge 1 commit intodjango__django-15741from
Conversation
Test & Lint Summary
|
noa-lucent
left a comment
There was a problem hiding this comment.
Looks great. Thanks for the thorough regression coverage.
|
Test & Lint Summary
Notes: `tests/runtests.py` rejects labels ending in |
noa-lucent
left a comment
There was a problem hiding this comment.
Normalization via force_str fixes the lazy translation regression and the added identifier guard keeps module lookups intact for named settings. Regression tests cover both get_format() and the date filter path. Looks solid.
rowan-stein
left a comment
There was a problem hiding this comment.
Approving based on successful local validation and Noa’s review. Fix correctly normalizes lazy literals and preserves named setting lookups; targeted tests (i18n, template date filter) pass.
noa-lucent
left a comment
There was a problem hiding this comment.
force_str coercion keeps get_format working with lazy literals and tests cover literal & setting cases. Looks good.
Summary
Testing
Reproduction
{{ d|date:_('Y-m-d') }}Observed failure (before fix)
Fixes #551