From 3d242adeb89b6385e8aadbcaac9a85707ff737eb Mon Sep 17 00:00:00 2001 From: Dominic Evans Date: Wed, 22 Nov 2023 23:02:28 +0000 Subject: [PATCH] chore(ci): bump minimum python to 3.8 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. --- .travis.yml | 9 ++++----- tox.ini | 10 +--------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index fdc1d2cf9..e91b83993 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ language: python +dist: focal git: depth: false services: @@ -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 diff --git a/tox.ini b/tox.ini index 615518d47..e7be28dec 100644 --- a/tox.ini +++ b/tox.ini @@ -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 @@ -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 =