Edgewall Software

source: tags/0.5.1/ChangeLog

Last change on this file was 905, checked in by cmlenz, 16 years ago

Ported [904] to 0.5.x branch.

  • Property svn:eol-style set to native
File size: 22.0 KB
Line 
1Version 0.5.1
2http://svn.edgewall.org/repos/genshi/tags/0.5.1/
3(Jul 9 2008, from branches/stable/0.5.x)
4
5 * Fix problem with nested match templates not being applied when buffering
6   on the outer `py:match` is disabled. Thanks to Erik Bray for reporting the
7   problem and providing a test case!
8 * Fix problem in `Translator` filter that would cause the translation of
9   text nodes to fail if the translation function returned an object that was
10   not directly a string, but rather something like an instance of the
11   `LazyProxy` class in Babel (ticket #145).
12 * Fix problem with match templates incorrectly being applied multiple times.
13 * Includes from templates loaded via an absolute path now include the correct
14   file in nested directories as long if no search path has been configured
15   (ticket #240).
16 * Unbuffered match templates could result in parts of the matched content
17   being included in the output if the match template didn't actually consume
18   it via one or more calls to the `select()` function (ticket #243).
19
20
21Version 0.5
22http://svn.edgewall.org/repos/genshi/tags/0.5.0/
23(Jun 9 2008, from branches/stable/0.5.x)
24
25 * Added #include directive for text templates (ticket #115).
26 * Added new markup transformation filter contributed by Alec Thomas. This
27   provides gorgeous jQuery-inspired stream transformation capabilities based
28   on XPath expressions.
29 * When using HTML or XHTML serialization, the `xml:lang` attribute is
30   automatically translated to the `lang` attribute which HTML user agents
31   understand.
32 * Added support for the XPath 2 `matches()` function in XPath expressions,
33   which allow matching against regular expressions.
34 * Support for Python code blocks in templates can now be disabled
35   (ticket #123).
36 * Includes are now processed when the template is parsed if possible, but
37   only if the template loader is not set to do automatic reloading. Included
38   templates are basically inlined into the including template, which can
39   speed up rendering of that template a bit.
40 * Added new syntax for text templates, which is more powerful and flexible
41   with respect to white-space and line breaks. It also supports Python code
42   blocks. The old syntax is still available and the default for now, but in a
43   future release the new syntax will become the default, and some time after
44   that the old syntax will be removed.
45 * Added support for passing optimization hints to `<py:match>` directives,
46   which can speed up match templates in many cases, for example when a match
47   template should only be applied once to a stream, or when it should not be
48   applied recursively.
49 * Text templates now default to rendering as plain text; it is no longer
50   necessary to explicitly specify the "text" method to the `render()` or
51   `serialize()` method of the generated markup stream.
52 * XInclude elements in markup templates now support the `parse` attribute;
53   when set to "xml" (the default), the include is processed as before, but
54   when set to "text", the included template is parsed as a text template using
55   the new syntax (ticket #101).
56 * Python code blocks inside match templates are now executed (ticket #155).
57 * The template engine plugin no longer adds the `default_doctype` when the
58   `fragment` parameter is `True`.
59 * The `striptags` function now also removes HTML/XML-style comments (ticket
60   #150).
61 * The `py:replace` directive can now also be used as an element, with an
62   attribute named `value` (ticket #144).
63 * The `TextSerializer` class no longer strips all markup in text by default,
64   so that it is still possible to use the Genshi `escape` function even with
65   text templates. The old behavior is available via the `strip_markup` option
66   of the serializer (ticket #146).
67 * Assigning to a variable named `data` in a Python code block no longer
68   breaks context lookup.
69 * The `Stream.render` now accepts an optional `out` parameter that can be
70   used to pass in a writable file-like object to use for assembling the
71   output, instead of building a big string and returning it.
72 * The XHTML serializer now strips `xml:space` attributes as they are only
73   allowed on very few tags.
74 * Match templates are now applied in a more controlled fashion: in the order
75   they are declared in the template source, all match templates up to (and
76   including) the matching template itself are applied to the matched content,
77   whereas the match templates declared after the matching template are only
78   applied to the generated content (ticket #186).
79 * The `TemplateLoader` class now provides an `_instantiate()` method that can
80   be overridden by subclasses to implement advanced template instantiation
81   logic (ticket #204).
82 * The search path of the `TemplateLoader` class can now contain ''load
83   functions'' in addition to path strings. A load function is passed the
84   name of the requested template file, and should return a file-like object
85   and some metadata. New load functions are supplied for loading from egg
86   package data, and loading from different loaders depending on the path
87   prefix of the requested filename (ticket #182).
88 * Match templates can now be processed without keeping the complete matched
89   content in memory, which could cause excessive memory use on long pages.
90   The buffering can be disabled using the new `buffer` optimization hint on
91   the `<py:match>` directive.
92 * Improve error reporting when accessing an attribute in a Python expression
93   raises an `AttributeError` (ticket #191).
94 * The `Markup` class now supports mappings for right hand of the `%` (modulo)
95   operator in the same way the Python string classes do, except that the
96   substituted values are escape. Also, the special constructor which took
97   positional arguments that would be substituted was removed. Thus the
98   `Markup` class now supports the same arguments as that of its `unicode`
99   base class (ticket #211).
100 * The `Template` class and its subclasses, as well as the interpolation API,
101   now take an `filepath` parameter instead of `basedir` (ticket #207).
102 * The `XHTMLSerializer` now has a `drop_xml_decl` option that defaults to
103   `True`. Setting it to `False` will cause any XML decl in the serialized
104   stream to be included in the output as it would for XML serialization.
105 * Add support for a protocol that would allow interoperability of different
106   Python packages that generate and/or consume markup, based on the special
107   `__html__()` method (ticket #202).
108
109
110Version 0.4.4
111http://svn.edgewall.org/repos/genshi/tags/0.4.4/
112(Aug 14, 2007, from branches/stable/0.4.x)
113
114 * Fixed augmented assignment to local variables in Python code blocks.
115 * Fixed handling of nested function and class definitions in Python code
116   blocks.
117 * Includes were not raising `TemplateNotFound` exceptions even when no
118   fallback has been specified. That has been corrected.
119 * The template loader now raises a `TemplateNotFound` error when a previously
120   cached template is removed or renamed, where it previously was passing up
121   an `OSError`.
122 * The Genshi I18n filter can be configured to only extract messages found in
123   `gettext` function calls, ignoring any text nodes and attribute values
124   (ticket #138).
125
126
127Version 0.4.3
128http://svn.edgewall.org/repos/genshi/tags/0.4.3/
129(Jul 17 2007, from branches/stable/0.4.x)
130
131 * The I18n filter no longer extracts or translates literal strings in
132   attribute values that also contain expressions.
133 * Added `loader_callback` option to plugin interface, which allows specifying
134   a callback function that the template loader should invoke whenever a new
135   template is loaded (ticket #130). Note that the value for this option can
136   not be specified as a string, only as an actual function object, which means
137   it is not available for use through configuration files.
138 * The I18n filter now extracts messages from gettext functions even inside
139   ignored tags (ticket #132).
140 * The HTML sanitizer now strips any CSS comments in style attributes, which
141   could previously be used to hide malicious property values.
142 * The HTML sanitizer now also removes any HTML comments encountered, as those
143   may be used to hide malicious payloads targetting a certain "innovative"
144   browser that goes and interprets the content of specially prepared comments.
145 * Attribute access in template expressions no longer silently ignores
146   exceptions other than `AttributeError` raised in the attribute accessor.
147
148
149Version 0.4.2
150http://svn.edgewall.org/repos/genshi/tags/0.4.2/
151(Jun 20 2007, from branches/stable/0.4.x)
152
153 * The `doctype` parameter of the markup serializers now also accepts the "name"
154   of the doctype as string, in addition to the `(name, pubid, sysid)` tuple.
155 * The I18n filter was not replacing the original attributes with the
156   translation, but instead adding a second attribute with the same name.
157 * `TextTemplate` can now handle unicode source (ticket #125).
158 * A `<?python ?>` processing instruction containing trailing whitespace no
159   longer causes a syntax error (ticket #127).
160 * The I18n filter now skips the content of elements that have an `xml:lang`
161   attribute with a fixed string value. Basically, `xml:lang` can now be used
162   as a flag to mark specific sections as not needing localization.
163 * Added plugin for message extraction via Babel (http://babel.edgewall.org/).
164
165
166Version 0.4.1
167http://svn.edgewall.org/repos/genshi/tags/0.4.1/
168(May 21 2007, from branches/stable/0.4.x)
169
170 * Fix incorrect reference to translation function in the I18N filter.
171 * The `ET()` function now correctly handles attributes with a namespace.
172 * XML declarations are now processed internally, as well as written to the
173   output when XML serialization is used (ticket #111).
174 * Added the functions `encode()` and `get_serializer()` to the `genshi.output`
175   module, which provide a lower-level API to the functionality previously only
176   available through `Stream.render()` and `Stream.serialize()`.
177 * The `DocType` class now has a `get(name)` function that returns a `DOCTYPE`
178   tuple for a given string.
179 * Added frameset variants to the `DocType` constants for HTML 4.01 and XHTML
180   1.0.
181 * Improved I18n extraction for pluralizable messages: for any translation
182   function with multiple string arguments (such as ``ngettext``), a single
183   item with a tuple of strings is yielded, instead an item for each string
184   argument.
185 * The `HTMLFormFiller` stream filter no longer alters form elements for which
186   the data element contains no corresponding item.
187 * Code in `<?python ?>` processing instructions no longer gets the special
188   treatment as Python code in template expressions, i.e. item and attribute
189   access are no longer interchangeable (which was broken in a number of ways
190   anyway, see ticket #113). This change does not affect expressions.
191 * Numerous fixes for the execution of Python code in `<?python ?>` processing
192   instructions (tickets #113 and #114).
193 * The `py:def` (and `#def`) directive now supports "star args" (i.e. `*args`
194   and `**kwargs`) in the function declaration (ticket #116).
195
196
197Version 0.4
198http://svn.edgewall.org/repos/genshi/tags/0.4.0/
199(Apr 16 2007, from branches/stable/0.4.x)
200
201 * New example applications for CherryPy and web.py.
202 * The template loader now uses a LRU cache to limit the number of cached
203   templates to a configurable maximum. Also, a race condition in the template
204   loader was fixed by adding locking.
205 * A new filter (genshi.filters.HTMLFormFiller) was added, which can populate
206   HTML forms based on a dictionary of values.
207 * The set of permitted tag and attribute names for the HTMLSanitizer can now
208   be configured per instance.
209 * The template engine plugin now supports a range of options for
210   configuration, for example to set the default serialization method, the
211   default output encoding, or the default DOCTYPE.
212 * The ElementTree adaptation function `ET()` has moved into the `genshi.input`
213   module.
214 * Allow `when` directives to omit the test expression as long as the
215   associated choose directive does have one. In that case, the when branch is
216   followed if the expression of the choose directive evaluates to a truth
217   value.
218 * Unsuccessful attribute or item lookups now return `Undefined` objects for
219   nicer error messages.
220 * Split up the `genshi.template` module into multiple modules inside the new
221   `genshi.template` package.
222 * Results of expression evaluation are no longer implicitly called if they
223   are callable.
224 * Instances of the `genshi.core.Attrs` class are now immutable (they are
225   subclasses of `tuple` instead of `list`).
226 * `MarkupTemplate`s can now be instantiated from markup streams, in addition
227   to strings and file-like objects (ticket #69).
228 * Improve handling of incorrectly nested tags in the HTML parser.
229 * Template includes can now be nested inside fallback content.
230 * Expressions can now contain dict literals (ticket #37).
231 * It is now possible to have one or more escaped dollar signs in front of a
232   full expression (ticket #92).
233 * The `Markup` class is now available by default in template expressions
234   (ticket #67).
235 * The handling of namespace declarations in XML/XHTML output has been improved.
236 * The `Attrs` class no longer automatically wraps all attribute names in
237   `QName` objects. This is now the responsibility of whoever is instantiating
238   `Attrs` objects (for example, stream filters and generators).
239 * Python code blocks are now supported using the `<?python ?>` processing
240   instruction (ticket #84).
241 * The way errors in template expressions are handled can now be configured. The
242   option `LenientLookup` provides the same forgiving mode used in previous
243   Genshi versions, while `StrictLookup` raises exceptions when undefined
244   variables or members are accessed. The lenient mode is still the default in
245   this version, but that may change in the future. (ticket #88)
246 * If a variable is not necessarily defined at the top level of the template
247   data, the new built-in functions `defined(key)` and `value_of(key, default)`
248   can be used so that the template also works in strict lookup mode. These
249   functions were previously only available when using Genshi via the template
250   engine plugin (for compatibility with Kid).
251 * `style` attributes are no longer allowed by the `HTMLSanitizer` by default.
252   If they are explicitly added to the set of safe attributes, any unicode
253   escapes in the attribute value are now handled properly.
254 * Namespace declarations on conditional elements (for example using a `py:if`
255   directive`) are no longer moved to the following element when the element
256   originally carrying the declaration is removed from the stream (ticket #107).
257 * Added basic built-in support for internationalizing templates by providing
258   a new `Translator` class that can both extract localizable strings from a
259   stream, and replace those strings with their localizations at render time.
260   The code for this was largely taken from previous work done by Matt Good
261   and David Fraser.
262
263
264Version 0.3.6
265http://svn.edgewall.org/repos/genshi/tags/0.3.6/
266(Dec 11 2006, from branches/stable/0.3.x)
267
268 * The builder API now accepts streams as children of elements and fragments.
269
270
271Version 0.3.5
272http://svn.edgewall.org/repos/genshi/tags/0.3.5/
273(Nov 22 2006, from branches/stable/0.3.x)
274
275 * Fix XPath traversal in match templates. Previously, `div/p` would be treated
276   the same as `div//p`, i.e. it would match all descendants and not just the
277   immediate children.
278 * Preserve whitespace in HTML `<pre>` elements also when they contain child
279   elements.
280 * Match templates no longer match their own output (ticket #77).
281 * Blank lines before directives in text templates are now preserved as
282   expected (ticket #62).
283
284
285Version 0.3.4
286http://svn.edgewall.org/repos/genshi/tags/0.3.4/
287(Nov 2 2006, from branches/stable/0.3.x)
288
289 * The encoding of HTML and XML files, as well as markup and text templates,
290   can now be specified. Also, the encoding specified in XML declarations is
291   now respected unless an expiclit encoding is requested.
292 * Expressions used as arguments for `py:with`, `py:def`, and `py:for`
293   directives can now contain non-ASCII strings.
294
295
296Version 0.3.3
297http://svn.edgewall.org/repos/genshi/tags/0.3.3/
298(Oct 16 2006, from branches/stable/0.3.x)
299
300 * Fixed bug introduced in 0.3.2 that broke the parsing of templates which
301   declare the same namespace more than once in a nested fashion.
302 * Fixed the parsing of HTML entity references inside attribute values, both
303   in the `XMLParser` and the `HTMLParser` classes.
304 * Some changes to usage of absolute vs. relative template paths to ensure that
305   the filenamed-keyed cache employed by the TemplateLoader doesn't mix up
306   templates with the same name, but from different subdirectories.
307
308
309Version 0.3.2
310http://svn.edgewall.org/repos/genshi/tags/0.3.2/
311(Oct 12 2006, from branches/stable/0.3.x)
312
313 * Exceptions from templates now contain the absolute path to the template file
314   when a search path is used. This enables tracebacks to display the line in
315   question.
316 * The template engine plugin now provides three different types: "genshi" and
317   "genshi-markup" map to markup templates, while "genshi-text" maps to text
318   templates.
319 * Fixed the namespace context used by XPath patterns in py:match templates.
320   The were erroneously using the namespace context of the elements being
321   matched, where they should rather use the context in which they were
322   defined.
323 * The contents of `<script>` and `<style>` elements are no longer escaped when
324   serializing to HTML but declaring the XHTML namespace in the template.
325 * Improved error message raised when using the `py:for` directive on an object
326   that is not iterable (ticket #60).
327 * Fixed the XPath function `starts-with()` which was always returning true
328   (ticket #61).
329
330
331Version 0.3.1
332http://svn.edgewall.org/repos/genshi/tags/0.3.1/
333(Sep 22 2006, from branches/stable/0.3.x)
334
335 * Includes and user-defined filters were not getting the correct context data
336   when used inside a match template (ticket #56).
337 * XPath patterns using the union operator (`|`) were returning only partial
338   results in some cases.
339
340
341Version 0.3
342http://svn.edgewall.org/repos/genshi/tags/0.3.0/
343(Sep 17 2006, from branches/stable/0.3.x)
344
345 * The project name was changed from "Markup" to "Genshi". See UPGRADE.txt
346   for upgrade instructions.
347 * Expression evaluation now differentiates between undefined variables and
348   variables that are defined but set to `None`. This also means that local
349   variables can override built-ins even if the local variable are set to
350   `None` (ticket #36).
351 * The plugin implementation now makes more functions available for use inside
352   templates: XML(), HTML(), defined(), and value-of(). These are mostly for
353   migration from Kid.
354 * The parsing of `py:with` directives has been improved: you can now assign
355   to multiple names, and semicolons inside string literals are treated as
356   expected.
357 * Generator expressions can now be used in template expressions (ticket #16).
358 * Added serialization to plain text (ticket #41).
359 * Calling functions from template expressions with *args and/or **kwargs
360   now works correctly (ticket #42).
361 * The `TemplateLoader` class and the `Template` instances that it manages are
362   now thread-safe, as they no longer keep any state related to the current
363   processing context.
364 * Stream filters and serializers can now be applied using the "pipe" (bitwise
365   or) operator "|".
366 * The execution of named template functions (`py:def`) no longer silently
367   swallows TypeError exceptions (ticket #44).
368 * The XML Parser now correctly handles unicode input (ticket #43).
369 * HTML entities can now be used in templates without having to declare an HTML
370   document type.
371 * Error reporting on undefined entities has been fixed.
372 * Fix traversal of substreams by XPath expressions. For example, the path
373   '*/*' no longer matches non-immediate child elements, and '@*' no longer
374   matches the attributes of descendants.
375 * Fixes for `py:match` which would get confused when it should be applied
376   to multiple elements (ticket #49).
377 * Using namespace prefixes in XPath expressions is now supported.
378 * Expressions now correctly handle slices (ticket #51).
379 * A simple text-based template language is now included for generating
380   plain text output (ticket #47).
381
382
383Version 0.2
384http://svn.edgewall.org/repos/genshi/tags/0.2.0/
385(Aug 22 2006, from branches/stable/0.2.x)
386
387 * XPath syntax errors now contain position info (ticket #20).
388 * Errors in expression evaluation now contain the correct line number in the
389   template (ticket #22).
390 * <script> and <style> element contents are no longer escaped when using HTML
391   serialization (ticket #24).
392 * In some cases expressions in templates did not get interpolated (ticket
393   #26).
394 * CDATA sections are now passed through the pipeline and serialized correctly.
395   That allows using <script> or <style> elements in XHTML output that is still
396   compatible with HTML user agents.
397 * The XHTML serializer now correctly handles elements in foreign namespaces
398   (such as SVG or MathML).
399 * Fixed relative includes in templates on Windows (ticket #27).
400 * Output can be encoded using legacy codecs such as ISO-8859-1. Any character
401   not representable in the chosen encoding gets replaced by the corresponding
402   XML character reference.
403 * String literals in XPath expressions that contain spaces are now parsed
404   as expected.
405 * Added support for the XPath functions boolean(), ceiling(), concat(),
406   contains(), false(), floor(), normalize-space(), number(), round(),
407   starts-with(), string-length(), substring(), substring-after(),
408   substring-before(), translate(), and true().
409 * Non-ASCII characters in expressions should now be handled correctly (ticket
410   #29).
411 * Default values for arguments of template functions now also work with
412   constants and complex expressions (they only worked for string or number
413   literals before).
414 * XPath expressions in now support XPath variables ($var) in predicates
415   (ticket #31).
416 * Expressions in templates can now span multiple lines if they are enclosed
417   in curly braces.
418 * py:def macros can now be invoked from within expressions inside attribute
419   values (ticket #34).
420
421
422Version 0.1
423http://svn.edgewall.org/repos/genshi/tags/0.1.0/
424(Aug 3 2006, from branches/stable/0.1.x)
425
426 * First public release
Note: See TracBrowser for help on using the repository browser.