Should I upgrade to Heroku Python 3.9 Build Rejection now?
Decide whether to upgrade application runtime, pin an older buildpack temporarily, or rework dependency constraints now that Heroku's current Python buildpacks reject Python 3.9 builds.
Blockers
- Heroku's latest Python buildpack rejects Python 3.9 builds.
- requires_version: vendor/heroku → runtime/python-3-11
- requires_version: vendor/heroku → runtime/python-3-12
- requires_version: vendor/heroku → runtime/python-3-13
- requires_version: vendor/heroku → runtime/python-3-14
- runtime/python-3-10 — EOL 2027-01-06
- Lock-in via package/heroku-buildpack-python-v326
Who this is for
- low-ops
- cost-sensitive
- small-team
Candidates
Upgrade directly to a supported major version, preferably Python 3.13 or 3.14
As of 2026-04-01, this has already occurred: Heroku's latest Python buildpack rejects Python 3.9 builds, although existing 3.9 apps continue running until the next build or deploy. Heroku's supported Python majors are 3.11, 3.12, 3.13, and 3.14, and new Python apps default to the latest patch of Python 3.14. Heroku recommends declaring the runtime in a `.python-version` file and recommends using a major-version alias such as `3.14` so rebuilds pick up security patch releases automatically. This is the cleanest path with the longest support runway.
When to choose
Use this when you can run your test suite and dependency graph on a modern Python without major ecosystem blockers. It is the best default for low-ops teams because it removes the 3.9 deployment blocker and avoids another near-term Heroku runtime migration.
Tradeoffs
Best long-term support horizon and security posture, but may require code or dependency updates if your stack is not yet ready for the newest Python.
Cautions
Do not rely on Heroku's default runtime for long-lived apps, especially on Fir-generation apps where rebuilds can change the default Python over time. Heroku only supports the latest patch release of each supported major version.
Rework dependency constraints now and land on Python 3.11 or 3.12 first
As of 2026-04-01, Python 3.11 and 3.12 are still supported on Heroku, while Python 3.10 is already deprecated and scheduled for buildpack removal on 2027-01-06. If your blockers are library ceilings, native extension compatibility, or framework support gaps, updating those constraints and moving to 3.11 or 3.12 is a supported near-term bridge. This path solves the immediate build rejection without forcing the newest Python in the same change window. It is often lower risk than jumping straight from 3.9 to 3.14.
When to choose
Use this when the real blocker is dependency compatibility rather than Heroku itself, and you need a supported runtime quickly. Pick 3.12 if possible for a longer runway; use 3.11 only when a key package or framework still lags on 3.12+.
Tradeoffs
Less disruptive than a direct jump to 3.13 or 3.14, but it shortens the time until the next required runtime upgrade compared with moving straight to the newest supported major.
Cautions
Do not treat Python 3.10 as the safe compromise: as of 2026-04-01 it is already deprecated on Heroku, still builds for now, and is scheduled for removal from the buildpack on 2027-01-06. Move runtime selection into `.python-version`; `runtime.txt` is deprecated.
Temporarily pin the previous Python buildpack version on Cedar apps
As of 2026-04-01, Heroku documents a short-term workaround for Cedar-generation apps that cannot leave Python 3.9 immediately. You can switch from the `heroku/python` alias to the classic buildpack URL `https://github.com/heroku/heroku-buildpack-python.git#v326`, which is the previous buildpack version. This restores the ability to build temporarily while you prepare the runtime and dependency migration. Heroku explicitly frames this as a short-term workaround, not a steady-state choice.
When to choose
Use this only for an emergency deploy window on a Cedar-generation app when production changes cannot wait for a Python upgrade. It is appropriate when the alternative is being unable to ship a critical fix, but only if you commit to a follow-up migration immediately.
Tradeoffs
Fastest tactical unblock for affected Cedar apps, but it keeps you on an unsupported Python and off the current stable buildpack alias.
Cautions
Heroku warns that Python 3.9 no longer receives upstream security fixes, so this is a risk-acceptance decision. After upgrading to a supported Python version, you must switch back to the `heroku/python` stable alias to receive future security and platform updates. The documented workaround is specifically for Cedar-generation apps; check official docs before assuming the same approach for Fir-generation apps.
Try with your AI agent
$ npm install -g pocketlantern $ pocketlantern init # Restart Claude Code, Cursor, or your MCP client, then ask: # "Should I upgrade to Heroku Python 3.9 Build Rejection now?"