Skip to content

Commit

Permalink
Added python 3.12 support
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelometal committed Oct 16, 2023
1 parent dc0f1a1 commit 5947111
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ PYTHON_REPO=${PYTHON_REPO:-https://heroku-buildpack-python.s3.amazonaws.com/hero
GET_PIP_URL=${GET_PIP_URL:-https://bootstrap.pypa.io/get-pip.py}
GET_PIP_VERSION_URL=${GET_PIP_VERSION_URL:-https://bootstrap.pypa.io/pip/@VERSION@/get-pip.py}

LATEST_312="3.12.0"
LATEST_311="3.11.3"
LATEST_310="3.10.11"
LATEST_39="3.9.16"
Expand All @@ -22,7 +23,7 @@ LATEST_35="3.5.10"
LATEST_27="2.7.18"
PYPY_36="pypy3.6-7.3.2"
PYPY_27="pypy2.7-7.3.2"
LATEST_PYTHON_VERSIONS=(${LATEST_311} ${LATEST_310} ${LATEST_39} ${LATEST_38} ${LATEST_37} ${LATEST_36} ${LATEST_35} ${LATEST_27} ${PYPY_36} ${PYPY_27})
LATEST_PYTHON_VERSIONS=(${LATEST_312} ${LATEST_311} ${LATEST_310} ${LATEST_39} ${LATEST_38} ${LATEST_37} ${LATEST_36} ${LATEST_35} ${LATEST_27} ${PYPY_36} ${PYPY_27})
PYTHON_VERSION_DEFAULT="${PYTHON_VERSION_DEFAULT:-${LATEST_311}}"
VERSION_ORIGIN="default"
PYTHON_BASE_DIR="/home/application/python"
Expand Down
13 changes: 13 additions & 0 deletions tests/python/tests.bats
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@ setup() {
load 'bats-support-master/load'
load 'bats-assert-master/load'

@test "use python version 3.12 as default" {
run /var/lib/tsuru/deploy
[[ "$output" == *"Using python version: 3.12.0"* ]]
assert_success

run python --version
assert_success
[[ "$output" == *"3.12.0"* ]]

run pip freeze
assert_success
}

@test "use python version 3.11 as default" {
run /var/lib/tsuru/deploy
[[ "$output" == *"Using python version: 3.11.3"* ]]
Expand Down

0 comments on commit 5947111

Please sign in to comment.