Skip to content

Commit

Permalink
chore(ci): bump minimum python to 3.8
Browse files Browse the repository at this point in the history
Python 3.7 is no longer maintained and various deps (e.g., numpy)
contain CVEs at the last version supported on 3.7. Bump the minimum to
3.8 to avoid this CVE being detected in the build.

Signed-off-by: Dominic Evans <[email protected]>
  • Loading branch information
dnwe committed Nov 22, 2023
1 parent 6066b50 commit 9ba64a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
9 changes: 4 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
language: python
dist: focal
git:
depth: false
services:
Expand All @@ -17,12 +18,10 @@ deploy:
repo: IBM/detect-secrets
matrix:
include:
- env: TOXENV=py37
python: 3.7.13
dist: xenial # Required for Python >= 3.7 (travis-ci/travis-ci#9069), the GitHub Travis build will use Python 3.7.1 by default if you provide 3.7 without a patch version and the build will fail with AttributeError: 'str' object has no attribute 'name'
- env: TOXENV=py38
python: 3.8
dist: xenial # Required for Python >= 3.7 (travis-ci/travis-ci#9069)
python: 3.8.18
- env: TOXENV=py39
python: 3.9.18
before_install:
- echo -e "machine github.com\n login $GH_ACCESS_TOKEN" >> ~/.netrc # Login to GitHub
- echo -e "machine github.ibm.com\n login $GHE_ACCESS_TOKEN" >> ~/.netrc # Login to GitHub Enterprise
Expand Down
10 changes: 1 addition & 9 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
project = detect_secrets
# These should match the travis env list
envlist = py{36,37,38,39}
envlist = py{38,39}
skip_missing_interpreters = true
# disabling this option until latest venv-update version is compatible with pip v21
# tox_pip_extensions_ext_venv_update = true
Expand All @@ -18,14 +18,6 @@ commands =
coverage report --show-missing --include=detect_secrets/* --fail-under 97
pre-commit run --all-files --show-diff-on-failure

[testenv:py37]
commands =
coverage erase
coverage run -m pytest tests
coverage report --show-missing --include=tests/* --fail-under 100
coverage report --show-missing --include=detect_secrets/* --fail-under 97
# Skip pre-commit hook for py37 since flake8 requires Python >= 3.8.1.

[testenv:venv]
envdir = venv
commands =
Expand Down

0 comments on commit 9ba64a9

Please sign in to comment.