Skip to content

Commit

Permalink
Show file tree
Hide file tree
Showing 13 changed files with 32 additions and 30 deletions.
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]

- Added support for Python 3.8.20, 3.9.20, 3.10.15, 3.11.10 and 3.12.6. ([#1632](https://github.com/heroku/heroku-buildpack-python/pull/1632))
- Changed the default Python version for new apps from 3.12.5 to 3.12.6. ([#1632](https://github.com/heroku/heroku-buildpack-python/pull/1632))
- Updated wheel from 0.43.0 to 0.44.0. ([#1629](https://github.com/heroku/heroku-buildpack-python/pull/1629))

## [v255] - 2024-08-07
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ A `requirements.txt` must be present at the root of your application's repositor

To specify your python version, you also need a `runtime.txt` file - unless you are using the default Python runtime version.

Current default Python Runtime: Python 3.12.5
Current default Python Runtime: Python 3.12.6

Alternatively, you can provide a `setup.py` file, or a `Pipfile`.
Using `pipenv` will generate `runtime.txt` at build time if one of the field `python_version` or `python_full_version` is specified in the `requires` section of your `Pipfile`.
Expand All @@ -60,8 +60,8 @@ Specify a Python Runtime

Supported runtime options include:

- `python-3.12.5` on all [supported stacks](https://devcenter.heroku.com/articles/stack#stack-support-details)
- `python-3.11.9` on all [supported stacks](https://devcenter.heroku.com/articles/stack#stack-support-details)
- `python-3.10.14` on all [supported stacks](https://devcenter.heroku.com/articles/stack#stack-support-details)
- `python-3.9.19` on Heroku-20 and Heroku-22 only
- `python-3.8.19` on Heroku-20 only
- `python-3.12.6` on all [supported stacks](https://devcenter.heroku.com/articles/stack#stack-support-details)
- `python-3.11.10` on all [supported stacks](https://devcenter.heroku.com/articles/stack#stack-support-details)
- `python-3.10.15` on all [supported stacks](https://devcenter.heroku.com/articles/stack#stack-support-details)
- `python-3.9.20` on Heroku-20 and Heroku-22 only
- `python-3.8.20` on Heroku-20 only
10 changes: 5 additions & 5 deletions bin/default_pythons
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
# the env vars to subprocesses.
# shellcheck disable=2034

LATEST_312="python-3.12.5"
LATEST_311="python-3.11.9"
LATEST_310="python-3.10.14"
LATEST_39="python-3.9.19"
LATEST_38="python-3.8.19"
LATEST_312="python-3.12.6"
LATEST_311="python-3.11.10"
LATEST_310="python-3.10.15"
LATEST_39="python-3.9.20"
LATEST_38="python-3.8.20"
# TODO: Remove these EOL versions once pipenv-python-version is refactored.
LATEST_37="python-3.7.17"
LATEST_36="python-3.6.15"
Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/pipenv_and_runtime_txt/runtime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-3.12.5
python-3.12.6
2 changes: 1 addition & 1 deletion spec/fixtures/python_3.10/runtime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-3.10.14
python-3.10.15
2 changes: 1 addition & 1 deletion spec/fixtures/python_3.11/runtime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-3.11.9
python-3.11.10
2 changes: 1 addition & 1 deletion spec/fixtures/python_3.12/runtime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-3.12.5
python-3.12.6
2 changes: 1 addition & 1 deletion spec/fixtures/python_3.8/runtime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-3.8.19
python-3.8.20
2 changes: 1 addition & 1 deletion spec/fixtures/python_3.9/runtime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-3.9.19
python-3.9.20
2 changes: 1 addition & 1 deletion spec/fixtures/runtime_txt_only/runtime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-3.12.5
python-3.12.6
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

python-3.12.5
python-3.12.6

12 changes: 6 additions & 6 deletions spec/hatchet/python_version_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@
end
end

context 'when runtime.txt contains python-3.8.19' do
context 'when runtime.txt contains python-3.8.20' do
let(:allow_failure) { false }
let(:app) { Hatchet::Runner.new('spec/fixtures/python_3.8', allow_failure:) }

context 'when using Heroku-20', stacks: %w[heroku-20] do
it 'builds with Python 3.8.19 but shows a deprecation warning' do
it 'builds with Python 3.8.20 but shows a deprecation warning' do
app.deploy do |app|
expect(clean_output(app.output)).to include(<<~OUTPUT)
remote: -----> Python app detected
Expand Down Expand Up @@ -171,7 +171,7 @@
end
end

context 'when runtime.txt contains python-3.9.19' do
context 'when runtime.txt contains python-3.9.20' do
let(:allow_failure) { false }
let(:app) { Hatchet::Runner.new('spec/fixtures/python_3.9', allow_failure:) }

Expand All @@ -187,19 +187,19 @@
end
end

context 'when runtime.txt contains python-3.10.14' do
context 'when runtime.txt contains python-3.10.15' do
let(:app) { Hatchet::Runner.new('spec/fixtures/python_3.10') }

include_examples 'builds with the requested Python version', LATEST_PYTHON_3_10
end

context 'when runtime.txt contains python-3.11.9' do
context 'when runtime.txt contains python-3.11.10' do
let(:app) { Hatchet::Runner.new('spec/fixtures/python_3.11') }

include_examples 'builds with the requested Python version', LATEST_PYTHON_3_11
end

context 'when runtime.txt contains python-3.12.5' do
context 'when runtime.txt contains python-3.12.6' do
let(:app) { Hatchet::Runner.new('spec/fixtures/python_3.12') }

include_examples 'builds with the requested Python version', LATEST_PYTHON_3_12
Expand Down
10 changes: 5 additions & 5 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
require 'rspec/retry'
require 'hatchet'

LATEST_PYTHON_3_8 = '3.8.19'
LATEST_PYTHON_3_9 = '3.9.19'
LATEST_PYTHON_3_10 = '3.10.14'
LATEST_PYTHON_3_11 = '3.11.9'
LATEST_PYTHON_3_12 = '3.12.5'
LATEST_PYTHON_3_8 = '3.8.20'
LATEST_PYTHON_3_9 = '3.9.20'
LATEST_PYTHON_3_10 = '3.10.15'
LATEST_PYTHON_3_11 = '3.11.10'
LATEST_PYTHON_3_12 = '3.12.6'
DEFAULT_PYTHON_VERSION = LATEST_PYTHON_3_12

# The requirement versions are effectively buildpack constants, however, we want
Expand Down

0 comments on commit cee5f83

Please sign in to comment.