Skip to content

Commit 08e9285

Browse files
committed
Add support for the Heroku-22 stack
* Adds binary generation and testing support for Heroku-22. * Removes all EOL/deprecated runtime version build scripts. * No longer set a fallback value for the `$STACK` env var, since it is always set on Heroku. Runtime version support for Heroku-22 is as follows: * Python 3.6 and older: Not supported since EOL. * Python 3.7/3.8: Not supported since: - they are in the security-fix-only phase of their lifecycle - they reach EOL in 2023-06 and 2024-10 respectively, which is well before the EOL date of Heroku-22 - upgrading from 3.7/3.9 to 3.9 is in most cases trivial, and so we should be encouraging users to upgrade. * Python 3.9: Only the current latest patch release (3.9.12) supported (plus any future 3.9 releases). * Python 3.10: All patch releases supported. * PyPy: Not supported, since is deprecated, was only ever a beta feature, the PyPy versions available for Heroku-18/20 are significantly out of date, and usage is virtually non-existent. GUS-W-10343718.
1 parent c447bbc commit 08e9285

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+298
-365
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
parameters:
4848
stack:
4949
type: enum
50-
enum: ["heroku-18", "heroku-20"]
50+
enum: ["heroku-18", "heroku-20", "heroku-22"]
5151
docker:
5252
- image: cimg/ruby:2.7
5353
working_directory: /mnt/ramdisk/project
@@ -87,4 +87,4 @@ workflows:
8787
- hatchet:
8888
matrix:
8989
parameters:
90-
stack: ["heroku-18", "heroku-20"]
90+
stack: ["heroku-18", "heroku-20", "heroku-22"]

CHANGELOG.md

Lines changed: 2 additions & 0 deletions

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# These targets are not files
22
.PHONY: lint lint-scripts lint-ruby compile builder-image buildenv deploy-runtimes publish
33

4-
STACK ?= heroku-20
5-
STACKS ?= heroku-18 heroku-20
4+
STACK ?= heroku-22
5+
STACKS ?= heroku-18 heroku-20 heroku-22
66
PLATFORM := linux/amd64
77
FIXTURE ?= spec/fixtures/python_version_unspecified
88
ENV_FILE ?= builds/dockerenv.default

README.md

Lines changed: 4 additions & 4 deletions

bin/compile

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ PY27="python-2.7"
5858
PYPY27="pypy2.7"
5959
PYPY36="pypy3.6"
6060

61-
# Which stack is used (for binary downloading), if none is provided (e.g. outside of Heroku)?
62-
# TODO: Remove this and require that STACK be set explicitly.
63-
DEFAULT_PYTHON_STACK="heroku-18"
64-
6561
# Common Problem Warnings:
6662
# This section creates a temporary file in which to stick the output of `pip install`.
6763
# The `warnings` subscript then greps through this for common problems and guides
@@ -73,9 +69,6 @@ RECOMMENDED_PYTHON_VERSION=$DEFAULT_PYTHON_VERSION
7369
# This installs them into the path, so we can execute them directly.
7470
export PATH=$PATH:$ROOT_DIR/vendor/
7571

76-
# Set environment variables if they weren't set by the platform.
77-
[ ! "$STACK" ] && STACK=$DEFAULT_PYTHON_STACK
78-
7972
# Sanitize externally-provided environment variables:
8073
# The following environment variables are either problematic or simply unneccessary
8174
# for the buildpack to have knowledge of, so we unset them, to keep the environment
@@ -93,7 +86,7 @@ source "$BIN_DIR/warnings"
9386

9487
if [[ -f "${ENV_DIR}/BUILD_WITH_GEO_LIBRARIES" ]]; then
9588
mcount "failure.unsupported.BUILD_WITH_GEO_LIBRARIES"
96-
puts-warn "The Python buildpack's legacy BUILD_WITH_GEO_LIBRARIES functonality is"
89+
puts-warn "The Python buildpack's legacy BUILD_WITH_GEO_LIBRARIES functionality is"
9790
puts-warn "no longer supported:"
9891
puts-warn "https://devcenter.heroku.com/changelog-items/1947"
9992
puts-warn

builds/README.md

Lines changed: 1 addition & 1 deletion

builds/heroku-22.Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM heroku/heroku:22-build
2+
3+
ENV WORKSPACE_DIR="/app/builds" \
4+
S3_BUCKET="heroku-buildpack-python" \
5+
S3_PREFIX="heroku-22/" \
6+
STACK="heroku-22"
7+
8+
RUN apt-get update \
9+
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
10+
libsqlite3-dev \
11+
python3-pip \
12+
python3-setuptools \
13+
&& rm -rf /var/lib/apt/lists/*
14+
15+
WORKDIR /app
16+
17+
COPY requirements.txt /app/
18+
RUN pip3 install --disable-pip-version-check --no-cache-dir -r /app/requirements.txt
19+
20+
COPY . /app

builds/runtimes/pypy3.6

Lines changed: 0 additions & 23 deletions
This file was deleted.

builds/runtimes/pypy3.6-7.3.2

Lines changed: 0 additions & 4 deletions
This file was deleted.

builds/runtimes/python-3.6.0

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)