Instead we occasionally have a thread like this and Jonas tells us whether Mac OS is ready to upgrade yet
So let’s agree on a minimum Python version to document on Building - 🐛 LLDB.
I’ve done a survey of the versions used or mentioned:
LLVM itself requires a minimum of 3.8 to run tests or 3.0 without tests (with a note that 3.0 may not actually work). Python is optional for lldb, so this is only a reference point not something we have to follow.
Building - 🐛 LLDB mentions a python36 package install for NetBSD. Could not confirm what current NetBSD uses.
FWIW
For LLVM Windows Release I plan to keep standard python per year on Windows. Move to 3.12.x from LLVM 20 onwards and will keep 3.12.x in LLVM 21 as well. Which actually means that we should now update LLVM buildbot to use python 3.12.x to make sure LLVM 20 runs smooth when its released.
We build LLVM Linux release builds on LTS - 1 (currently Jammy). I guess we dont have any known cases of LLDB being built on bionic anymore. So may be python 3.8 is safe bet for Linux.
If people are locked on to older OSes that cannot update Xcode (Xcode runs on its matching macOS release, and the previous year’s macOS release, both the OS and Xcode are on an annual update schedule), they can install it from Homebrew packages, or build from source. I’m fine with a requirement of 3.9, as far as macOS is concerned.
Thanks for putting this together @DavidSpickett. I’m very supportive of documenting a minimum Python version. The transition from Python 2 to Python 3 was an “interesting” experience but luckily that’s fully behind us now.
As @jasonmolenda pointed out, the latest 3 Xcode releases have shipped with Python 3.9. My preference would be to match LLVM and require at least Python 3.8.
From a RHEL perspective, anything <= 3.9 is convenient for us, because that’s the system Python version on RHEL 9. On RHEL 8, it’s Python 3.6, but because the rest of LLVM requires a newer version, we end up using Python 3.12 instead anyway (which is less good for overall system integration, but not super important for lldb’s case).
I generally think it’s a good idea to have the same Python version requirement in lldb as for the rest of LLVM (so that would be Python 3.8 currently).
This applies to lldb and its dependencies. So they could use Homebrew to install a newer Python first. The earliest one is 3.8 (python@3.13 — Homebrew Formulae), which is convenient.
LLDB’s use case is somewhat… different from the rest of llvm, so I can imagine us moving forwards, if we have a good reason, but:
a) I’m not sure if have that right now
b) it definitely doesn’t make sense to require a lower version than llvm
If you disable tests, is python even used for anything in llvm? Some build time scripts perhaps? There’s certainly not many of them, so I can see how they could have a stricter (lower) version requirement.
And I think the same could be said for lldb: if we disable tests and linking with python, then our usage of python is very low, and if someone was motivated enough, then he could probably make that work with an earlier version without too much effort. So, given that llvm (at least the llvm subproject) does link against python, we could sort of say that we’re matching llvm (but maybe we also don’t have to – I think people build llvm in more constrained environments)
I have sent out some emails to folks who can hopefully tell me what the BSDs use.
Windows x86 we are safe in assuming 3.8 will run there. We already have situations where people have to install specific Python’s there to use certain lldb builds (which is not ideal but out of scope for this thread).
Debian’s current LTS ships 3.9, but apt.llvm goes back to Debian 10 which is 3.7. @sylvestre , would a minimum of 3.8 be a problem for your Debian 10 builds? (I kinda asked this already but I didn’t phrase it properly the first time)
For enforcing the minimum, perhaps we start by warning for < 3.8 and recommending 3.8 in the documentation.
Once the 20 branch is taken, we make it a cmake error to have < 3.8, document it as the minimum and remove support code for anything older.
I sent this by email to @DavidSpickett but might as well add it here for posterity.
For the copy of LLDB in the FreeBSD base system we provide (only) lua scripting, as we already have lua available and do not want to maintain Python as contrib code.
In the ports tree we have Python versions from 3.8 through 3.11. Our 3.8 port is expiring at the end of the year:
DEPRECATED= Upgrade to a newer Python version. 3.8 is in
maintenance status and gets security fixes only. End-of-Life: 2024-10.
See https://devguide.python.org/versions/
LLDB using 3.8 as a minimum requirement is fine for FreeBSD.