Page MenuHomePhabricator

Migrate Pybal to Python 3
Open, Needs TriagePublic


Python 2.7 is end-of-life in about 18 months from now, and Python 3 has finally gained traction in recent years. It's time to migrate Pybal over as well.

We have barely any outside users of Pybal, and even for the few that exist, it probably shouldn't be a big problem for them to run it on Python 3 as well. Therefore I don't see any good reason to maintain backwards compatibility; that would only complicate matters a lot. Let's do a clean cut instead.

I don't really expect any issues with Pybal's dependencies, which are mainly Twisted, treq, PyOpenSSL and prometheus_client. PyOpenSSL and prometheus_client are already fully Python 3 compatible. Twisted (and treq) is largely there as well, except for probably some of the more obscure parts which we aren't using - so I don't expect any issues there.

We've been working on getting full unit testing coverage and are nearly there, which will help with the migration as well.

Event Timeline

Change 644041 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[operations/debs/pybal@master] [WIP] Start migrating pybal to python3

So far I played with it a little:

Is the bgp part of pybal actively used? It has an obvious import cycle. imports and imports, when it gets to run those tests, it fails really bad.