﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
4625	NodeBase metaclass check logic is faulty	(removed)	Adrian Holovaty	"As hinted at on the ml, the NodeBase.__new__ code is a bit faulty-
{{{
    def __new__(cls, name, bases, attrs):
        """"""
        Ensures that either a 'render' or 'render_iter' method is defined on
        any Node sub-class. This avoids potential infinite loops at runtime.
        """"""
        if not (isinstance(attrs.get('render'), types.FunctionType) or
                isinstance(attrs.get('iter_render'), types.FunctionType)):
            raise TypeError('Unable to create Node subclass without either ""render"" or ""iter_render"" method.')
        return type.__new__(cls, name, bases, attrs)
}}}

Failings:
1) for code that has already broken the iter_render/render cycle, each derivative *still* has to assign a render/iter_render else it'll invalidly explode
2) no way to disable it (intermediate direct descendants from Node, say, adding helper functionality- they expect render/iter_render to be overriden, but the rules don't apply to them).

Attached is a patch that converts the check over to verifying the resultant (as in, full MRO) render/iter_render, and adds an option to specifically disable the verification where needed."		closed	Template system	dev		fixed			Unreviewed	1	0	0	0	0	0
