Repository navigation
Prepare the runtime build scripts for Python 3.15 - #2154
Merged
Merged
Conversation
This prepares the scripts used to compile the Python runtime binaries for Python 3.15. It does not add Python 3.15 support to the buildpack itself, which will follow in a later PR once Python 3.15.0 has been released (expected 2026-10-09) and its binaries built and uploaded. Python 3.15 no longer falls back to the bundled `libmpdec` when the system library is missing, which would otherwise cause the `_decimal` module to silently not be built: https://docs.python.org/3.15/whatsnew/3.15.html#build-changes We can't use the system package yet, since Ubuntu 24.04 doesn't currently ship `libmpdec-dev`. We've requested that it be re-added (https://bugs.launchpad.net/ubuntu/+source/mpdecimal/+bug/2167730), but even once it is, it must first be rolled out to all base images. So for now we explicitly opt in to the bundled copy using `--without-system-libmpdec`, with a TODO to switch later. The runtime test script now imports `_decimal` and `_hashlib` directly, since `decimal` and `hashlib` fall back to other implementations if their C modules weren't built, which would hide a broken build. It also imports `curses.panel`, since `curses` doesn't import `_curses_panel`, and now runs the `compression.zstd` check for all versions that have it rather than only 3.14. Tested by compiling Python 3.15.0rc3 for arm64 on Heroku-24 and running the runtime test script against the result. (This used a modified copy of the build script, since release candidates are published under a different URL to final releases, and we intentionally don't support them in the buildpack itself.) GUS-W-20591263.
edmorley
marked this pull request as ready for review
October 8, 2026 14:24
edmorley
enabled auto-merge (squash)
October 8, 2026 14:24
Malax
approved these changes
Oct 8, 2026
Merged
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
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.
This prepares the scripts used to compile the Python runtime binaries for Python 3.15. It does not add Python 3.15 support to the buildpack itself, which will follow in a later PR once Python 3.15.0 has been released (expected 2026-10-09) and its binaries built and uploaded.
Python 3.15 no longer falls back to the bundled
libmpdecwhen the system library is missing, which would otherwise cause the_decimalmodule to silently not be built:https://docs.python.org/3.15/whatsnew/3.15.html#build-changes
We can't use the system package yet, since Ubuntu 24.04 doesn't currently ship
libmpdec-dev. We've requested that it be re-added (https://bugs.launchpad.net/ubuntu/+source/mpdecimal/+bug/2167730), but even once it is, it must first be rolled out to all base images. So for now we explicitly opt in to the bundled copy using--without-system-libmpdec, with a TODO to switch later.The runtime test script now imports
_decimaland_hashlibdirectly, sincedecimalandhashlibfall back to other implementations if their C modules weren't built, which would hide a broken build. It also importscurses.panel, sincecursesdoesn't import_curses_panel, and now runs thecompression.zstdcheck for all versions that have it rather than only 3.14.Tested by compiling Python 3.15.0rc3 for arm64 on Heroku-24 and running the runtime test script against the result. (This used a modified copy of the build script, since release candidates are published under a different URL to final releases, and we intentionally don't support them in the buildpack itself.)
GUS-W-20591263.