[Twisted-Python] Porting Twisted to Python 3.

Maxim Lacrima lacrima.maxim at gmail.com
Tue May 20 05:56:51 MDT 2014


Thanks. That wiki page has enough info to get started.


On 20 May 2014 13:50, Itamar Turner-Trauring <itamar at itamarst.org> wrote:

>  On 05/20/2014 05:40 AM, Maxim Lacrima wrote:
>
> Hello!
>
>  I can see that Python 3 support in Twisted is incomplete. I was able to
> `pip install twisted` on Python 3, but I couldn't run a simple example
> program using Twisted Agent.
>
>  A simple `from twisted.web.client import Agent` causes `ImportError: No
> module named 'twisted.python.systemd'`
>
>  I would like to help in porting Twisted to Python 3. I have a couple of
> questions.
>
>  My initial idea was to run some twisted tests with trial and start from
> there. But it looks like trial is not ported to python3 and also I think
> many tests themselves are not python3 aware.
>
>
> The trial command-line tool is not ported, but the library part is.
>
> admin/run-python3-tests<https://twistedmatrix.com/trac/browser/trunk/admin/run-python3-tests>will run Twisted's tests on Python 3.
>
>
>  So what is a recommended workflow?
>
>
> See https://twistedmatrix.com/trac/wiki/Plan/Python3
>
>
>  As for Twisted Agent... URL and its parsed components are now bytes, but
> `Agent._getEndpoint` operates on str, and so do other functions
> (`isIPAddress`, `isIPv6Address`), causing type and other errors.
>
>
> Probably Agent would probably need to be modified to explicitly take bytes
> on both Python 2 and Python 3, since URLs are bytes.
>
>
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
>


-- 
Regards,
Maxim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://twistedmatrix.com/pipermail/twisted-python/attachments/20140520/a1279def/attachment.html>


More information about the Twisted-Python mailing list