(Apr 16 2007, from branches/stable/0.4.x)
* New example applications for CherryPy and web.py.
* The template loader now uses a LRU cache to limit the number of cached
templates to a configurable maximum. Also, a race condition in the template
loader was fixed by adding locking.
* A new filter (genshi.filters.HTMLFormFiller) was added, which can populate
HTML forms based on a dictionary of values.
* The set of permitted tag and attribute names for the HTMLSanitizer can now
be configured per instance.
* The template engine plugin now supports a range of options for
configuration, for example to set the default serialization method, the
default output encoding, or the default DOCTYPE.
* The ElementTree adaptation function `ET()` has moved into the `genshi.input`
module.
* Allow `when` directives to omit the test expression as long as the
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.
* Split up the `genshi.template` module into multiple modules inside the new
`genshi.template` package.
* Results of expression evaluation are no longer implicitly called if they
are callable.
* Instances of the `genshi.core.Attrs` class are now immutable (they are
subclasses of `tuple` instead of `list`).
* `MarkupTemplate`s can now be instantiated from markup streams, in addition
to strings and file-like objects (ticket 69).
* Improve handling of incorrectly nested tags in the HTML parser.
* Template includes can now be nested inside fallback content.
* Expressions can now contain dict literals (ticket 37).
* It is now possible to have one or more escaped dollar signs in front of a
full expression (ticket 92).
* The `Markup` class is now available by default in template expressions
(ticket 67).
* The handling of namespace declarations in XML/XHTML output has been improved.
* The `Attrs` class no longer automatically wraps all attribute names in
`QName` objects. This is now the responsibility of whoever is instantiating
`Attrs` objects (for example, stream filters and generators).
* Python code blocks are now supported using the `<?python ?>` processing
instruction (ticket 84).
* The way errors in template expressions are handled can now be configured. The
option `LenientLookup` provides the same forgiving mode used in previous
Genshi versions, while `StrictLookup` raises exceptions when undefined
variables or members are accessed. The lenient mode is still the default in
this version, but that may change in the future. (ticket 88)
* If a variable is not necessarily defined at the top level of the template
data, the new built-in functions `defined(key)` and `value_of(key, default)`
can be used so that the template also works in strict lookup mode. These
functions were previously only available when using Genshi via the template
engine plugin (for compatibility with Kid).
* `style` attributes are no longer allowed by the `HTMLSanitizer` by default.
If they are explicitly added to the set of safe attributes, any unicode
escapes in the attribute value are now handled properly.
* Namespace declarations on conditional elements (for example using a `py:if`
directive`) are no longer moved to the following element when the element
originally carrying the declaration is removed from the stream (ticket 107).
* Added basic built-in support for internationalizing templates by providing
a new `Translator` class that can both extract localizable strings from a
stream, and replace those strings with their localizations at render time.
The code for this was largely taken from previous work done by Matt Good
and David Fraser.