Skip to content

Commit 6bdb608

Browse files
committed
Use Python 3.11 as the default Python version for new apps
Previously if a new app did not specify a Python version via a `runtime.txt` file or the appropriate `Pipfile` config option, then the buildpack would default to the latest Python 3.10 release (currently Python 3.10.10). Now the buildpack will use the latest Python 3.11 release (currently Python 3.11.2). This does not affect: * apps that specify an explicit Python version * existing apps that have already had a build using the previous default version (since that version is remembered from one build to the next, via the "sticky versions" feature). Use-cases involving new apps that aren't compatible with Python 3.11 will now need to specify Python 3.10 explicitly: https://devcenter.heroku.com/articles/python-support#specifying-a-python-version However most apps should be compatible, since Python 3.11 was released several months ago (2022-10-24), does not contain significant breaking changes over Python 3.10, and has been happily used by the python-getting-started project since 2022-10-25. GUS-W-12345720.
1 parent 01d50e1 commit 6bdb608

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Unreleased
44

5+
- Use Python 3.11 as the default Python version for new apps (previously Python 3.10) ([#1408](https://github.com/heroku/heroku-buildpack-python/pull/1408)).
56

67
## v225 (2023-02-08)
78

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ A `requirements.txt` must be present at the root of your application's repositor
4242

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

45-
Current default Python Runtime: Python 3.10.10
45+
Current default Python Runtime: Python 3.11.2
4646

4747
Alternatively, you can provide a `setup.py` file, or a `Pipfile`.
4848
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`.

bin/default_pythons

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ LATEST_36="python-3.6.15"
1515
LATEST_35="python-3.5.10"
1616
LATEST_34="python-3.4.10"
1717
LATEST_27="python-2.7.18"
18-
DEFAULT_PYTHON_VERSION="${LATEST_310}"
18+
DEFAULT_PYTHON_VERSION="${LATEST_311}"

spec/hatchet/nltk_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
remote: -----> Downloading NLTK corpora…
1313
remote: -----> Downloading NLTK packages: city_database stopwords
1414
remote: .*: RuntimeWarning: 'nltk.downloader' found in sys.modules after import of package 'nltk', but prior to execution of 'nltk.downloader'; this may result in unpredictable behaviour
15-
remote: warn\\(RuntimeWarning\\(msg\\)\\)
1615
remote: \\[nltk_data\\] Downloading package city_database to
1716
remote: \\[nltk_data\\] /tmp/build_.*/.heroku/python/nltk_data...
1817
remote: \\[nltk_data\\] Unzipping corpora/city_database.zip.

spec/hatchet/stack_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@
5656
remote: -----> No Python version was specified. Using the same version as the last build: python-#{DEFAULT_PYTHON_VERSION}
5757
remote: To use a different version, see: https://devcenter.heroku.com/articles/python-runtimes
5858
remote: python: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by python)
59-
remote: python: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.35' not found (required by /app/.heroku/python/lib/libpython3.10.so.1.0)
60-
remote: python: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /app/.heroku/python/lib/libpython3.10.so.1.0)
61-
remote: python: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /app/.heroku/python/lib/libpython3.10.so.1.0)
62-
remote: python: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /app/.heroku/python/lib/libpython3.10.so.1.0)
59+
remote: python: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.35' not found (required by /app/.heroku/python/lib/libpython3.11.so.1.0)
60+
remote: python: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /app/.heroku/python/lib/libpython3.11.so.1.0)
61+
remote: python: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /app/.heroku/python/lib/libpython3.11.so.1.0)
62+
remote: python: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /app/.heroku/python/lib/libpython3.11.so.1.0)
6363
remote: -----> Stack has changed from heroku-22 to heroku-20, clearing cache
6464
remote: -----> No change in requirements detected, installing from cache
6565
remote: -----> Installing python-#{DEFAULT_PYTHON_VERSION}

spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
LATEST_PYTHON_3_9 = '3.9.16'
1313
LATEST_PYTHON_3_10 = '3.10.10'
1414
LATEST_PYTHON_3_11 = '3.11.2'
15-
DEFAULT_PYTHON_VERSION = LATEST_PYTHON_3_10
15+
DEFAULT_PYTHON_VERSION = LATEST_PYTHON_3_11
1616

1717
# Work around the return value for `default_buildpack` changing after deploy:
1818
# https://github.com/heroku/hatchet/issues/180

0 commit comments

Comments
 (0)