cmlenz@233: Upgrading Genshi cmlenz@233: ================ cmlenz@233: cmlenz@592: Upgrading from Genshi 0.4.x to 0.5.x cmlenz@592: ------------------------------------ cmlenz@592: cmlenz@592: Genshi 0.5 introduces a new, alternative syntax for text templates, which is cmlenz@592: more flexible and powerful compared to the old syntax. For backwards cmlenz@592: compatibility, this new syntax is not used by default, though it will be in cmlenz@592: a future version. It is recommended that you migrate to using this new syntax. cmlenz@592: To do so, simply rename any references in your code to `TextTemplate` to cmlenz@592: `NewTextTemplate`. To explicitly use the old syntax, use `OldTextTemplate` cmlenz@592: instead, so that you can be sure you'll be using the same language when the cmlenz@592: default in Genshi is changed (at least until the old implementation is cmlenz@592: completely removed). cmlenz@592: cmlenz@592: cmlenz@336: Upgrading from Genshi 0.3.x to 0.4.x cmlenz@336: ------------------------------------ cmlenz@336: cmlenz@452: The modules ``genshi.filters`` and ``genshi.template`` have been cmlenz@452: refactored into packages containing multiple modules. While code using cmlenz@452: the regular APIs should continue to work without problems, you should cmlenz@452: make sure to remove any leftover traces of the ``template.py`` file on cmlenz@452: the installation path. This is not necessary when Genshi was installed cmlenz@452: as a Python egg. cmlenz@336: cmlenz@343: Results of evaluating template expressions are no longer implicitly cmlenz@343: called if they are callable. If you have been using that feature, you cmlenz@343: will need to add the parenthesis to actually call the function. cmlenz@343: cmlenz@345: Instances of `genshi.core.Attrs` are now immutable. Filters cmlenz@411: manipulating the attributes in a stream may need to be updated. Also, cmlenz@411: the `Attrs` class no longer automatically wraps all attribute names cmlenz@411: in `QName` objects, so users of the `Attrs` class need to do this cmlenz@411: themselves. See the documentation of the `Attrs` class for more cmlenz@411: information. cmlenz@411: cmlenz@345: cmlenz@233: Upgrading from Markup cmlenz@233: --------------------- cmlenz@233: cmlenz@233: Prior to version 0.3, the name of the Genshi project was "Markup". The cmlenz@233: name change means that you will have to adjust your import statements cmlenz@233: and the namespace URI of XML templates, among other things: cmlenz@233: cmlenz@233: * The package name was changed from "markup" to "genshi". Please cmlenz@233: adjust any import statements referring to the old package name. cmlenz@233: * The namespace URI for directives in Genshi XML templates has changed cmlenz@233: from http://markup.edgewall.org/ to http://genshi.edgewall.org/. cmlenz@233: Please update the xmlns:py declaration in your template files cmlenz@233: accordingly. cmlenz@233: cmlenz@233: Furthermore, due to the inclusion of a text-based template language, cmlenz@233: the class: cmlenz@233: cmlenz@233: `markup.template.Template` cmlenz@233: cmlenz@233: has been renamed to: cmlenz@233: cmlenz@414: `genshi.template.MarkupTemplate` cmlenz@233: cmlenz@233: If you've been using the Template class directly, you'll need to cmlenz@233: update your code (a simple find/replace should do--the API itself cmlenz@233: did not change).