Why support Python 2.7?

89 views
Skip to first unread message

Brad Henderson

unread,
Sep 19, 2019, 4:49:58 AM9/19/19
to weewx-development
Hi there,

I'm relatively new to this group and WeeWX and have been trying to get up to speed with all the work going on with the conversion from Python 2 to Python 3 for V4. It seems to me that there is a lot of effort going in to making the software work under both 2.7 and >3.5. My question is why bother with 2.7? Python 2.7 is being officially deprecated at the end of the year, so why not just ditch 2.7 support entirely for WeeWX V4? If people feel they must still use Python 2, then they can use V3.9.x, surely?

What am I missing?

Thomas Keffer

unread,
Sep 19, 2019, 9:32:48 AM9/19/19
to weewx-development
There are several reasons why we're supporting both:
  1. 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.
  2. 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.
  3. 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.
  4. It is easier for us to support both versions than it is to get users to install Python 3 on an old device.
  5. 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 

queue.Queue

really so much better than

Queue.Queue?

They should have just done the Unicode changes then stopped.

Thanks, Brad for the question. 

-tk







--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/ede29a0f-50ad-45c5-9b8d-1775bc2facd8%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages