Changeset 1144
- Timestamp:
- Nov 26, 2010, 7:13:21 PM (13 years ago)
- File:
-
- 1 edited
-
branches/experimental/py3k/doc/upgrade.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/experimental/py3k/doc/upgrade.txt
r1106 r1144 7 7 :depth: 2 8 8 .. sectnum:: 9 10 ---------------------------------------------- 11 Upgrading from Genshi 0.6.x to the py3k branch 12 ---------------------------------------------- 13 14 The most noticable API change in the Genshi py3k branch is that the 15 default encoding in numerous places is now None (i.e. unicode) instead 16 of UTF-8. This change was made in order to ease the transition to Python 3 17 where strings are unicode strings by default. 18 19 If your application relies on the default UTF-8 encoding a simple way to 20 have it work both with Genshi 0.6.x and the py3k branch is to specify the 21 encoding explicitly in calls to the following classes, methods and functions: 22 23 * genshi.HTML 24 * genshi.Stream.render 25 * genshi.input.HTMLParser 26 * genshi.template.MarkupTemplate 27 * genshi.template.TemplateLoader 28 * genshi.template.TextTemplate (and genshi.template.NewTextTemplate) 29 * genshi.template.OldTextTemplate 30 31 Whether you explicitly specify UTF-8 or explicitly specify None (unicode) is 32 a matter of personal taste, although working with unicode may make porting 33 your own application to Python 3 easier. 9 34 10 35
Note: See TracChangeset
for help on using the changeset viewer.
