Yuya Nishihara <yuya@tcha.org> [Thu, 15 Mar 2018 20:43:39 +0900] rev 37073
templater: introduce resourcemapper class
A couple more functions will be added later to work around nested mapping
bugs such as the issue 5612.
Yuya Nishihara <yuya@tcha.org> [Thu, 15 Mar 2018 20:27:38 +0900] rev 37072
log: do no expect templateresources() returning a dict
The resources dict will be replaced with new resource mapper object, which
won't implement __getitem__(key). Share the whole resources object with
_graphnodeformater() to make porting easier.
Yuya Nishihara <yuya@tcha.org> [Fri, 16 Mar 2018 23:11:55 +0900] rev 37071
templatekw: mark _showlist() as deprecated (API)
.. api::
``templatekw._showlist()`` is deprecated in favor of
``templateutil._showcompatlist()``, which takes ``context`` in place of
``templ``.
Yuya Nishihara <yuya@tcha.org> [Fri, 16 Mar 2018 23:09:21 +0900] rev 37070
templater: drop 'templ' from resources dict
Partially resolves cycle, templ -> context -> templ. This will make it easier
to replace the resources dict with new immutable resource mapper interface.
Yuya Nishihara <yuya@tcha.org> [Fri, 16 Mar 2018 23:01:51 +0900] rev 37069
templatekw: stop using _showlist() which is about to be deprecated
Use the new context-based API instead.
Yuya Nishihara <yuya@tcha.org> [Fri, 16 Mar 2018 22:47:15 +0900] rev 37068
templater: use template context to render old-style list template
Prepares for dropping the 'templ' resource.
This means old-style list templates are processed by the same engine class
as the one for the list node. I think that's fine since templates for the
same list should be tightly coupled, and I believe the extension point for
the engine classes isn't actually used.
Now templatekw._showlist() is a compatibility wrapper for _showcompatlist(),
and will be deprecated soon. The function is still marked as private since
I plan to change the interface to get rid of closures capturing context and
mapping.