ui: drop values returned by inspect.*frame*() to avoid cycles
"f = inspect.currentframe()" instantly creates a cycle because
"f.f_locals['f']" is "f" itself.
This patch explicitly sets those frame objects to None to avoid cycles.
--- a/mercurial/ui.py Tue Aug 09 16:45:28 2016 +0100
+++ b/mercurial/ui.py Wed Aug 10 15:05:20 2016 +0100
@@ -1175,6 +1175,7 @@
% ((msg,) + calframe[stacklevel][1:4]))
self.log('develwarn', '%s at: %s:%s (%s)\n',
msg, *calframe[stacklevel][1:4])
+ curframe = calframe = None # avoid cycles
def deprecwarn(self, msg, version):
"""issue a deprecation warning