In between builds, I’ve made some exploratory work this weekend to see how ready GRASS is for the upcoming python 3.14. There’s some good and bad news.
Bad news: Some important work, especially in tests is needed.
Good news: that same work is what is currently not working on Mac and Windows, so solving them for Linux benefits all platforms.
One notable change, that was already announced and known, is the change of the start method for multiprocessing, not being fork anymore for platforms where it wasn’t changed yet. Windows can’t use fork, and macOS was already forced to change a couple years ago. This means that where multiprocessing is used, the code used must be pickable. Most of the time, it means that a local function (a function defined inside a function) can’t be used. Other than that, some issues with lambdas, as pickling is done by name, and the state of the new interpreter must be loaded from what is globally available (from scratch), instead of starting with the memory of the parent process.
A considerable part of the test failures (Linux) were already known in Windows. So all tests that fail on macOS and Windows (not because of line endings or encoding) and marked as such must be fixed before Python 3.14 release.
This is only part of the story, the one that could be seen with what our tests actually test. I didn’t actually run these builds, only on CI. There might be modules or usages that only happen when using it as users that wasn’t shown.
The work needed is too big for a single-person effort to do, and without help and interest in getting this issues fixed. There’s way more for me to do instead of this.
The PR in question, against my fork, is python: Try using python 3.14 by echoix · Pull Request #301 · echoix/grass · GitHub
The pytest and Ubuntu workflows have been changed, for Ubuntu in a way similar to CI(Ubuntu): Install latest version of Python (3.13) for full config by echoix · Pull Request #4372 · OSGeo/grass · GitHub
There’s also the unfixed issues of the Ubuntu runs with 3.13 that also appear in python: Try using python 3.14 by echoix · Pull Request #301 · echoix/grass · GitHub, so some aren’t caused by Python 3.14 (rather newer Python so newer dependencies, and newer numpy, that we didn’t handle yet).