It will be pretty interesting and useful to update the Python version of Netlify.
Python 3.11 is quicker, with 20/30% of improvement in speed. Furthermore, using mkdocs, many plugins upgrade to use the syntax and function added in 3.10 & 3.11.
Just FYI, Sphinx has just dropped support for Python 3.8 on their master branch, meaning their next major version release won’t be supported in the current state of the netlify Ubuntu 20.04 based runners:
No idea which 3.8 version netlify includes in its build-images, but considering that no recent Python versions are available, it probably won’t be a recent one either.
Please be aware that lots of projects will stop supporting 3.8 once it’ll be dropped by the Python devs, which is in about half a year. As mentioned in my previous post, Sphinx has already dropped support for 3.8 in its 7.2.0 release, which means that all releases since then (see the link to Sphinx’s changelog above) currently can’t be installed. For us, this means that our netlify builds which we’re using for PR previews on GitHub slowly diverge from our production builds which are hosted on GitHub pages.
Please have a look at providing up-to-date Python environments in your build images, thank you.
I spoke a little more in-depth on this in the post linked below, but to summarize:
Python 3.8 is now Unsupported as of this week, with the stable release of 3.13
Netlify’s only available Python versions are 3.8 and 2.7 (unsupported since January 2020)
There is no current Python version available for use in Netlify builds
Since early last year, I’ve been pretty spoiled by always automatically having the latest Python available when I create a new development container at Gitpod. It’s always a shock to check the runtime.txt file for our FOSS project and remember that it’s still using what was until recently the oldest maintained release of Python (and is now, to repeat, unmaintained).
And I can’t get mkdocs to build anymore. We are on 3.11 and griffe which is required does not run on python 3.8. Kind of make netlify pretty useless. I guess people aren’t using this part of the build system anymore. Too bad, was great for creating document sites. On to Vercel or something else
Thank you all for your feedback and for bringing this to our attention. We completely understand the impact this has had. The good news is that a fix is already in the works, and it’s being rolled out to the uses.
We truly appreciate your patience and understanding, and we’re committed to ensuring your experience with Netlify remains smooth and reliable. Thanks for being part of our community, and we’re excited to get this resolved for you very soon!
We now have PYTHON_VERSION environment variable and we’re also rolling out a version selector in the UI.
That’s awesome, @hrishikesh ! My builds are still failing with PYTHON_VERSION set to anything other than 3.8. Is the fix not globally available yet? What python versions will be supported by this fix?