templatefilters: drop callable support from json()
This backs out
ae5447de4c11. A callable should be evaluated beforehand
by templater.runsymbol().
--- a/mercurial/templatefilters.py Wed Mar 29 21:43:38 2017 +0900
+++ b/mercurial/templatefilters.py Sun Apr 02 11:46:49 2017 +0900
@@ -236,8 +236,6 @@
for i in obj:
out.append(json(i))
return '[' + ', '.join(out) + ']'
- elif util.safehasattr(obj, '__call__'):
- return json(obj())
else:
raise TypeError('cannot encode type %s' % obj.__class__.__name__)