It's now possible to create weak references to template contexts.
authorArmin Ronacher <armin.ronacher@active-4.com>
Thu, 18 Sep 2008 16:38:58 +0000 (18:38 +0200)
committerArmin Ronacher <armin.ronacher@active-4.com>
Thu, 18 Sep 2008 16:38:58 +0000 (18:38 +0200)
--HG--
branch : trunk

CHANGES
jinja2/runtime.py

diff --git a/CHANGES b/CHANGES
index 775b7097b8e6661d2e830d3554c46f124c51df12..3a05bca08fcffb1d1e49cb52e11bc479b5503d75 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -32,6 +32,8 @@ Version 2.1
 
 - implemented a bytecode cache system.  (:ref:`bytecode-cache`)
 
+- the template context is now weakref-able
+
 Version 2.0
 -----------
 (codename jinjavitus, released on July 17th 2008)
index 9b2c3a59e33cfaf17e3d088c7c043541925e7727..bb5d9fdb18160082d6122fe7457c7a6c99d611d5 100644 (file)
@@ -61,7 +61,7 @@ class Context(object):
     :class:`Undefined` object for missing variables.
     """
     __slots__ = ('parent', 'vars', 'environment', 'exported_vars', 'name',
-                 'blocks')
+                 'blocks', '__weakref__')
 
     def __init__(self, environment, parent, name, blocks):
         self.parent = parent