2021-03-22

Why upgrade?

Last month Kodi upgraded to "Kodi 19 Matrix", complete with new obnoxious splash screen that makes you think your HDMI cable is busted. As a result, huge numbers of Addons (including several "official" addons) stopped working. The official Kodi response is to scream at you and ban your comment, even when your comment never mentioned unofficial addons.

While Kodi is famously nervous about disavowing the only reason people actually use their software, surely they have enough of a sense of self-preservation to understand that their 19.0 upgrade breaks their software. After all, if they are essentially discouraging upgrades, they create an environment where one sizeable chunk of their users downgrades (as I did) to version 18.9, and another stops using their software entirely. The former group, of course, also keeps security vulnerabilities which can impact Kodi long after they think it's a forgotten user base. The latter are people who you've just angered and will never see again.

The rationale is the replacing of Python version 2 with Python version 3. Python 2 stopped being supported, motivating Kodi's "need" to replace it. This is one of those explanations that seems reasonable on its face until you ask an obvious question or six. Python 3 is incompatible with Python 2, a decision itself apparently made because of the nature of those changes. There are a variety of changes, most of which shouldn't require breaking of compatibility. There are, however, two notable exceptions:

  • Python 3 value of variables never changes whereas in Python 2 value of the global variable will be changed while using it inside for-loop.
  • Python 3 exceptions should be enclosed in parenthesis while Python 2 exceptions should be enclosed in notations.

While both are certainly issues, neither are huge deal-breakers, especially if a wrapper or similar software package could be used to simply parse the Python 2 code into Python 3 code. After all, for years Python has already shipped with a program that you can use to change your own code yourself. Why this very code couldn't be used to query a piece of coding, confirm which version it was written for, and adjust the processing accordingly is an exercise left to readers. It might be fairly inefficient, but Python code has never been about efficiency anyways. 

It's always taken as a piece of blind faith that "it's no longer supported so we have to move on", which itself isn't particularly strong. Kodi hasn't done a good job at all of explaining what (if anything) their program can do with Python 3 that it couldn't do with Python 2. It might irk a lot of tech writers to think in this way, but often old boring code is perfectly fine to keep. When the strongest argument against Python 2 is that it breaks things that are tightly intertwined with your operating system, you don't have much of a leg to stand on. [probably because you've pointlessly intertwined your legs with your OS! -ed]

Kodi need not even be the redheaded stepchild of the Python updating family: Debian, for example, is sticking with Python 2.7 for at least 3 more years.

Bonus Kodi insanity: if you submit a bug report with one of their official addons, and they discover you have loaded unofficial addons, they refuse to fix (or even look into) the problem with their official addon.