We could accept a patch to remove usage of the legacy syntax in Django 
templates right away (I just merged the same for ifequal/ifnotequal). Does 
removing this improve performance for the affected tags or is the main 
benefit simpler code? I don't see a need for an accelerated deprecation.

On Saturday, August 8, 2015 at 9:00:08 AM UTC-4, Curtis Maloney wrote:
>
> For reference, the old PR is here : 
> https://github.com/django/django/pull/1619/files
>
> Unfortunately, it doesn't rebase cleanly onto master... some very odd 
> stuff shows up... but it wouldn't take much to regenerate this work.
>
> --
> Curtis
>
> On Saturday, 8 August 2015 21:33:22 UTC+10, Curtis Maloney wrote:
>>
>> Long ago, the keyword syntax in Django templates was: 
>>
>>    expr as name 
>>
>> but was changed to look more like Python as: 
>>
>>     name=expr 
>>
>> However, the facility to parse the old syntax is still there, but will 
>> silently fail unless you pass "support_legacy" to token_kwargs. 
>>
>> In fact, it is enabled for "with" and "blocktrans" only. 
>>
>> I'm proposing we deprecate this syntax to help clean up this code path 
>> and have only one way to do it. 
>>
>> This would start with adding a deprecation warning for when 
>> support_legacy=True _and_ we match a "x as y" syntax argument. 
>>
>> After a version [or two?] with this, we can remove the code.  I wrote 
>> a patch for this some moons ago, but it was rejected for having no 
>> deprecation path. 
>>
>> -- 
>> Curtis 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/51c9c862-59b3-488a-8261-a3d4a3da89a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to