Skip to content

Add binary build support for Heroku-26#2056

Merged
edmorley merged 2 commits intomainfrom
heroku-26-build-support
Mar 20, 2026
Merged

Add binary build support for Heroku-26#2056
edmorley merged 2 commits intomainfrom
heroku-26-build-support

Conversation

@edmorley
Copy link
Copy Markdown
Member

@edmorley edmorley commented Mar 20, 2026

This adds support for building the binaries for the upcoming Heroku-26 stack based on Ubuntu 26.04.

A later PR will add support for the stack to the buildpack itself, once the Heroku build system supports Heroku-26 (since until that point we can't run Hatchet in CI anyway).

The libcrypt-dev library had to be added to the Dockerfile used for binary building, since the headers package is no longer in heroku/heroku:26-build as it was previously only a transitive dependency in the build image, and with the upstream Ubuntu 26.04 package changes is now no longer pulled in. (From searching it doesn't appear to be widely used, so I don't think it's worth adding back to the Heroku-26 build image.)

Doing so fixes this warning on Python 3.12 and older (the crypt module only exists in older Python versions):

*** WARNING: renaming "_crypt" since importing it failed: /tmp/src/build/lib.linux-x86_64-3.10/_crypt.cpython-310-x86_64-linux-gnu.so: undefined symbol: crypt

...

Following modules built successfully but were removed because they could not be imported:
_crypt

Dry-run test builds using this branch succeeded. e.g.:
https://github.com/heroku/heroku-buildpack-python/actions/runs/23343385460
https://github.com/heroku/heroku-buildpack-python/actions/runs/23343379302

GUS-W-20775546.

This adds support for building the binaries for the upcoming
Heroku-26 stack based on Ubuntu 26.04.

A later PR will add support for the stack to the buildpack itself,
once the Heroku build system supports Heroku-26 (since until
that point we can't run Hatchet in CI anyway).

Dry-run test builds using this branch succeeded without any
other changes being required to the `Dockerfile` or build
scripts. eg:
https://github.com/heroku/heroku-buildpack-python/actions/runs/23341280024
https://github.com/heroku/heroku-buildpack-python/actions/runs/23341295487

GUS-W-20775546.
@edmorley edmorley self-assigned this Mar 20, 2026
Since it's no longer in `heroku/heroku:26-build` as it was previously
a transitive dependency and no longer pulled into the image.

It's required by the CPython `crypt` module - though only for
Python 3.12 and older, since the module was removed in 3.13:
https://docs.python.org/3.13/whatsnew/3.13.html#whatsnew313-pep594

Fixes:

```
*** WARNING: renaming "_crypt" since importing it failed: /tmp/src/build/lib.linux-x86_64-3.10/_crypt.cpython-310-x86_64-linux-gnu.so: undefined symbol: crypt

...

Following modules built successfully but were removed because they could not be imported:
_crypt
```

The binary test script has been updated to explicitly check that
the `crypt` module imports correctly (since the build itself only
emits a warning).
@edmorley edmorley marked this pull request as ready for review March 20, 2026 12:51
@edmorley edmorley requested a review from a team as a code owner March 20, 2026 12:51
@edmorley edmorley enabled auto-merge (squash) March 20, 2026 12:59
@edmorley edmorley merged commit 8b3b0e8 into main Mar 20, 2026
13 of 14 checks passed
@edmorley edmorley deleted the heroku-26-build-support branch March 20, 2026 15:08
@heroku-linguist heroku-linguist bot mentioned this pull request Apr 2, 2026
@edmorley
Copy link
Copy Markdown
Member Author

edmorley commented Apr 9, 2026

Initial binaries (enough for the tests to pass; given Ubuntu 26.04 is still pre-GA and so we'll need to regenerate all the binaries again later) triggered with:

for v in 3.10.0 3.10.20 3.11.15 3.12.13 3.13.13 3.14.0 3.14.4; do
    gh workflow run build_python_runtime.yml -F "python_version=${v}" -F "stack=heroku-26"
done

edmorley added a commit that referenced this pull request Apr 9, 2026
Following on from #2056 (which added support for building
and releasing Python binaries for Heroku-26), this adds support
for the new stack to the buildpack itself.

Note: Since Ubuntu 26.04 isn't GA yet, Heroku-26 is currently
only available on Heroku for use by internal users.

GUS-W-20775616.
edmorley added a commit that referenced this pull request Apr 9, 2026
Following on from #2056 (which added support for building
and releasing Python binaries for Heroku-26), this adds support
for the new stack to the buildpack itself.

Note: Since Ubuntu 26.04 isn't GA yet, Heroku-26 is currently
only available on Heroku for use by internal users.

GUS-W-20775616.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants