changeset 317:efa7870b63cb trunk

Update change log, and some minor tweaks to keyword argument ordering for the new `encoding` parameter.
author cmlenz
date Tue, 24 Oct 2006 16:10:09 +0000
parents a946edefac40
children bab19496d4fa
files ChangeLog genshi/template.py
diffstat 2 files changed, 18 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,19 @@
    associated choose directive does have one. In that case, the when branch is
    followed if the expression of the choose directive evaluates to a truth
    value.
+ * Unsuccessful attribute or item lookups now return `Undefined` objects for
+   nicer error messages.
+
+
+Version 0.3.4
+http://svn.edgewall.org/repos/genshi/tags/0.3.4/
+(?, from branches/stable/0.3.x)
+
+ * The encoding of HTML and XML files, as well as markup and text templates,
+   can now be specified. Also, the encoding specified in XML declarations is
+   now respected unless an expiclit encoding is requested.
+ * Expressions used as arguments for `py:with`, `py:def`, and `py:for`
+   directives can now contain non-ASCII strings.
 
 
 Version 0.3.3
--- a/genshi/template.py
+++ b/genshi/template.py
@@ -1288,8 +1288,8 @@
     
     >>> os.remove(path)
     """
-    def __init__(self, search_path=None, auto_reload=False, max_cache_size=25,
-                 default_encoding=None):
+    def __init__(self, search_path=None, auto_reload=False,
+                 default_encoding=None, max_cache_size=25):
         """Create the template laoder.
         
         @param search_path: a list of absolute path names that should be
@@ -1297,10 +1297,10 @@
             absolute path
         @param auto_reload: whether to check the last modification time of
             template files, and reload them if they have changed
+        @param default_encoding: the default encoding to assume when loading
+            templates; defaults to UTF-8
         @param max_cache_size: the maximum number of templates to keep in the
             cache
-        @param default_encoding: the default encoding to assume when loading
-            templates; defaults to UTF-8
         """
         self.search_path = search_path
         if self.search_path is None:
@@ -1393,7 +1393,7 @@
                             filename = os.path.join(dirname, filename)
                             dirname = ''
                         tmpl = cls(fileobj, basedir=dirname, filename=filename,
-                                   encoding=encoding, loader=self)
+                                   loader=self, encoding=encoding)
                     finally:
                         fileobj.close()
                     self._cache[filename] = tmpl
Copyright (C) 2012-2017 Edgewall Software