-
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
Merged
Merged
Bump python to 3.12 #3618
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>
Member
Author
|
CI passed on all platforms except qemu_uefi_secure (which seems to be generally borked). |
chewi
approved these changes
Jan 19, 2026
Contributor
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.
sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/make.defaults
Show resolved
Hide resolved
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.