diff --git a/python/deploy b/python/deploy index 1916ee5..2d50118 100755 --- a/python/deploy +++ b/python/deploy @@ -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" @@ -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" diff --git a/tests/python/tests.bats b/tests/python/tests.bats index deca615..60fc3f7 100644 --- a/tests/python/tests.bats +++ b/tests/python/tests.bats @@ -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"* ]]