[Grok-dev] templating branch merged, comments

Martijn Faassen faassen at startifact.com
Wed Nov 7 14:09:03 EST 2007


Hi there,

Thanks Lennart for merging the templating branch!

I do have some comments though: when running the functional tests I see 
the following coming by a couple of times:

./home/faassen/tmp/grok/src/grok/components.py:155: DeprecationWarning: 
Calling macros directly on the view is deprecated. Please use 
view/@@viewname/macros/macroname
View <grok.ftests.view.macros.Layout object at 0x9b5a74c>, macro main
   DeprecationWarning)
/home/faassen/tmp/grok/src/grok/components.py:155: DeprecationWarning: 
Calling macros directly on the view is deprecated. Please use 
view/@@viewname/macros/macroname
View <grok.ftests.view.macros.Grilled object at 0x9b8aa8c>, macro spices
   DeprecationWarning)

While it's good we have deprecation warnings, I don't think Grok should 
be getting deprecation warnings while the tests are running. Is there a 
reason you didn't fix the code that's causing this?

Some comment about the message itself: why is it 
view/@@viewname/macros/macroname in the warnings? I'd expect to see 
context/@@viewname/macros/macroname more typically.

I also think we need actual tests for this. I believe 
dirtemplatesonly.py in grok/tests/view has some code that checks for 
deprecation warnings.

Finally, I'm getting a warning for the test in 
grok.ftests.admin.macros.ExternalView. The code however reads:

metal:use-macro="context/@@grokadminmacros/macros/gaia-page"

I don't understand why this should be causing a deprecation warning at 
all, as macros is used explicitly.

Regards,

Martijn



More information about the Grok-dev mailing list