Call for comments: retire Python 2 support

Hi guys,

so Autobahn has supported Python 2 and 3 since the very beginning, and we support running on either Twisted or asyncio on both Python versions.

This flexibility has proven nice and useful … in the past.

Given that Python will now finally retire Python 2 on 2020/01/01

and that Twisted will retire Python 2 support also soonish, we need to decide how we handle this.

Of course the straightforward option would be: follow Python and Twisted, and retire Python 2 support in new versions of Autobahn entirely.



1 Like

This is going to open some new possibilities especially that we’d be able to use Type Hinting in our code (since twisted will be python 3.5+). At the same time I’d like to remove the dependency on six as well.

Yes, if “drop python2” means “python 3.5+ only” then it also opens up the possibility to use await and async def in way more places … and a “slow migration” is possible, especially since we’re already using txaio for a bunch of the “futures” handling anyway.

The main “pro” I’d see here is explicitly marking API calls that are async with async def so there’s zero confusion. Anyway, yes, dropping python2 means we can do a bunch of cleanups :slight_smile:

(Python 3.5 probably makes sense as a minimum since that’s what PyPy supports. Are there other alternative interpreters we care to support that have different version restrictions?)

Ok, yes, python 3.5+ only makes a lot of sense … agreed. So I created an issue sticked to a milestone for this:

and Omer apparently already created a PR that already fixes a whole big chunk of ^ already =)

Oh, one more thing: what do we do with txaio?

Since txaio is basically “just” a support library for Autobahn, I think it makes sense to drop python2 support there at the same time as Autobahn.

ok, sounds good! see