From: Armin Ronacher Date: Sat, 18 May 2013 10:44:49 +0000 (+0100) Subject: file -> open for 3.x support. This fixes #152 X-Git-Tag: 2.7~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6c0630249c052f953686a7c8e155e5c5b4b075c;p=thirdparty%2Fjinja.git file -> open for 3.x support. This fixes #152 --- diff --git a/jinja2/environment.py b/jinja2/environment.py index d19ae15c..ed597799 100644 --- a/jinja2/environment.py +++ b/jinja2/environment.py @@ -1069,7 +1069,7 @@ class TemplateStream(six.Iterator): """ close = False if isinstance(fp, six.string_types): - fp = file(fp, 'w') + fp = open(fp, 'w') close = True try: if encoding is not None: