[Twisted-Python] Twisted for Python 3

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Wed Oct 19 10:29:17 EDT 2011


On 01:49 pm, solipsis at pitrou.net wrote:
>On Wed, 19 Oct 2011 09:25:14 -0400
>Itamar Turner-Trauring <itamar at itamarst.org> wrote:
>>
>[snip]
>
>Indeed, this is debatable. But generally, marshalling libraries have to
>evolve a bit when ported to Python 3. There's no way the semantic gap
>between 2.x and 3.x can be ignored.
>
>I think banana in 3.x *has* to support both types. str is a fundamental
>type in 3.x (think that class names, function names, filenames, etc.
>all are str by default) and not supporting it in a marshalling library
>would be pretty much awkward. bytes is fundamental in a networking
>library and not supporting it would be similarly awkward :)

Unicode is handled by Jelly.  The only thing Banana does is turn objects 
into bytes to put into a socket and vice versa.  Text in Python 3 will 
be handled the same way as text in Python 2: jelly will UTF-8 encode it 
before handing it to banana.

Jean-Paul



More information about the Twisted-Python mailing list