Bumping the minimum viable Python version to 3.8

VTK has, for many years, enforced a Python 3.4 floor. This floor has since eroded away and is no longer viable. As such, I have an MR raising that floor to 3.8. Here are the reasons for dropping each version:

  • 3.4: There is no support for the PyModuleDef_Slots mechanism of defining modules.
  • 3.5: There is no support for the f-string syntax (f"{interpolated} string") which has gained a lot of use since its introduction
  • 3.6 and 3.7: There are crashes in the test suite with both version that I’ve not been able to track down related to object lifetime management.

The drop of each minor version is in its own commit so that anyone interested can revert individual commits to get back a baseline upon which to make fixes.

As far as Linux distros go, RHEL 8 comes with Python 3.6. Everything more modern seems to come with 3.9 or newer (source). RHEL 8 will be supported until 2029. That’s the only argument I can think of for maintaining support of such old cruft, so I definitely support at least dropping 3.4–3.5. And unless the complaints are loud, I’m fine bumping to 3.8.

Even with loud complaints, without patches, 3.6 and 3.7 are currently very broken (crashes in the garbage collector and startup under PYTHONMALLOC=debug), so restoration would need to come with such patches.

I am fine with the version bump. In fact, I am surprised that VTK supports Python 3.4 right now :smiley: