There are several reasons why we're supporting both:
- Yes, it's some effort to support both versions of Python, but most of that effort is in the conversion to Python 3. That wouldn't go away.
- Maintaining more than one code base is a bad idea. There should always be only one version of WeeWX, and its upgrade path should always be down a single branch: V4, in this case.
- As much as the Python org would like Python 2 to go away, it never will. There are a lot of WeeWX devices out there, which will never run Python 3.x. For example, old routers.
- It is easier for us to support both versions than it is to get users to install Python 3 on an old device.
- Along the same lines, the default Python will still be Python 2 for many years. It would be a support headache to have to explain to users how to change init scripts, systemctl scripts, etc., to run with an explicit version of Python.
Having said all that, I can see dropping Python 2 support 4 or 5 years down the line. Hopefully, by then it will be someone else's problem. :-)
Personally, I wish the Python people had not made so many gratuitous changes that don't add much to the language. For example, is
really so much better than
They should have just done the Unicode changes then stopped.
Thanks, Brad for the question.
-tk