diff --git a/.changes/unreleased/Under the Hood-20230530-161341.yaml b/.changes/unreleased/Under the Hood-20230530-161341.yaml new file mode 100644 index 000000000..31acaf121 --- /dev/null +++ b/.changes/unreleased/Under the Hood-20230530-161341.yaml @@ -0,0 +1,6 @@ +kind: Under the Hood +body: remove support for python 3.7 +time: 2023-05-30T16:13:41.217839-05:00 +custom: + Author: McKnight-42 + Issue: "638" diff --git a/.github/scripts/integration-test-matrix.js b/.github/scripts/integration-test-matrix.js index 75e6c50d9..a8fadc95a 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"]; + const supportedPythonVersions = ["3.8", "3.9"]; const supportedAdapters = ["snowflake"]; // if PR, generate matrix based on files changed and PR labels diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 93e1c1108..a66b3ef9c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -72,7 +72,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.7, 3.8] # TODO: support unit testing for python 3.9 (https://github.com/dbt-labs/dbt/issues/3689) + python-version: [3.8, 3.9] env: TOXENV: "unit" @@ -169,7 +169,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: [3.7, 3.8, 3.9] + python-version: [3.8, 3.9] steps: - name: Set up Python ${{ matrix.python-version }} diff --git a/CONTRIBUTING.MD b/CONTRIBUTING.MD index fdfd78132..faf428ad3 100644 --- a/CONTRIBUTING.MD +++ b/CONTRIBUTING.MD @@ -79,7 +79,7 @@ WARNING: The parameters in your `test.env` file must link to a valid Snowflake a There are a few methods for running tests locally. #### `tox` -`tox` automatically runs unit tests against several Python versions using its own virtualenvs. Run `tox -p` to run unit tests for Python 3.7, Python 3.8, Python 3.9, and `flake8` in parallel. Run `tox -e py37` to invoke tests on Python version 3.7 only (use py37, py38, or py39). Tox recipes are found in `tox.ini`. +`tox` automatically runs unit tests against several Python versions using its own virtualenvs. Run `tox -p` to run unit tests for Python 3.8, Python 3.9, and `flake8` in parallel. Run `tox -e py38` to invoke tests on Python version 3.8 only (use py38, or py39). Tox recipes are found in `tox.ini`. #### `pytest` You may run a specific test or group of tests using `pytest` directly. Activate a Python virtualenv active with dev dependencies installed. Then, run tests like so: diff --git a/setup.py b/setup.py index c6fbace2d..1421d41df 100644 --- a/setup.py +++ b/setup.py @@ -3,10 +3,10 @@ import sys import re -# require python 3.7 or newer -if sys.version_info < (3, 7): +# require python 3.8 or newer +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) @@ -76,9 +76,8 @@ 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", ], - python_requires=">=3.7", + python_requires=">=3.8", ) diff --git a/tox.ini b/tox.ini index 07c7436a9..5c6ae7041 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] skipsdist = True -envlist = py37,py38,py39 +envlist = py38,py39 [testenv:{unit,py37,py38,py39,py}] description = unit testing @@ -13,7 +13,7 @@ deps = -rdev-requirements.txt -e. -[testenv:{integration,py37,py38,py39,py}-{snowflake}] +[testenv:{integration,py38,py39,py}-{snowflake}] description = adapter plugin integration testing skip_install = true passenv =