Edgewall Software

source: tags/0.5.0/ChangeLog

Last change on this file was 869, checked in by cmlenz, 15 years ago

Preparing for 0.5 release.

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