| 1 | Upgrading Genshi |
|---|
| 2 | ================ |
|---|
| 3 | |
|---|
| 4 | Upgrading from Genshi 0.3.x to 0.4.x |
|---|
| 5 | ------------------------------------ |
|---|
| 6 | |
|---|
| 7 | The modules ``genshi.filters`` and ``genshi.template`` have been |
|---|
| 8 | refactored into packages containing multiple modules. While code using |
|---|
| 9 | the regular APIs should continue to work without problems, you should |
|---|
| 10 | make sure to remove any leftover traces of the ``template.py`` file on |
|---|
| 11 | the installation path. This is not necessary when Genshi was installed |
|---|
| 12 | as a Python egg. |
|---|
| 13 | |
|---|
| 14 | Results of evaluating template expressions are no longer implicitly |
|---|
| 15 | called if they are callable. If you have been using that feature, you |
|---|
| 16 | will need to add the parenthesis to actually call the function. |
|---|
| 17 | |
|---|
| 18 | Instances of `genshi.core.Attrs` are now immutable. Filters |
|---|
| 19 | manipulating the attributes in a stream may need to be updated. Also, |
|---|
| 20 | the `Attrs` class no longer automatically wraps all attribute names |
|---|
| 21 | in `QName` objects, so users of the `Attrs` class need to do this |
|---|
| 22 | themselves. See the documentation of the `Attrs` class for more |
|---|
| 23 | information. |
|---|
| 24 | |
|---|
| 25 | |
|---|
| 26 | Upgrading from Markup |
|---|
| 27 | --------------------- |
|---|
| 28 | |
|---|
| 29 | Prior to version 0.3, the name of the Genshi project was "Markup". The |
|---|
| 30 | name change means that you will have to adjust your import statements |
|---|
| 31 | and the namespace URI of XML templates, among other things: |
|---|
| 32 | |
|---|
| 33 | * The package name was changed from "markup" to "genshi". Please |
|---|
| 34 | adjust any import statements referring to the old package name. |
|---|
| 35 | * The namespace URI for directives in Genshi XML templates has changed |
|---|
| 36 | from http://markup.edgewall.org/ to http://genshi.edgewall.org/. |
|---|
| 37 | Please update the xmlns:py declaration in your template files |
|---|
| 38 | accordingly. |
|---|
| 39 | |
|---|
| 40 | Furthermore, due to the inclusion of a text-based template language, |
|---|
| 41 | the class: |
|---|
| 42 | |
|---|
| 43 | `markup.template.Template` |
|---|
| 44 | |
|---|
| 45 | has been renamed to: |
|---|
| 46 | |
|---|
| 47 | `genshi.template.MarkupTemplate` |
|---|
| 48 | |
|---|
| 49 | If you've been using the Template class directly, you'll need to |
|---|
| 50 | update your code (a simple find/replace should do--the API itself |
|---|
| 51 | did not change). |
|---|