-
Notifications
You must be signed in to change notification settings - Fork 82
Bump python to 3.12 #3618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Bump python to 3.12 #3618
Conversation
8cc01cd to
4aa9450
Compare
4aa9450 to
5765c8a
Compare
5765c8a to
b560c37
Compare
Try to do it with in a kinda-sorta proper Gentoo way - with PYTHON_TARGETS and PYTHON_SINGLE_TARGET variables in make.defaults. Still need to disable all other versions of python, otherwise our settings gets merged with settings from base Gentoo profiles, which currently enable python 3.13. And we also need to keep masking the other python versions, because emerge still for some reason wants to install python 3.13 or 3.14 for some packages, despite the settings in PYTHON_TARGETS. We are not bumping to 3.13, because sec-policy/selinux-base PYTHON_COMPAT is still on at most 3.12. Note that this change still allows python 3.11 in PYTHON_TARGETS for a transition period. Otherwise the SDK builds do not go past stage1. We only restrict generic images to 3.12 only, otherwise we would end up with two python version installed in sysext images. Signed-off-by: Krzesimir Nowak <knowak@microsoft.com>
Signed-off-by: Krzesimir Nowak <knowak@microsoft.com>
Signed-off-by: Krzesimir Nowak <knowak@microsoft.com>
44eff64 to
06328bb
Compare
Signed-off-by: Krzesimir Nowak <knowak@microsoft.com>
We only allow one version of Python in the SDK and generic images, but this creates a friction during the SDK build where the seed still has an old version of Python and the stage1 is supposed to have the new one, and thus we end up with slot conflicts for python packages - I don't really understand what is going on (there are python packages in the seed image that are built for old Python and emerge wants to install the same packages in the seed but built for the new Python and it can't work its way around it.) Allowing both versions of Python to coexist in stage1 seems to be moving things forward. Stage3 image (stage2 is skipped) will contain only the new version of Python. Signed-off-by: Krzesimir Nowak <knowak@microsoft.com>
Signed-off-by: Krzesimir Nowak <knowak@microsoft.com>
|
CI passed on all platforms except qemu_uefi_secure (which seems to be generally borked). |
chewi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done on getting there in the end. I'd have looked more closely at SELinux, but I guess we can bump again soon. It's not clear why perfinion hasn't bumped it already. Gentoo #952707.
| PYTHON_SINGLE_TARGET="-pypy3_11 -python3_11 python3_12 -python3_13 -python3_14 -python3_13t -python3_14t" | ||
| PYTHON_TARGETS="-pypy3_11 -python3_11 python3_12 -python3_13 -python3_14 -python3_13t -python3_14t" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not this? It implies -python* python3_12.
| PYTHON_SINGLE_TARGET="-pypy3_11 -python3_11 python3_12 -python3_13 -python3_14 -python3_13t -python3_14t" | |
| PYTHON_TARGETS="-pypy3_11 -python3_11 python3_12 -python3_13 -python3_14 -python3_13t -python3_14t" | |
| PYTHON_SINGLE_TARGET="python3_12" | |
| PYTHON_TARGETS="python3_12" |
CI: http://localhost:8080/job/container/job/sdk/2465/cldsv/
Bumping python to 3.12 - Gentoo is slowly moving away from 3.11 as some packages bumped their PYTHON_COMPAT beyond 3.11. Not bumping to 3.13 though, as sec-policy/selinux-base is still at 3.12 at most.
This required updating PYTHON_COMPAT in overlay packages, so I did it by updating them to 3.11 - 3.14 range.
I also added a transitional SDK profile that is only used for stage1 build of the SDK to ease the bump.
Needed to patch the boto package further to make it work with python3.12 (mostly some SyntaxWarnings about invalid escapes that could be fixed with using raw strings, and replaced imp with importlib).
changelog/directory (user-facing change, bug fix, security fix, update)/bootand/usrsize, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.