2032 Commits

Author SHA1 Message Date
Ed Morley dfbe8ddaf5 Release v177 (#1055)
Closes @W-7975422@.
v177
2020-08-18 12:50:17 +01:00
Ed Morley 60b9d1a562 Add support for Python 3.6.12 and 3.7.9 (#1054)
Since they were released yesterday:
https://www.python.org/downloads/release/python-3612/
https://www.python.org/downloads/release/python-379/

Closes @W-7975179@.
Closes @W-7975181@.
2020-08-18 12:38:54 +01:00
Ed Morley 3fa3f15d35 Remove unnecessary date conditional for Python 2 EOL warning (#1053)
Since we're past the end of 2019, so the conditional is always true.

Closes @W-7952394@.

[skip changelog]
2020-08-12 22:49:31 +01:00
Ed Morley a510c47b26 Make etc/publish.sh executable (#1052)
Since otherwise:

```
$ ./etc/publish.sh
-bash: ./etc/publish.sh: Permission denied
```

Closes @W-7952258@.

[skip changelog]
2020-08-12 22:48:59 +01:00
Ed Morley 1972e6094e Travis: Switch to Ubuntu 20.04 base image (#1051)
Since it's a smaller, more up to date image, with fewer services
starting at boot, improving start times:
https://blog.travis-ci.com/2020-08-10-focal-build-environment
https://docs.travis-ci.com/user/reference/focal/

Closes @W-7951908@.

[skip changelog]
2020-08-12 22:48:48 +01:00
Ed Morley 84ac34b1d4 Release v176 (#1050) v176 2020-08-12 16:17:33 +01:00
Ed Morley 7c4f55bc32 Switch the remaining build formulas to the shared script approach (#1049)
To be consistent with the other build formulas after #799.

Refs @W-7947035@.

[skip changelog]
2020-08-12 15:19:53 +01:00
Ed Morley eabe71d578 Update the Python 3.4.10 build script to use the correct Python version (#1048)
The existing Python 3.4.10 archive actually contained Python 3.7.2,
since the version in the source URL was not updated when the file was
created in #813.

The build formula now uses the shared build script approach like all of
the other build scripts, which ensures the version can never get out of
sync (since it's extracted from the formula filename).

The build for Heroku-18 failed to compile `_ssl` properly (even though
the build exited zero) since Python 3.4.10 is old enough it doesn't work
well with libssl1.1. Installing `libssl1.0-dev` in the build image
locally resolved the issue - however we don't want to use that in the
future for newer Python, so I've not updated the `heroku-18.Dockerfile`.

In addition, with the rebuilt archives the tests now pass on Cedar-14,
so no longer need to be marked as failing.

Closes @W-7947035@.
2020-08-12 15:19:31 +01:00
Ed Morley 95fca53d38 Travis: Correctly skip Hatchet on PRs from forks (#1045)
The Hatchet run requires a valid Heroku login, the credentials for which
are set via Travis secure environment variables, which by design are not
revealed to PRs from forks.

The previous conditional wasn't working as intended - the Hatchet job
was still being triggered for forks from PRs.

The new conditional fixes this, and also means that forks could set
their own credentials via Travis environment variables if they wanted
a way to run the tests in CI on their own repo.

See:
https://docs.travis-ci.com/user/conditions-v1

Fixes #1019.
Closes @W-7918482@.

[skip changelog]
2020-08-12 11:17:38 +01:00
Ed Morley ff4f677435 Travis: Remove Hatchet credentials from .travis.yml (#1047)
Since they are now set via the Travis repository level secrets feature
instead. This both works around the Travis bug seen in #1045, and also
means its easier to set up Travis on forks, since otherwise the
`.travis.yml` secrets would overwrite the global secrets.

As part of this move the test account used has also been changed, and
will be documented here:
https://github.com/heroku/languages-team/blob/main/guides/create_test_users_for_ci.md#known-usernames

Closes @W-7949880@.

[skip changelog]
2020-08-12 10:49:57 +01:00
Ed Morley cba3201ac2 Rename confusing PYPY_* variables (#1044)
Since these variables refer to the latest version of PyPy, compared to
the similarly named `PYPY27` and `PYPY36` variables (ie same name except
without the underscore) which refer to the major/minor version only.

The similar names caused me to use the wrong one locally whilst working
on another PR, which was caught by tests but demonstrates why we should
rename them.

Closes @W-7935256@.

[skip changelog]
2020-08-11 19:31:53 +01:00
Ed Morley ac29db32f8 Remove unused vendor/test-utils (#1043)
Since the unit tests instead use the utilities in this separate file:
https://github.com/heroku/heroku-buildpack-python/blob/419ef479969c4d5945f2c0620292229ef464f4c8/test/utils

A changelog entry has been added since whilst this file is for internal
testing only, the buildpack's `vendor/` directory is put on `PATH`, so
in theory it could have been called outside the buildpack (though this
seems extremely unlikely since the script isn't very useful externally).

Fixes #1027.
Closes @W-7918496@.
2020-08-11 19:31:07 +01:00
Ed Morley e83576f6b4 Remove unused .pre-commit-config.yaml (#1042)
Since we don't use that tool (<https://pre-commit.com>), and there are
better alternatives should we want to expand coverage of these kind of
things.

Closes @W-7923935@.

[skip changelog]
2020-08-11 19:21:40 +01:00
Ed Morley 43600f25a5 Remove unused etc/ci-setup.sh (#1041)
It stopped being used as of #781.

```
$ rg ci-setup.sh --stats
0 matches

$ git-content-search ci-setup.sh
e7da63f update to newer hatchet integration
M      .travis.yml
576def4 fix travis dependency blocker
M      .travis.yml

$ git show e7da63f | rg ci-setup.sh -C 1
-before_install:
- - sudo bash etc/ci-setup.sh
+ - bundle exec hatchet ci:setup
```

Hatchet embeds its own setup script, which is called via the rake task:
https://github.com/heroku/hatchet/blob/v6.0.0/etc/ci_setup.rb

Closes @W-7923930@.

[skip changelog]
2020-08-11 19:21:03 +01:00
Ed Morley f508bd538d Fix the security update version check message for PyPy (#1040)
Previously if an app was using an older version of PyPy, the buildpack
would show a confusing "Could not find that version" message (even
though the version was found), when it really meant to warn about there
being a newer release available.

It looks like the version check messages were perhaps copied and pasted
from something else, but the message wording not updated at the time.

I've also added tests since there were none for this feature.

Fixes #1004.
Closes @W-7918745@.
2020-08-11 19:15:16 +01:00
Richard Schneeman bc7e34dbad Tests: Update Hatchet from 6.0.0 to 7.0.0 (#1046)
- ActiveSupport's Object#blank? and Object#present? are no longer provided by default (https://github.com/heroku/hatchet/pull/107)
- Remove deprecated support for passing a block to `App#run` (https://github.com/heroku/hatchet/pull/105)
- Ignore  403 on app delete due to race condition (https://github.com/heroku/hatchet/pull/101)
- The hatchet.lock file can now be locked to "main" in addition to "master" (https://github.com/heroku/hatchet/pull/86)
- Allow concurrent one-off dyno runs with the `run_multi: true` flag on apps (https://github.com/heroku/hatchet/pull/94)
- Apps are now marked as being "finished" by enabling maintenance mode on them when `teardown!` is called. Finished apps can be reaped immediately (https://github.com/heroku/hatchet/pull/97)
- Applications that are not marked as "finished" will be allowed to live for a HATCHET_ALIVE_TTL_MINUTES duration before they're deleted by the reaper to protect against deleting an app mid-deploy, default is seven minutes (https://github.com/heroku/hatchet/pull/97)
- The HEROKU_APP_LIMIT env var no longer does anything, instead hatchet application reaping is manually executed if an app cannot be created (https://github.com/heroku/hatchet/pull/97)
- App#deploy without a block will no longer run `teardown!` automatically (https://github.com/heroku/hatchet/pull/97)
- Calls to `git push heroku` are now rate throttled (https://github.com/heroku/hatchet/pull/98)
- Calls to `app.run` are now rate throttled (https://github.com/heroku/hatchet/pull/99)
- Deployment now raises and error when the release failed (https://github.com/heroku/hatchet/pull/93)

[skip changelog]
2020-08-11 19:06:18 +01:00
dependabot[bot] 419ef47996 Bump bob-builder from 0.0.17 to 0.0.18 (#1039)
Bumps [bob-builder](https://github.com/heroku-python/bob-builder) from 0.0.17 to 0.0.18.
- [Release notes](https://github.com/heroku-python/bob-builder/releases)
- [Commits](https://github.com/heroku-python/bob-builder/compare/v0.0.17...v0.0.18)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-10 14:25:42 +01:00
dependabot[bot] c1f6679dd7 Bump boto from 2.48.0 to 2.49.0 (#1038)
Bumps [boto](https://github.com/boto/boto) from 2.48.0 to 2.49.0.
- [Release notes](https://github.com/boto/boto/releases)
- [Commits](https://github.com/boto/boto/compare/2.48.0...2.49.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-10 13:11:48 +01:00
Ed Morley de81e41336 Add config file for Dependabot (#1037)
GitHub are gradually integrating Dependabot into GitHub as a native
feature. The native integration now supports updating not only security
updates, but all dependencies - however this must be explicitly enabled
by adding a config file:
https://docs.github.com/en/github/administering-a-repository/enabling-and-disabling-version-updates

The config options are described here:
https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates

Closes @W-7937066@.

[skip changelog]
2020-08-10 12:30:32 +01:00
Ed Morley 99c1027cb2 Tests: Update Hatchet dependencies (#1036)
* `bundler update`
* Ruby 2.6 -> 2.7
* Remove unnecessary bundler version downgrade

Of note this picks up:
https://github.com/grosser/parallel_split_test/pull/20

@W-7930909@

[skip changelog]
2020-08-10 11:29:34 +01:00
Ed Morley 46d3d2b042 Travis: Move hatchet ci:setup to before_script (#1035)
So that any failures during `hatchet ci:setup` cause the build to fail
early, rather than try to proceed with running the Hatchet tests.

@W-7929878@

[skip changelog]
2020-08-07 17:53:33 +01:00
Ed Morley 7b4f16145b Add a configuration file for Git2Gus (#1034)
This will allow for one-way sync of GitHub issues in this repository
into our internal issues tracker, GUS. Issues are only synced when the
specified GitHub label is added.

In the future I may switch the chosen label to just be the standard
`t: bug` type labels, but for now I'm choosing a separate label so that
we have more control over what is synced.

See:
https://lwc-gus-bot.herokuapp.com/#getting-started

@W-7918433@
2020-08-05 10:48:25 +01:00
Ed Morley a165deadfb Release v175 (#1032) v175 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
Ed Morley d74880b322 Release v174 (#1023) v174 2020-07-30 09:15:44 +01:00
Ed Morley 00e70fffc9 Correctly handle failed pip/setuptools/wheel installs (#1007)
They are now displayed in the build output (instead of being sent to
`/dev/null`) and fail the build early instead of failing later in
`bin/steps/pip-install`.

Fixes #1002.
2020-07-29 19:11:35 +01:00
Ed Morley 60f2fac8e1 Disable pip's version check + cache when installing pip/setuptools/wheel (#1007)
Since the version check is redundant given we control/choose the version.

The pip cache is redundant since we instead cache site-packages. The pip
cache also ends up in `/app` so isn't included in the build cache anyway.
2020-07-29 19:11:35 +01:00
Ed Morley 405c7651ea Install pip using itself rather than get-pip.py (#1007)
`get-pip.py` is no longer used, since:
- It uses `--force-reinstall`, which is unnecessary here and slows down
  repeat builds (given we call pip install every time now). Trying to
  work around this by using `get-pip.py` only for the initial install,
  and real pip for subsequent updates would mean we lose protection
  against cached broken installs, plus significantly increase the
  version combinations test matrix.
- It means downloading pip twice (once embedded in `get-pip.py`, and
  again during the install, since `get-pip.py` can't install the
  embedded version directly).
- We would still have to manage several versions of `get-pip.py`, to
  support older Pythons (once we upgrade to newer pip).

We don't use `ensurepip` since:
- not all of the previously generated Python runtimes on S3 include it.
- we would still have to upgrade pip/setuptools afterwards.
- the versions of pip/setuptools bundled with ensurepip differ greatly
  depending on Python version, and we could easily start using a CLI
  flag for the first pip install before upgrade that isn't supported on
  all versions, without even knowing it (unless we test against hundreds
  of Python archives).

Instead we install pip using itself in wheel form. See:
https://github.com/pypa/pip/issues/2351#issuecomment-69994524

The new pip wheel assets on S3 were generated using:

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

$ pip download --no-cache pip==20.0.2
Collecting pip==20.0.2
  Downloading pip-20.0.2-py2.py3-none-any.whl (1.4 MB)
  Saved ./pip-20.0.2-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-19.1.1-py2.py3-none-any.whl to s3://lang-python/common/pip-19.1.1-py2.py3-none-any.whl
(dryrun) upload: ./pip-20.0.2-py2.py3-none-any.whl to s3://lang-python/common/pip-20.0.2-py2.py3-none-any.whl

$ aws s3 sync . s3://lang-python/common/ --exclude "*" --include "*.whl" --acl public-read
upload: ./pip-19.1.1-py2.py3-none-any.whl to s3://lang-python/common/pip-19.1.1-py2.py3-none-any.whl
upload: ./pip-20.0.2-py2.py3-none-any.whl to s3://lang-python/common/pip-20.0.2-py2.py3-none-any.whl
```
2020-07-29 19:11:35 +01:00
Ed Morley 7279ddded8 Always check/adjust the installed versions of setuptools/wheel (#1007)
Previously the pip/setuptools/wheel install step was skipped so long
as Python hadn't just been clean installed (ie so long as not a new app,
emptied cache, Python upgrade, stack change) and pip was the expected
version.

This meant that setuptool/wheel could be the wrong version (or even just
not installed at all), and this would not be corrected.

Now, we now use pip itself to determine whether the installed packages
are up to date, since parsing pip's output is fragile (eg #1003) and
would be tedious given there would be three packages to check.

Unfortunately `get-pip.py` uses `--force-reinstall` which means
performing this step every time is not the no-op it would otherwise be,
but this will be resolved by switching away from `get-pip.py` in the
next commit.

Fixes #1000.
Fixes #1003.
Closes #999.
2020-07-29 19:11:35 +01:00
Ed Morley 0027f23065 Remove redundant site-packages cleanup steps (#1007)
Since `get-pip.py` / pip will automatically detect and remove old
pip/setuptools versions if needed, so removing them manually is both not
necessary and slows down the build in the case where the pip version
changed, but setuptools remained the same.
2020-07-29 19:11:35 +01:00
Ed Morley 2097eab028 Install an explicit version of wheel rather than latest (#1007)
Before:
- if `wheel` was not already installed, then `get-pip.py` would
  automatically install the latest version on PyPI, which is `0.34.2`
  (or `0.33.6` for Python 3.4).
- if `wheel` was already installed, then it was left unchanged
  regardless of the version installed.

Now:
- if `wheel` is not already installed, then the same versions will be
  installed as before, except these versions are pinned and will now not
  change unexpectedly after future `wheel` releases.
- if `wheel` is already installed, then it's upgraded/downgraded to the
  target version as needed.

Partly addresses #1000, though this change only helps builds where the
pip/setuptools/wheel install flow is triggered (currently only new apps
or ones where Python was purged or pip was not the correct version).

Since the wheel version is now known, it's output to the build log to
ease debugging and for parity with pip/setuptools.

The rest of #1000 will be fixed in later commits.
2020-07-29 19:11:35 +01:00
Ed Morley 46581612fc Install pip and setuptools in the same pip invocation (#1007)
`get-pip.py` installs setuptools itself (if it's not already installed):
https://pip.pypa.io/en/stable/installing/#installing-with-get-pip-py
https://github.com/pypa/get-pip/blob/eff16c878c7fd6b688b9b4c4267695cf1a0bf01b/templates/default.py#L152-L153

This means that previously the latest version of setuptools (currently
`49.2.0`) was being installed from PyPI, and then immediately after the
target version (currently `39.0.1`) installed over it.

This added time to the build unnecessarily.

The version of setuptools installed by `get-pip.py` can be overridden
by passing in a version as a normal requirements specifier.

Fixes #1001.
2020-07-29 19:11:35 +01:00
Ed Morley 31e8f48db8 Install setuptools from PyPI rather than a vendored copy (#1007)
Since:
* we'll be updating setuptools soon, and newer setuptools has dropped
  support for Python versions this buildpack needs to support. As such
  if we continued to vendor setuptools, we would need to vendor at
  least three different versions.
* we want to try and update setuptools more frequently than we have
  in the past, which will mean more repo bloat from binary churn.
* we're still pinning to a specific version, meaning vendoring doesn't
  have determinism benefits.
* setuptools is only fetched from PyPI for new installs (or where
  versions have changed), so this doesn't increase build time, load on
  PyPI, or reliance on PyPI in the common case.
* setuptools is already being inadvertently installed from PyPI prior to
  being installed from the vendored copy (see #1001), so we're in effect
  already using/depending on PyPI here.
* switching to storing setuptools on S3 wouldn't help reliability as
  much as it would appear at first glance, since the later `pip install`
  of customer dependencies will fail if PyPI is down anyway.
2020-07-29 19:11:35 +01:00
Ed Morley 47a8b4b3b9 Output the installed version of setuptools in the build log (#1007)
Since:
* "explicit is better than implicit"
* we'll soon be upgrading setuptools, and debugging breakage caused by
  upgrades will be easier if versions are visible in the build log
2020-07-29 19:11:35 +01:00
Ed Morley 4080587538 Move Pip version handling to bin/steps/python (#1007)
And use the `$PYTHON_VERSION` calculated in `bin/steps/python` instead
of re-implementing the Python version handling.
2020-07-29 19:11:35 +01:00
Ed Morley 157ce25694 Output the installed version of pip in the build log (#1007)
Since:
* "explicit is better than implicit"
* we'll soon be upgrading pip, and debugging breakage caused by upgrades
  will be easier if versions are visible in the build log

Closes #939.
2020-07-29 19:11:35 +01:00
Ed Morley e7c7dfdb26 Reduce the number of env vars exposed to subprocess (#1011)
The following env vars are no longer exposed to subprocesses run by the
buildpack (such as the `bin/pre_compile` and `bin/post_compile` hooks):

* `BPLOG_PREFIX`
* `CACHED_PYTHON_STACK`
* `DEFAULT_PYTHON_STACK`
* `DEFAULT_PYTHON_VERSION`
* `LATEST_27`
* `LATEST_34`
* `LATEST_35`
* `LATEST_36`
* `LATEST_37`
* `LATEST_38`
* `PIP_UPDATE`
* `PY27`
* `PY34`
* `PY35`
* `PY36`
* `PY37`
* `PYPY_27`
* `PYPY_36`
* `RECOMMENDED_PYTHON_VERSION`
* `WARNINGS_LOG`

There were previously no tests at all for the pre/post-compile hooks,
so I've added some now.

Fixes #1010.
2020-07-28 18:12:08 +01:00
Ed Morley aa8a0f43bb Travis: Reduce end to end testing time (#1022)
This change (along with #1021, which skips an unnecessary docker build)
reduces the wall clock time from ~22 minutes to ~6 minutes. Even with
the additional overhead from increased parallelism, the combined job
duration (~50 minutes) has not increased due to the other time savings.

Changes:

- for the unit tests, each stack is now tested in its own job and so
  tested in parallel
- the use of Travis stages has been removed, since by design it blocks
  later tasks on earlier stages having completed - reducing parallelism
  unnecessarily for this use case
- all jobs except for the Hatchet job now use Travis' `minimal` image,
  and no longer install redundant Ruby + bundler
- the `sudo: {required,false}` references have been removed, since
  Travis no longer supports its non-sudo container infrastructure so
  ignores that option

Fixes #1018.

[skip changelog]
2020-07-28 16:18:45 +01:00
Ed Morley 93a5b4021d Tests: Support running only a subset of the test suites (#1021)
Previously `make test` ran all unit test suites against all stacks, which
would take up to an hour locally. This could be sped up by using one of
the stack-specific targets (such as `make test-heroku-18`), however
there was still no way to only run one of the test suites.

Now `make test` can be controlled more precisely using optional `STACK`
and `TEST_CMD` arguments, eg:

`make test STACK=heroku-16 TEST_CMD=test/versions`

Travis has now been made to use this feature, which unblocks future
Travis speedups (such as splitting the jobs up further in #1018) and
means on Travis the correct Docker image is now used (see #958).

The `tests.sh` script has been removed since it's unused after #839 and
redundant given the make targets.

Fixes #958.
Fixes #1020.
2020-07-28 15:08:20 +01:00
Ed Morley f21e538fde Tests: Delete redundant detect(), compile() and release() (#1017)
Since they are all shadowed by functions with the same name later in
the file.

Fixes #1013.

[skip changelog]
2020-07-24 18:19:01 +01:00
Ed Morley a97da6382f Tests: Run detect/compile/release in a clean environment (#1016)
To prevent external environment variables from leaking into the tests,
which otherwise causes problems trying to write tests for #1011.

Several tests which were relying on this leak had to be fixed, so that
the env vars they were using are set using `ENV_DIR`, as happens in
production.

Fixes #1014.
Fixes #1015.
2020-07-24 18:10:11 +01:00
Ed Morley d9b1c73f63 Improve the Check Changelog GitHub action (#1009)
It now:
* uses the PR body rather than title for controlling whether to skip the
  check, to reduce PR title noise
* supports `[skip changelog]` in addition to `[changelog skip]`, since I
  could never remember which way around the words should go
* uses the GitHub `if` syntax with the `github` event context, which
  simplifies the implementation, means the action doesn't run steps like
  git checkout when it's going to be skipped anyway, and gives the
  status check the grey icon when skipped instead of the green check
* renames the inner job from `build` to `check`

The file has also been style-formatted using Prettier.

See:
https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idif
https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions
https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#pull_request

Example failing (since no skip syntax used):
https://github.com/heroku/heroku-buildpack-python/pull/1009/checks?check_run_id=906015118

Example skipped (since skip syntax used):
https://github.com/heroku/heroku-buildpack-python/pull/1009/checks?check_run_id=906022522
2020-07-24 10:34:27 +01:00
Ed Morley 7209bb4483 Remove get-pip.py reference from NOTICE (#1008)
Since `get-pip.py` is no longer distributed with the buildpack.

Leftover from #840.
2020-07-24 10:10:50 +01:00
Ed Morley 156b07ce2b Release v173 (#998) v173 2020-07-21 11:31:01 +01:00
Rust Saiargaliev e288ed5a9e Add support for CPython 3.8.5 (#996)
https://www.python.org/downloads/release/python-385/

Release contains a couple of security bugfixes.
Changelog: https://docs.python.org/release/3.8.5/whatsnew/changelog.html#changelog
2020-07-21 11:01:31 +01:00
Ed Morley 181e3395f9 Release v172 (#995) v172 2020-07-17 12:03:37 +01:00
Denis Cornehl 013ba6b1d9 Add support for Python 3.8.4 (#993) 2020-07-17 10:19:21 +01:00