Is anything blocking the removal of Python2 support from VTK?

Is anyone aware of blockers to removing Python2 support from VTK? It has been deprecated since 9.1.0, untested for…a long time, and has been EOL itself for 3 years now.

Things removing Python2 support gets us:

  • around 1400 lines removed from the codebase
  • allows us to pursue stable ABI usage in our Python bindings (which will allow for a single wheel for 3.11+ support; maybe also PyPy support from our wheels?)
  • removing a gap in our CI coverage

I am not proposing to increase our minimum supported Python3 version above 3.6 (3.4+ is claimed, but untested and hidden if VTK_LEGACY_REMOVE is set).




+1 It makes sense to remove it to me, if an old app still uses python2, it can still use previous VTK versions or port the code to 3.11+

Just to be clear, I’m not proposing a bump to Python 3.11 for Python3 support (yet…). That would definitely dropping support for known users, so isn’t being considered at this time.

1 Like

Proposed MR:

1 Like

Sounds like a very good idea, +1!

1 Like

If there is no objection, we can remove it with the above MR (and revert if someone really needs Python2 and has the means to aid in supporting it longer-term). We’d need CI for it if it does come back (since at that point someone cares enough).

Any objection to Jan 31st as a planned merge date?

1 Like

Speaking as a maintainer, I have no objections. I recently upgraded my linux system and it no longer has Python2, my other systems are likely to follow soon. People who need Python2 will be able to continue using VTK 9.2.

I’ll merge the MR here soon. Reverting it with CI added to verify it will be the way to restore it.