Repository navigation
[images] Add Python 3.15 Vercel Managed Image - #418
LukeSheard wants to merge 5 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| extension imports, and virtual environment creation with pip as the `ubuntu` | ||
| user. | ||
|
|
||
| ## Building locally |
There was a problem hiding this comment.
We don't need this section in this README imo, this is intended to be fairly straightforward to describe whats in the image, this should be on images/README.md
There was a problem hiding this comment.
Fixed in aecd463. Moved the Python build commands, version override example, and Bake group guidance to images/README.md. The Python README now stays focused on the image contents.
| | `vercel/sandbox/python:3.14` | 3.14.8 | `python` | | ||
| | `vercel/sandbox/python:3.15`, `vercel/sandbox/python:3.15.0` | 3.15.0 | `python-315` | | ||
|
|
||
| Both versions use the same Dockerfile. Set `PYTHON_VERSION` to a full CPython |
There was a problem hiding this comment.
I dont think this description is needed
There was a problem hiding this comment.
Fixed in aecd463. Removed the source-build implementation paragraph and build-verification prose from this README, keeping the version table, user details, and package list.
|
|
||
| RUN chown -R ubuntu:ubuntu /vercel | ||
| apt-get install -y --no-install-recommends \ | ||
| git libbz2-1.0 libffi8 liblzma5 libmpdec4 libncursesw6 libreadline8t64 \ |
There was a problem hiding this comment.
There are more packages that were present on 3.14 and wouldn't be anymore
https://packages.ubuntu.com/resolute/libpython3.14-stdlib https://packages.ubuntu.com/resolute/python3.14-venv https://packages.ubuntu.com/resolute/python3-pip
There was a problem hiding this comment.
Fixed in aecd463. Compared the Ubuntu package dependencies and restored media-types, netbase, and tzdata, plus libdb-dev in the builder and libdb5.3t64 at runtime for dbm.ndbm. Added packaging, setuptools, and wheel via the selected interpreter’s pip so they are available to both source-built Python versions. Added build-time checks for the restored extension, packaging imports, and runtime data. docker buildx bake python python-315 --load --progress=plain passed for both versions, including venv creation with pip as the ubuntu user.
| mkdir /tmp/python && \ | ||
| bsdtar -xJf /tmp/python.tar.xz --strip-components=1 -C /tmp/python && \ | ||
| cd /tmp/python && \ | ||
| ./configure --prefix=/usr/local --with-ensurepip=install && \ |
There was a problem hiding this comment.
We should be able to add --disable-test-modules to stop the test suite from ending up on the image
There was a problem hiding this comment.
Fixed in aecd463. Added --disable-test-modules to the shared CPython configure command, along with build-time assertions that test and _testcapi are absent. Both the Python 3.14 and 3.15 image builds passed these checks.
Updated target 'python-315' to inherit from '_common' and modified context and tags.
Summary
python-315Bake target with3.15and3.15.0tags; existing CI and publishing workflows discover it automatically._decimal), and virtual environment creation as theubuntuuser.sandbox-image-python.Verification
All final checks passed (exit 0):
images/:docker buildx bake python-315 --load --progress=quiet.ubuntuuser,/vercelhome/workdir, and passwordless sudo.docker image inspectconfirmed both tags resolve to the same amd64 image../node_modules/.bin/prettier --check images/README.md images/python/README.md .changeset/python-315-vmi.md.git diff --check.The initial build exposed a GNU tar compatibility issue in the local Docker runtime (resolved by using
bsdtar, consistent with the Node image). An additional runtime check exposed missing_decimalsupport (resolved by adding mpdecimal dependencies and a build-time import check).The image was built and loaded locally, but has not been pushed to VCR. Hosted Sandbox execution has not been tested.