Compare commits

..

5 Commits

Author SHA1 Message Date
Ed Morley a165deadfb Release v175 (#1032) 2020-08-05 09:12:16 +01:00
Ed Morley b64897a0b7 Fix inconsistent formatting in CHANGELOG.md (#1031)
- Switches releases to always using H2 (`##`) rather than a mixture of
  H1s (meaning multiple H1s in the same document) and H2s.
- Always refers to the versions as `vNNN` rather than sometimes without
  the `v` prefix.
- Other formatting and typo fixes.

@W-7905079@
2020-08-03 20:18:18 +01:00
Ed Morley fc6698e597 Update pip to 20.1.1 (#1030)
Updates pip from 20.0.2 to 20.1.1 for Python 2.7 and Python 3.5+:
https://pip.pypa.io/en/stable/news/#id40

The version used for Python 3.4 remains unchanged at 19.1.1, since it's
the last version of pip that supports it.

Pip has been updated to 20.1.1 rather than the recently released 20.2,
since the latter has a few regressions and even though these will be
fixed shortly in 20.2.1, we should let the changes soak for longer
before picking them up.

The `PIP_NO_PYTHON_VERSION_WARNING` environment variable has been set
(equivalent to passing `--no-python-version-warning`) to prevent the
Python 2.7 EOL warnings added in pip 20.1 from spamming the build log:
https://github.com/pypa/pip/blob/20.1.1/src/pip/_internal/cli/base_command.py#L139-L154

This was set via environment variable rather than CLI flag, since:
* otherwise we'd have to pass it to every pip invocation
* older pip (such as the 19.1.1 used by Python 3.4) doesn't support this
  option and would error out due to an unknown CLI flag being passed,
  unless we added conditional flags throughout.

The new pip wheel was uploaded to S3 using:

```
$ pip download --no-cache pip==20.1.1
Collecting pip==20.1.1
  Downloading pip-20.1.1-py2.py3-none-any.whl (1.5 MB)
  Saved ./pip-20.1.1-py2.py3-none-any.whl
Successfully downloaded pip

$ aws s3 sync . s3://lang-python/common/ --exclude "*" --include "*.whl" --acl public-read --dryrun
(dryrun) upload: ./pip-20.1.1-py2.py3-none-any.whl to s3://lang-python/common/pip-20.1.1-py2.py3-none-any.whl

$ aws s3 sync . s3://lang-python/common/ --exclude "*" --include "*.whl" --acl public-read
upload: ./pip-20.1.1-py2.py3-none-any.whl to s3://lang-python/common/pip-20.1.1-py2.py3-none-any.whl
```

Fixes #1005.
@W-7659489@
2020-08-03 19:45:41 +01:00
Ed Morley 6fa6feb75d Update setuptools (#1024)
Upgrades setuptools from 39.0.1 to:
- 44.1.1 for Python 2.7 (since it's the last supported version)
- 43.0.0 for Python 3.4 (since it's the last supported version)
- 47.1.1 for Python 3.5+ (since we can't use 47.2.0+ until #1006 fixed)

https://setuptools.readthedocs.io/en/latest/history.html#v47-1-1

Fixes #949.
Closes #973.
2020-08-03 18:36:01 +01:00
Ed Morley 81874dad47 Replace 'master' branch references with 'main' (#1029)
For #1028.
2020-08-03 17:31:08 +01:00
8 changed files with 135 additions and 118 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ language: minimal
dist: bionic
branches:
only:
- master
- main
script:
- make test STACK="${STACK}" TEST_CMD="${TEST_CMD}"
+104 -98
View File
@@ -1,9 +1,18 @@
# Python Buildpack Changelog
# Master
## Unreleased
# 174 (2020-07-30)
## v175 (2020-08-05)
- Update pip from 20.0.2 to 20.1.1 for Python 2.7 and Python 3.5+ (#1030).
- Update setuptools from 39.0.1 to: (#1024)
- 44.1.1 for Python 2.7
- 43.0.0 for Python 3.4
- 47.1.1 for Python 3.5+
- Switch the `heroku-buildpack-python` repository default branch from `master` to `main` (#1029).
## v174 (2020-07-30)
- For repeat builds, also manage the installed versions of setuptools/wheel, rather than just that of pip (#1007).
- Install an explicit version of wheel rather than the latest release at the time (#1007).
@@ -12,87 +21,85 @@
- Install pip using itself rather than `get-pip.py` (#1007).
- Disable pip's version check + cache when installing pip/setuptools/wheel (#1007).
- Install setuptools from PyPI rather than a vendored copy (#1007).
- Reduce the number of environment variables exposed to `bin/{pre,post}_compile` and other subprocesses (#1011)
- Reduce the number of environment variables exposed to `bin/{pre,post}_compile` and other subprocesses (#1011).
# 173 (2020-07-21)
## v173 (2020-07-21)
- Python 3.8.5 is now available (CPython)
- Python 3.8.5 is now available (CPython).
# 172 (2020-07-17)
## v172 (2020-07-17)
- Python 3.8.4 is now available (CPython)
- Python 3.8.4 is now available (CPython).
# 171 (2020-07-07)
## v171 (2020-07-07)
- Python 3.6.11 and 3.7.8 are now available (CPython).
# 170 (2020-05-19)
## v170 (2020-05-19)
- Python 2.7.18, 3.5.9, 3.7.7 and 3.8.3 are now available (CPython).
- PyPy 2.7 and 3.6, version 7.3.1 are now available (Note: PyPy support is in beta)
- Docs: Fix explanation of runtime.txt generation when using pipenv
- Bugfix: Correctly detect Python version when using a `python_version` of `3.8` in `Pipfile.lock`
- PyPy 2.7 and 3.6, version 7.3.1 are now available (Note: PyPy support is in beta).
- Docs: Fix explanation of runtime.txt generation when using pipenv.
- Bugfix: Correctly detect Python version when using a `python_version` of `3.8` in `Pipfile.lock`.
--------------------------------------------------------------------------------
# 169 (2020-04-22)
## v169 (2020-04-22)
- Add a Hatchet test for python 3.8.2
- Set Code Owners to @heroku/langauges
- Bugfix: Caching on subsequent redeploys
- Update tests to support latest version of Python
# 168 (2020-04-06)
## v168 (2020-04-06)
- Doc: Update Readme with version numbers
- update Code Owners to include the Heroku Buildpack Maintainers team
- Deprecation warning: BUILD_WITH_GEO_LIBRARIES is now deprecated. See warning for details.
- Deprecation warning: `BUILD_WITH_GEO_LIBRARIES` is now deprecated. See warning for details.
- Clean up build log output
- Update Python versions in README to match docs
- Django version detection fixed, link updated
# 167 (2020-03-26)
## v167 (2020-03-26)
- Add failcase for cache busting
- Bugfix: Clearing pip dependencies
# 166 (2020-03-05)
## v166 (2020-03-05)
- Correct ftp to https in vendored file
- Warn for Django 1.11 approaching EOL, provide link to roadmap
# 165 (2020-02-27)
## v165 (2020-02-27)
- Python 3.8.2 now available.
# 164 (2020-02-20)
## v164 (2020-02-20)
- Update requirements.txt builds to use Pip 20.0.2
- Download get-pip.py to tmpdir instead of root dir
# 163 (2019-12-23)
## v163 (2019-12-23)
- New pythons released:
Python 3.8.1, 3.7.6, 3.6.10 (CPython)
Beta Release: Pypy 2.7 and 3.6, version 7.2.0
# 162 (2019-12-06)
## v162 (2019-12-06)
- Bug fix: fragile sqlite3 install
# 161 (2019-12-2)
## v161 (2019-12-2)
- Bug fix: Sqlite3 version bump
# 160 (2019-10-23)
## v160 (2019-10-23)
- Bugfix: Pipenv no longer installs twice in CI
# 159 (2019-10-22)
## v159 (2019-10-22)
- Python 2.7.17 now available on Heroku 18 and 16.
# 158 (2019-10-21)
## v158 (2019-10-21)
- Python 3.7.5 and 3.8.0 now available on Heroku 18 and 16.
- Add support for Python 3.8 branch
@@ -100,11 +107,11 @@
- Test Improvements
- Add support for staging binary testing
# 157 (2019-09-18)
## v157 (2019-09-18)
- Typo fixes
# 156 (2019-09-12)
## v156 (2019-09-12)
- Python 3.6.9 and 3.7.4 now available.
@@ -112,125 +119,125 @@
- Build utility and documentation updates
- Bump Hatchet tests to point at new default python version.
# 155 (2019-08-22)
## v155 (2019-08-22)
add docs and make target for heroku-18 bob builds
# 154 (2019-07-17)
## v154 (2019-07-17)
Fix python 3.5.7 formula actually building 3.7.2
# 153 (2019-06-21)
## v153 (2019-06-21)
Hotfix for broken heroku-16 deploys
# 152 (2019-04-04)
## v152 (2019-04-04)
Python 3.7.3 now available.
# 151 (2019-03-21)
## v151 (2019-03-21)
Python 3.5.7 and 3.4.10 now available on all Heroku stacks.
# 150 (2019-03-13)
## v150 (2019-03-13)
Python 2.7.16 now available on all Heroku stacks.
# 149 (2019-03-04)
## v149 (2019-03-04)
Hotfix for broken Cedar 14 deploys
# 148 (2019-02-21)
## v148 (2019-02-21)
No user facing changes, improving internal metrics
# 147 (2019-02-07)
## v147 (2019-02-07)
Python 3.7.2 and 3.6.8 now available on all Heroku stacks.
# 146 (2018-11-11)
## v146 (2018-11-11)
Python 3.7.1, 3.6.7, 3.5.6 and 3.4.9 now available on all Heroku stacks.
# 145 (2018-11-08)
## v145 (2018-11-08)
Testing and tooling expanded to better support new runtimes
# 144 (2018-10-10)
## v144 (2018-10-10)
Switch to cautious upgrade for Pipenv install to ensure the pinned pip version
is used with Pipenv
# 143 (2018-10-09)
## v143 (2018-10-09)
Add support for detecting SLUGIFY_USES_TEXT_UNIDECODE, which is required to
Add support for detecting `SLUGIFY_USES_TEXT_UNIDECODE`, which is required to
install Apache Airflow version 1.10 or higher.
# 142 (2018-10-08)
## v142 (2018-10-08)
Improvements to Python install messaging
# 139, 140, 141
## v139, 140, 141
No user-facing changes, documenting for version clarity
# 138 (2018-08-01)
## v138 (2018-08-01)
Use stack image SQLite3 instead of vendoring
# 137 (2018-07-17)
## v137 (2018-07-17)
Prevent 3.7.0 from appearing as unsupported in buildpack messaging.
# 136 (2018-06-28)
## v136 (2018-06-28)
Upgrade to 3.6.6 and support 3.7.0 on all runtimes.
# 135 (2018-05-29)
## v135 (2018-05-29)
Upgrade Pipenv to v2018.5.18.
# 134 (2018-05-02)
## v134 (2018-05-02)
Default to 3.6.5, bugfixes.
# 133
## v133
Fixes for Pip 10 release.
# 132
## v132
Improve pip installation, with the release of v9.0.2.
# 131
## v131
Fix bug with pip.
# 130
## v130
Better upgrade strategy for pip.
# 129
## v129
Don't upgrade pip (from v128).
# 128
## v128
Upgrade pip, pin to Pipenv v11.8.2.
# 127
## v127
Pin to Pipenv v11.7.1.
# 126
## v126
Bugfixes.
# 125
## v125
Bugfixes.
# 124
## v124
Update buildpack to automatically install `[dev-packages]` during Heroku CI Pipenv builds.
@@ -239,101 +246,101 @@ Update buildpack to automatically install `[dev-packages]` during Heroku CI Pipe
- No longer warn if there is no `Procfile`.
- Update Pipenv's "3.6" runtime specifier to point to "3.6.4".
# 123
## v123
Update gunicorn `init.d` script to allow overrides.
# 122
## v122
Update default Python to v3.6.4.
# 121
## v121
Update default Python to v3.6.3.
# 120
## v120
Use `$ pipenv --deploy`.
# 119
## v119
Improvements to Pipenv support, warning on unsupported Python versions.
- We now warn when a user is not using latest 2.x or 3.x Python.
- Heroku now supports `[requires]` `python_full_version` in addition to `python_version`.
# 118
## v118
Improvements to Pipenv support.
# 117
## v117
Bug fix.
# 116
## v116
Vendoring improvements.
- Geos libraries should work on Heroku-16 now.
- The libffi/libmemcached vendoring step is now skipped on Heroku-16 (since they are installed in the base image).
# 115
## v115
Revert a pull request.
- No longer using `sub_env` for `pip install` step.
# 114
## v114
- Bugfixes.
Blacklisting `PYTHONHOME` and `PYTHONPATH` for older apps. Upgrades to nltk support.
# 113
## v113
Updates to Pipenv support.
# 112
## v112
Bugfix.
- Fixed grep output bug.
# 111
## v111
Linting, bugfixes.
# 110
## v110
Update default Python to 3.6.2.
# 109
## v109
Update Default Python to 3.6.1, bugfixes.
- Fixed automatic pip uninstall of dependencies removed from requirements.txt.
# 108
## v108
Fix output for collectstatic step.
# 107
## v107
Bugfix for C dependency installation.
# 106
## v106
Don't install packages that could mess up packaging.
Don't install packages that could mess up packaging.
- The Python buildpack will automatically remove `six`, `pyparsing`, `appdirs`,
`setuptools`, and `distribute` from a `requirements.txt` file now, as these
packages are provided by the Python buildpack.
# 105
## v105
Improvements to output messaging.
Improvements to output messaging.
# 104
## v104
General improvements.
@@ -343,52 +350,52 @@ General improvements.
[395]: https://github.com/heroku/heroku-buildpack-python/pull/395
## 103
## v103
Bug fixes and improvements.
- Fix for Pipenv.
- Fix for Heroku CI.
- Improve handling of WEB_CONCURRENCY when using multiple buildpacks.
- Adjust environment variables set during the build to more closely match those in the dyno environment (DYNO is now available, STACK is not).
- Improve handling of `WEB_CONCURRENCY` when using multiple buildpacks.
- Adjust environment variables set during the build to more closely match those in the dyno environment (`DYNO` is now available, `STACK` is not).
- Restore the build cache prior to running bin/pre_compile.
## 102
## v102
Buildpack code cleanup.
- Improved messaging around NLTK.
## 101
## v101
Updated setuptools installation method.
- Improved pipenv support.
## 100
## v100
Preliminary pipenv support.
## 99
## v99
Cleanup.
## 98
## v98
Official NLTK support and other improvements.
- Support for `nltk.txt` file for declaring corpora to be downloaded.
- Leading zeros for auto-set WEB_CONCURRENCY.
- Leading zeros for auto-set `WEB_CONCURRENCY`.
## 97
## v97
Improved egg-link functionality.
## 96
## v96
Bugfix.
## 95
## v95
Improved output support.
@@ -424,7 +431,7 @@ Fixed bug with editable pip installations.
Updated default Python 2.7.13.
- Python 2.7.13 uses UCS-4 build, more compatibile with linux wheels.
- Python 2.7.13 uses UCS-4 build, more compatible with linux wheels.
- Updated setuptools to v32.1.0.
## v86
@@ -450,7 +457,7 @@ Support for Heroku CI.
## v82 (2016-08-22)
Update to library detection mechnisms (pip-pop).
Update to library detection mechanisms (pip-pop).
- Updated setuptools to v25.5.0
@@ -524,7 +531,7 @@ Revert to v66.
## v68 (2015-10-12)
Fixed .heroku/venv error with modern apps.
Fixed `.heroku/venv` error with modern apps.
## v67 (2015-10-12)
@@ -549,7 +556,6 @@ Updated Pip and Setuptools.
- Setuptools updated to v18.3.2
- Pip updated to v7.1.2
## v62 (2015-08-07)
Updated Pip and Setuptools.
+2 -2
View File
@@ -2,7 +2,7 @@
# Heroku Buildpack: Python
[![Build Status](https://travis-ci.org/heroku/heroku-buildpack-python.svg?branch=master)](https://travis-ci.org/heroku/heroku-buildpack-python)
[![Build Status](https://travis-ci.com/heroku/heroku-buildpack-python.svg?branch=main)](https://travis-ci.com/heroku/heroku-buildpack-python)
This is the official [Heroku buildpack](https://devcenter.heroku.com/articles/buildpacks) for Python apps.
@@ -16,7 +16,7 @@ See it in Action
$ ls
my-application requirements.txt runtime.txt
$ git push heroku master
$ git push heroku main
Counting objects: 4, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
+4
View File
@@ -137,6 +137,10 @@ export LIBRARY_PATH=/app/.heroku/vendor/lib:/app/.heroku/python/lib:$LIBRARY_PAT
export LD_LIBRARY_PATH=/app/.heroku/vendor/lib:/app/.heroku/python/lib:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=/app/.heroku/vendor/lib/pkg-config:/app/.heroku/python/lib/pkg-config:$PKG_CONFIG_PATH
# Global pip options (https://pip.pypa.io/en/stable/user_guide/#environment-variables).
# Disable pip's warnings about EOL Python since we show our own.
export PIP_NO_PYTHON_VERSION_WARNING=1
# The Application Code
# --------------------
+9 -3
View File
@@ -137,14 +137,20 @@ fi
set -e
PIP_VERSION='20.0.2'
SETUPTOOLS_VERSION='39.0.1'
PIP_VERSION='20.1.1'
# Must use setuptools <47.2.0 until we fix:
# https://github.com/heroku/heroku-buildpack-python/issues/1006
SETUPTOOLS_VERSION='47.1.1'
WHEEL_VERSION='0.34.2'
if [[ "${PYTHON_VERSION}" == ${PY34}* ]]; then
# Python 3.4 support was dropped in pip 19.2+ and wheel 0.34.0+.
# Python 3.4 support was dropped in pip 19.2+, setuptools 44+ and wheel 0.34+.
PIP_VERSION='19.1.1'
SETUPTOOLS_VERSION='43.0.0'
WHEEL_VERSION='0.33.6'
elif [[ "${PYTHON_VERSION}" == ${PY27}* || "${PYTHON_VERSION}" == ${PYPY27}* ]]; then
# Python 2.7 support was dropped in setuptools 45+.
SETUPTOOLS_VERSION='44.1.1'
fi
# We don't use get-pip.py, since:
+4 -4
View File
@@ -14,9 +14,9 @@ case "$choice" in
* ) exit 1;;
esac
originMaster=$(git rev-parse origin/master)
echo "Tagging commit $originMaster with $newVersion... "
git tag "$newVersion" "${originMaster:?}"
originMain=$(git rev-parse origin/main)
echo "Tagging commit $originMain with $newVersion... "
git tag "$newVersion" "${originMain:?}"
git push origin refs/tags/$newVersion
heroku buildpacks:publish "$BP_NAME" "$newVersion"
@@ -31,7 +31,7 @@ if [ $(git tag | grep -q latest-version) ]; then
echo "Updating latest-version tag"
git tag -d latest-version
git push origin :latest-version
git tag latest-version "${originMaster:?}"
git tag latest-version "${originMain:?}"
git push --tags
fi
+2 -1
View File
@@ -44,7 +44,7 @@ testStandardRequirements() {
testPipenv() {
compile "pipenv"
assertCaptured "Installing pip 9.0.2, setuptools 39.0.1 and wheel 0.34.2"
assertCaptured "Installing pip 9.0.2, setuptools 47.1.1 and wheel 0.34.2"
assertCapturedSuccess
}
@@ -108,6 +108,7 @@ testHooks() {
LIBRARY_PATH
OLDPWD
PATH
PIP_NO_PYTHON_VERSION_WARNING
PKG_CONFIG_PATH
PROFILE_PATH
PWD
+9 -9
View File
@@ -9,7 +9,7 @@ testPythonDefault() {
compile "pythonDefault"
assertCaptured $DEFAULT_PYTHON_VERSION
assertNotCaptured "security update"
assertCaptured "Installing pip 20.0.2, setuptools 39.0.1 and wheel 0.34.2"
assertCaptured "Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2"
assertCaptured "Installing SQLite3"
assertCapturedSuccess
}
@@ -25,7 +25,7 @@ testPython2() {
assertNotCaptured "python-2-7-eol-faq";
fi
assertNotCaptured "security update"
assertCaptured "Installing pip 20.0.2, setuptools 39.0.1 and wheel 0.34.2"
assertCaptured "Installing pip 20.1.1, setuptools 44.1.1 and wheel 0.34.2"
assertCaptured "Installing SQLite3"
assertCapturedSuccess
}
@@ -53,7 +53,7 @@ testPython3_4() {
compile "python3_4"
assertCaptured $LATEST_34
assertNotCaptured "security update"
assertCaptured "Installing pip 19.1.1, setuptools 39.0.1 and wheel 0.33.6"
assertCaptured "Installing pip 19.1.1, setuptools 43.0.0 and wheel 0.33.6"
# if cedar 14 and legacy binaries, fail. if cedar 14 and staging, succeed.
if [[ ! -n $USE_STAGING_BINARIES ]] && [[ $STACK == "cedar-14" ]]; then
assertCapturedError
@@ -89,7 +89,7 @@ testPython3_5() {
compile "python3_5"
assertCaptured $LATEST_35
assertNotCaptured "security update"
assertCaptured "Installing pip 20.0.2, setuptools 39.0.1 and wheel 0.34.2"
assertCaptured "Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2"
assertCaptured "Installing SQLite3"
assertCapturedSuccess
}
@@ -112,7 +112,7 @@ testPython3_6() {
compile "python3_6"
assertCaptured $LATEST_36
assertNotCaptured "security update"
assertCaptured "Installing pip 20.0.2, setuptools 39.0.1 and wheel 0.34.2"
assertCaptured "Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2"
assertCaptured "Installing SQLite3"
assertCapturedSuccess
}
@@ -139,7 +139,7 @@ testPython3_7() {
else
assertNotCaptured "security update"
assertCaptured $LATEST_37
assertCaptured "Installing pip 20.0.2, setuptools 39.0.1 and wheel 0.34.2"
assertCaptured "Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2"
assertCaptured "Installing SQLite3"
assertCapturedSuccess
fi
@@ -183,7 +183,7 @@ testPython3_8() {
else
assertNotCaptured "security update"
assertCaptured $LATEST_38
assertCaptured "Installing pip 20.0.2, setuptools 39.0.1 and wheel 0.34.2"
assertCaptured "Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2"
assertCaptured "Installing SQLite3"
assertCapturedSuccess
fi
@@ -202,7 +202,7 @@ testPypy3_6() {
else
assertCaptured "Installing pypy"
assertCaptured "$PYPY_36"
assertCaptured "Installing pip 20.0.2, setuptools 39.0.1 and wheel 0.34.2"
assertCaptured "Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2"
assertCapturedSuccess
fi
}
@@ -214,7 +214,7 @@ testPypy2_7() {
else
assertCaptured "Installing pypy"
assertCaptured "$PYPY_27"
assertCaptured "Installing pip 20.0.2, setuptools 39.0.1 and wheel 0.34.2"
assertCaptured "Installing pip 20.1.1, setuptools 44.1.1 and wheel 0.34.2"
assertCapturedSuccess
fi
}