Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## [Unreleased]

- The Python 3.14 version alias now resolves to Python 3.14.6. ([#2105](https://github.com/heroku/heroku-buildpack-python/pull/2105))
- The Python 3.13 version alias now resolves to Python 3.13.14. ([#2105](https://github.com/heroku/heroku-buildpack-python/pull/2105))

## [v345] - 2026-06-04

Expand Down
4 changes: 2 additions & 2 deletions lib/python_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ set -euo pipefail
LATEST_PYTHON_3_10="3.10.20"
LATEST_PYTHON_3_11="3.11.15"
LATEST_PYTHON_3_12="3.12.13"
LATEST_PYTHON_3_13="3.13.13"
LATEST_PYTHON_3_14="3.14.5"
LATEST_PYTHON_3_13="3.13.14"
LATEST_PYTHON_3_14="3.14.6"

OLDEST_SUPPORTED_PYTHON_3_MINOR_VERSION=10
NEWEST_SUPPORTED_PYTHON_3_MINOR_VERSION=14
Expand Down
25 changes: 10 additions & 15 deletions spec/hatchet/python_version_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,15 @@
end
end

# TODO: Enable on Heroku-26 after the default Python version next changes (for the 3.14.5
# release), since for now there isn't a historic buildpack version we can use in this test
# whose stack check permits Heroku-26 and also has a different default Python version so
# that we can test the sticky versions feature.
context 'with an app last built using an older default Python version', stacks: %w[heroku-22 heroku-24] do
context 'with an app last built using an older default Python version' do
# This test performs an initial build using an older buildpack version, followed
# by a build using the current version. This ensures that:
# - The current buildpack can successfully read the version metadata
# written to the build cache by older buildpack versions.
# - If no Python version is specified, the same major version as the
# last build is used (sticky major versioning).
# - Changes in the pip version are handled correctly.
let(:buildpacks) { ['https://github.com/heroku/heroku-buildpack-python#v267'] }
let(:buildpacks) { ['https://github.com/heroku/heroku-buildpack-python#v342'] }

it 'builds with the same major Python version as the last build' do
app.deploy do |app|
Expand All @@ -109,7 +105,7 @@
app.push!
expect(clean_output(app.output)).to include(<<~OUTPUT)
remote: -----> Python app detected
remote: -----> No Python version was specified. Using the same major version as the last build: Python 3.12
remote: -----> No Python version was specified. Using the same major version as the last build: Python 3.14
remote:
remote: ! Warning: No Python version was specified.
remote: !
Expand All @@ -131,9 +127,9 @@
remote: ! In the new file, specify your app's major Python version number
remote: ! only. Don't include quotes or a 'python-' prefix.
remote: !
remote: ! For example, to request the latest version of Python 3.12,
remote: ! For example, to request the latest version of Python 3.14,
remote: ! update your .python-version file so it contains exactly:
remote: ! 3.12
remote: ! 3.14
remote: !
remote: ! We strongly recommend that you don't specify the Python patch
remote: ! version number, since it will pin your app to an exact Python
Expand All @@ -152,13 +148,12 @@
remote: ! file and this warning will be made an error.
remote:
remote: -----> Discarding cache since:
remote: - The Python version has changed from 3.12.7 to #{LATEST_PYTHON_3_12}
remote: - The pip version has changed from 24.0 to #{PIP_VERSION}
remote: - The legacy SQLite3 headers and CLI binary need to be uninstalled
remote: -----> Installing Python #{LATEST_PYTHON_3_12}
remote: -----> Installing pip #{PIP_VERSION} and setuptools #{SETUPTOOLS_VERSION}
remote: - The Python version has changed from 3.14.4 to #{LATEST_PYTHON_3_14}
remote: - The pip version has changed from 26.0.1 to #{PIP_VERSION}
remote: -----> Installing Python #{LATEST_PYTHON_3_14}
remote: -----> Installing pip #{PIP_VERSION}
OUTPUT
expect(app.run('python -V')).to eq("Python #{LATEST_PYTHON_3_12}\n")
expect(app.run('python -V')).to eq("Python #{LATEST_PYTHON_3_14}\n")
expect($CHILD_STATUS.exitstatus).to eq(0)
end
end
Expand Down
4 changes: 2 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
LATEST_PYTHON_3_10 = '3.10.20'
LATEST_PYTHON_3_11 = '3.11.15'
LATEST_PYTHON_3_12 = '3.12.13'
LATEST_PYTHON_3_13 = '3.13.13'
LATEST_PYTHON_3_14 = '3.14.5'
LATEST_PYTHON_3_13 = '3.13.14'
LATEST_PYTHON_3_14 = '3.14.6'
DEFAULT_PYTHON_FULL_VERSION = LATEST_PYTHON_3_14
DEFAULT_PYTHON_MAJOR_VERSION = DEFAULT_PYTHON_FULL_VERSION.gsub(/\.\d+$/, '')

Expand Down