Propably delaying release for better python 3 support. Started working on
that.

--HG--
branch : trunk
diff --git a/jinja2/_ipysupport.py b/jinja2/_ipysupport.py
deleted file mode 100644
index 61b5542..0000000
--- a/jinja2/_ipysupport.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# -*- coding: utf-8 -*-
-"""
-    jinja2._ipysupport
-    ~~~~~~~~~~~~~~~~~~
-
-    IronPython support library.  This library exports functionality from
-    the CLR to Python that is normally available in the standard library.
-
-    :copyright: (c) 2010 by the Jinja Team.
-    :license: BSD.
-"""
-from System import DateTime
-from System.IO import Path, File, FileInfo
-
-
-epoch = DateTime(1970, 1, 1)
-
-
-class _PathModule(object):
-    """A minimal path module."""
-
-    sep = str(Path.DirectorySeparatorChar)
-    altsep = str(Path.AltDirectorySeparatorChar)
-    pardir = '..'
-
-    def join(self, path, *args):
-        args = list(args[::-1])
-        while args:
-            path = Path.Combine(path, args.pop())
-        return path
-
-    def isfile(self, filename):
-        return File.Exists(filename)
-
-    def getmtime(self, filename):
-        info = FileInfo(filename)
-        return int((info.LastAccessTimeUtc - epoch).TotalSeconds)
-
-
-path = _PathModule()
diff --git a/jinja2/bccache.py b/jinja2/bccache.py
index 93e1041..1e2236c 100644
--- a/jinja2/bccache.py
+++ b/jinja2/bccache.py
@@ -108,12 +108,12 @@
             def load_bytecode(self, bucket):
                 filename = path.join(self.directory, bucket.key)
                 if path.exists(filename):
-                    with file(filename, 'rb') as f:
+                    with open(filename, 'rb') as f:
                         bucket.load_bytecode(f)
 
             def dump_bytecode(self, bucket):
                 filename = path.join(self.directory, bucket.key)
-                with file(filename, 'wb') as f:
+                with open(filename, 'wb') as f:
                     bucket.write_bytecode(f)
 
     A more advanced version of a filesystem based bytecode cache is part of
@@ -202,7 +202,7 @@
                 f.close()
 
     def dump_bytecode(self, bucket):
-        f = file(self._get_cache_filename(bucket), 'wb')
+        f = open(self._get_cache_filename(bucket), 'wb')
         try:
             bucket.write_bytecode(f)
         finally:
diff --git a/jinja2/environment.py b/jinja2/environment.py
index 9ee3fb7..cda6171 100644
--- a/jinja2/environment.py
+++ b/jinja2/environment.py
@@ -808,8 +808,11 @@
         self.__dict__.update(context.get_exported())
         self.__name__ = template.name
 
-    __unicode__ = lambda x: concat(x._body_stream)
-    __html__ = lambda x: Markup(concat(x._body_stream))
+    def __unicode__(self):
+        return concat(self._body_stream)
+
+    def __html__(self):
+        return Markup(concat(self._body_stream))
 
     def __str__(self):
         return unicode(self).encode('utf-8')
diff --git a/jinja2/runtime.py b/jinja2/runtime.py
index 0064cd0..ae394e3 100644
--- a/jinja2/runtime.py
+++ b/jinja2/runtime.py
@@ -517,8 +517,8 @@
     UndefinedError: 'foo' is undefined
     """
     __slots__ = ()
-    __iter__ = __unicode__ = __len__ = __nonzero__ = __eq__ = __ne__ = \
-        Undefined._fail_with_undefined_error
+    __iter__ = __unicode__ = __str__ = __len__ = __nonzero__ = __eq__ = \
+        __ne__ = Undefined._fail_with_undefined_error
 
 
 # remove remaining slots attributes, after the metaclass did the magic they
diff --git a/jinja2/utils.py b/jinja2/utils.py
index d0e83df..f43743c 100644
--- a/jinja2/utils.py
+++ b/jinja2/utils.py
@@ -198,7 +198,7 @@
             raise
 
 
-def open_if_exists(filename, mode='r'):
+def open_if_exists(filename, mode='rb'):
     """Returns a file descriptor for the filename if that file exists,
     otherwise `None`.
     """