<commit_before>Upgrading Genshi
================

Upgrading from Genshi 0.3.x to 0.4.x
------------------------------------

The `genshi.template` module has been refactored into a package with
multiple modules. While code using the normal templating APIs should
continue to work without problems, you should make sure to remove any
leftover traces of the `template.py` file on the installation path.
This is not necessary when Genshi was installed as a Python egg.

Results of evaluating template expressions are no longer implicitly
called if they are callable. If you have been using that feature, you<commit_msg>Add stricter error handling to upgrade notes.<commit_after>Upgrading Genshi
================

Upgrading from Genshi 0.3.x to 0.4.x
------------------------------------

The `genshi.template` module has been refactored into a package with
multiple modules. While code using the normal templating APIs should
continue to work without problems, you should make sure to remove any
leftover traces of the `template.py` file on the installation path.
This is not necessary when Genshi was installed as a Python egg.

Handling of errors in template expressions is now more strict. In
particular, it is no longer possible to reference an undefined
variable without an exception being raised. The previous error
handling let expressions get away with minor typos, which would
result in subtle bugs that were hard to find. The functions
`defined()` and `value_of()` are now available in all template
code; they can be used to test whether a specific variable is
defined at the top-level scope. Please refer to the template
language documentation for details.

Results of evaluating template expressions are no longer implicitly
called if they are callable. If you have been using that feature, you
{'fraction_non_alphanumeric': 0.08874098724348309, 'fraction_numerical': 0.004437049362174155, 'mean_word_length': 3.888888888888889, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1111699', 'n_tokens_mistral': 431, 'n_tokens_neox': 413, 'n_words': 259}