From bc8b4a4a3eff0b4a0f0e1a760c35f6e26e4bde21 Mon Sep 17 00:00:00 2001 From: leahwicz <60146280+leahwicz@users.noreply.github.com> Date: Tue, 27 Jun 2023 20:06:15 -0400 Subject: [PATCH] Drop support for py37 (#742) (#795) * drop support for py37 * drop support for py37 * drop support for py37 Co-authored-by: Mike Alfare <13974384+mikealfare@users.noreply.github.com> --- .changes/unreleased/Breaking Changes-20230530-174051.yaml | 6 ++++++ .github/scripts/integration-test-matrix.js | 2 +- .github/workflows/main.yml | 4 ++-- CONTRIBUTING.md | 2 +- setup.py | 5 ++--- tox.ini | 6 +++--- 6 files changed, 15 insertions(+), 10 deletions(-) create mode 100644 .changes/unreleased/Breaking Changes-20230530-174051.yaml diff --git a/.changes/unreleased/Breaking Changes-20230530-174051.yaml b/.changes/unreleased/Breaking Changes-20230530-174051.yaml new file mode 100644 index 000000000..c4d90db97 --- /dev/null +++ b/.changes/unreleased/Breaking Changes-20230530-174051.yaml @@ -0,0 +1,6 @@ +kind: Breaking Changes +body: Drop support for python 3.7 +time: 2023-05-30T17:40:51.510639-04:00 +custom: + Author: mikealfare + Issue: dbt-labs/dbt-core/7082 diff --git a/.github/scripts/integration-test-matrix.js b/.github/scripts/integration-test-matrix.js index 1e3bb0f0d..5ca2e88eb 100644 --- a/.github/scripts/integration-test-matrix.js +++ b/.github/scripts/integration-test-matrix.js @@ -1,6 +1,6 @@ module.exports = ({ context }) => { const defaultPythonVersion = "3.8"; - const supportedPythonVersions = ["3.7", "3.8", "3.9", "3.10"]; + const supportedPythonVersions = ["3.8", "3.9", "3.10"]; const supportedAdapters = ["bigquery"]; // if PR, generate matrix based on files changed and PR labels diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b464f61f4..93713b594 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -71,7 +71,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] + python-version: ['3.8', '3.9', '3.10'] env: TOXENV: "unit" @@ -174,7 +174,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ['3.7', '3.8', '3.9', '3.10'] + python-version: ['3.8', '3.9', '3.10'] steps: - name: Set up Python ${{ matrix.python-version }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9b765784e..89b833de0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -67,7 +67,7 @@ $EDITOR test.env There are a few methods for running tests locally. #### `tox` -`tox` takes care of managing Python virtualenvs and installing dependencies in order to run tests. You can also run tests in parallel, for example you can run unit tests for Python 3.7, Python 3.8, Python 3.9, and `flake8` checks in parallel with `tox -p`. Also, you can run unit tests for specific python versions with `tox -e py37`. The configuration of these tests are located in `tox.ini`. +`tox` takes care of managing Python virtualenvs and installing dependencies in order to run tests. You can also run tests in parallel, for example you can run unit tests for Python 3.8, Python 3.9, Python 3.10, and `flake8` checks in parallel with `tox -p`. Also, you can run unit tests for specific python versions with `tox -e py38`. The configuration of these tests are located in `tox.ini`. #### `pytest` Finally, you can also run a specific test or group of tests using `pytest` directly. With a Python virtualenv active and dev dependencies installed you can do things like: diff --git a/setup.py b/setup.py index 22c08252d..24b91844d 100644 --- a/setup.py +++ b/setup.py @@ -4,9 +4,9 @@ import re # require python 3.7 or newer -if sys.version_info < (3, 7): +if sys.version_info < (3, 8): print("Error: dbt does not support this version of Python.") - print("Please upgrade to Python 3.7 or higher.") + print("Please upgrade to Python 3.8 or higher.") sys.exit(1) @@ -82,7 +82,6 @@ def _get_dbt_core_version(): "Operating System :: Microsoft :: Windows", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX :: Linux", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", diff --git a/tox.ini b/tox.ini index de228d534..0496edff4 100644 --- a/tox.ini +++ b/tox.ini @@ -1,8 +1,8 @@ [tox] skipsdist = True -envlist = py37,py38,py39,py310 +envlist = py38,py39,py310 -[testenv:{unit,py37,py38,py39,py310,py}] +[testenv:{unit,py38,py39,py310,py}] description = unit testing skip_install = true passenv = @@ -13,7 +13,7 @@ deps = -rdev-requirements.txt -e. -[testenv:{integration,py37,py38,py39,py310,py}-{bigquery}] +[testenv:{integration,py38,py39,py310,py}-{bigquery}] description = adapter plugin integration testing skip_install = true passenv =