From 54452f47c8ef0a574c41af82a03557803af7a446 Mon Sep 17 00:00:00 2001 From: Mike Alfare Date: Mon, 21 Oct 2024 15:14:49 -0400 Subject: [PATCH 1/2] drop support for python 3.8 --- .github/workflows/integration.yml | 6 ++---- .github/workflows/main.yml | 8 ++++---- .pre-commit-config.yaml | 1 - CONTRIBUTING.md | 2 +- Makefile | 12 ++++++------ setup.py | 7 +++---- tox.ini | 6 +++--- 7 files changed, 19 insertions(+), 23 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 9eca2c310..e83c4047c 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -68,10 +68,8 @@ jobs: max-parallel: 3 matrix: os: [ubuntu-22.04, macos-12, windows-2022] - python-version: ["3.8"] + python-version: ["3.9"] include: - - os: ubuntu-22.04 - python-version: "3.9" - os: ubuntu-22.04 python-version: "3.10" - os: ubuntu-22.04 @@ -168,7 +166,7 @@ jobs: fail-fast: false max-parallel: 1 matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11"] env: TOXENV: integration-redshift diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d6387ef30..3d1e56f31 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -50,7 +50,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.8' + python-version: '3.9' - name: Install python dependencies run: | @@ -70,7 +70,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.8', '3.9', '3.10', '3.11'] + python-version: ['3.9', '3.10', '3.11'] env: TOXENV: "unit" @@ -127,7 +127,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.8' + python-version: '3.9' - name: Install python dependencies run: | @@ -174,7 +174,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-22.04, macos-12, windows-2022] - python-version: ['3.8', '3.9', '3.10', '3.11'] + python-version: ['3.9', '3.10', '3.11'] steps: - name: Set up Python ${{ matrix.python-version }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 410b5a09f..0dc3bf720 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,6 @@ repos: - id: black args: - --line-length=99 - - --target-version=py38 - --target-version=py39 - --target-version=py310 - --target-version=py311 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ff08b6190..11a88a1cd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -70,7 +70,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.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`. +`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.9 and Python 3.10, and `flake8` checks in parallel with `tox -p`. Also, you can run unit tests for specific python versions with `tox -e py39`. 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/Makefile b/Makefile index efd23b806..6602800db 100644 --- a/Makefile +++ b/Makefile @@ -38,22 +38,22 @@ linecheck: ## Checks for all Python lines 100 characters or more find dbt -type f -name "*.py" -exec grep -I -r -n '.\{100\}' {} \; .PHONY: unit -unit: ## Runs unit tests with py38. +unit: ## Runs unit tests with py39. @\ - tox -e py38 + tox -e py39 .PHONY: test -test: ## Runs unit tests with py38 and code checks against staged changes. +test: ## Runs unit tests with py39 and code checks against staged changes. @\ - tox -p -e py38; \ + tox -p -e py39; \ pre-commit run black-check --hook-stage manual | grep -v "INFO"; \ pre-commit run flake8-check --hook-stage manual | grep -v "INFO"; \ pre-commit run mypy-check --hook-stage manual | grep -v "INFO" .PHONY: integration -integration: ## Runs redshift integration tests with py38. +integration: ## Runs redshift integration tests with py39. @\ - tox -e py38-redshift -- + tox -e py39-redshift -- .PHONY: clean @echo "cleaning repo" diff --git a/setup.py b/setup.py index 3f0b9fcbd..3c6f3fb6c 100644 --- a/setup.py +++ b/setup.py @@ -1,9 +1,9 @@ #!/usr/bin/env python import sys -if sys.version_info < (3, 8): +if sys.version_info < (3, 9): print("Error: dbt does not support this version of Python.") - print("Please upgrade to Python 3.8 or higher.") + print("Please upgrade to Python 3.9 or higher.") sys.exit(1) @@ -97,10 +97,9 @@ def _core_version(plugin_version: str = _plugin_version()) -> str: "Operating System :: Microsoft :: Windows", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX :: Linux", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", ], - python_requires=">=3.8", + python_requires=">=3.9", ) diff --git a/tox.ini b/tox.ini index 462bc8f07..c70ac488f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,8 +1,8 @@ [tox] skipsdist = True -envlist = py38,py39,py310,py311 +envlist = py39,py310,py311 -[testenv:{unit,py38,py39,py310,py311,py}] +[testenv:{unit,py39,py310,py311,py}] description = unit testing skip_install = true passenv = @@ -13,7 +13,7 @@ deps = -rdev-requirements.txt -e. -[testenv:{integration,py38,py39,py310,py311,py}-{redshift}] +[testenv:{integration,py39,py310,py311,py}-{redshift}] description = adapter plugin integration testing skip_install = true passenv = From b50406cb9127a35dd462c4c515f25b2f51718f6b Mon Sep 17 00:00:00 2001 From: Mike Alfare Date: Mon, 21 Oct 2024 15:15:47 -0400 Subject: [PATCH 2/2] drop support for python 3.8 --- .changes/unreleased/Breaking Changes-20241016-190600.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changes/unreleased/Breaking Changes-20241016-190600.yaml diff --git a/.changes/unreleased/Breaking Changes-20241016-190600.yaml b/.changes/unreleased/Breaking Changes-20241016-190600.yaml new file mode 100644 index 000000000..ed8b98ddd --- /dev/null +++ b/.changes/unreleased/Breaking Changes-20241016-190600.yaml @@ -0,0 +1,6 @@ +kind: Breaking Changes +body: Drop support for Python 3.8 +time: 2024-10-16T19:06:00.668396-04:00 +custom: + Author: mikealfare + Issue: "931"