I've updated https://github.com/tavendo/AutobahnPython#python-support

Python 2.6 is not supported using Trollius?

I built Python 2.6 from sources .. but it fails

oberstet@vbox-ubuntu1310:~/scm/trollius$ ~/python269/bin/python
Python 2.6.9 (unknown, Jan  8 2014, 11:31:08)
[GCC 4.8.1] on linux3
Type "help", "copyright", "credits" or "license" for more information.
>>> import asyncio
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "asyncio/__init__.py", line 23, in <module>
    from .backport_ssl import *
  File "asyncio/backport_ssl.py", line 1, in <module>
    import ssl
File "/home/oberstet/python269/lib/python2.6/ssl.py", line 60, in <module> import _ssl # if we can't import it, let the error propagate
ImportError: No module named _ssl
>>>

I don't have the time to patch Py 2.6 to build on a recent host with OpenSSL 1.0, which seems to require multiple steps:

http://askubuntu.com/questions/21547/what-are-the-packages-libraries-i-should-install-before-compiling-python-from-so

Is SSL a strict requirement of Trollius?


Here is PyPy3 (which is tracking Python 3.2.3):
(...)
   File "setup.py", line 35, in <module>
     if sys.version < (2, 7):
TypeError: unorderable types: str < tuple

Oops, it's a typo. Fixed.

Autobahn/Trollius now works on:

oberstet@vbox-ubuntu1310:~/scm/AutobahnPython/examples/asyncio/websocket/echo$ ~/pypy3-2.1-beta1-linux64/bin/pypy -V
Python 3.2.3 (d63636b30cc0, Jul 30 2013, 07:02:17)
[PyPy 2.1.0-beta1 with GCC 4.6.3]

The only remaining issue with Autobahn is the use of u"" literals

oberstet@vbox-ubuntu1310:~/scm/AutobahnPython/examples/asyncio/websocket/echo$ ~/pypy3-2.1-beta1-linux64/bin/pypy
Python 3.2.3 (d63636b30cc0, Jul 30 2013, 07:02:17)
[PyPy 2.1.0-beta1 with GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``the future has just begun''
>>>> s = u"kjshdf"
  File "<stdin>", line 1
    s = u"kjshdf"
        ^
SyntaxError: invalid syntax
>>>>

I thought the 'u' would just be ignored on Py 3 (any version)?


(It works also on Python 3.3 and 3.4.)

Ok, but I guess there is no real reason to use Trollius on those, right?

Using "yield from" in Python 2 raises a SyntaxError. It's not so easy
to write a same code base for Trollius and Tulip. Supporting Python
3.3+ allows to:

(a) port a Python 2 project on Trollius,
(b) port it on Python 3,
(c) and later replace easily Trollius with Tulip.

Makes sense.


For a huge project like OpenStack (+2.5 millions line of Python code!)
it's not posible to do the 3 steps at once. Changes must be
incremental and small.

That's huge. I didn't expect OpenStack being such large;)

/Tobias


Victor


Reply via email to