Skip to content

Commit 94a44a0

Browse files
authored
[Backport 1.4.latest] Drop support for Python 3.8 (#1221)
* backport #1211
1 parent daeb242 commit 94a44a0

File tree

8 files changed

+27
-22
lines changed

8 files changed

+27
-22
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Breaking Changes
2+
body: Drop support for Python 3.8
3+
time: 2024-10-16T18:31:43.4167-04:00
4+
custom:
5+
Author: mikealfare
6+
Issue: "1211"

.github/scripts/integration-test-matrix.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = ({ context }) => {
2-
const defaultPythonVersion = "3.8";
3-
const supportedPythonVersions = ["3.8", "3.9", "3.10", "3.11"];
2+
const defaultPythonVersion = "3.9";
3+
const supportedPythonVersions = ["3.9", "3.10", "3.11"];
44
const supportedAdapters = ["snowflake"];
55

66
// if PR, generate matrix based on files changed and PR labels

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
- name: Set up Python
5151
uses: actions/setup-python@v4.3.0
5252
with:
53-
python-version: '3.8'
53+
python-version: '3.9'
5454

5555
- name: Install python dependencies
5656
run: |
@@ -72,7 +72,7 @@ jobs:
7272
strategy:
7373
fail-fast: false
7474
matrix:
75-
python-version: ['3.8', '3.9', '3.10', '3.11']
75+
python-version: ['3.9', '3.10', '3.11']
7676

7777
env:
7878
TOXENV: "unit"
@@ -127,7 +127,7 @@ jobs:
127127
- name: Set up Python
128128
uses: actions/setup-python@v4.3.0
129129
with:
130-
python-version: '3.8'
130+
python-version: '3.9'
131131

132132
- name: Install python dependencies
133133
run: |
@@ -174,7 +174,7 @@ jobs:
174174
fail-fast: false
175175
matrix:
176176
os: [ubuntu-latest, macos-12, windows-latest]
177-
python-version: ['3.8', '3.9', '3.10', '3.11']
177+
python-version: ['3.9', '3.10', '3.11']
178178

179179
steps:
180180
- name: Set up Python ${{ matrix.python-version }}

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ repos:
2424
additional_dependencies: ['click==8.0.4']
2525
args:
2626
- "--line-length=99"
27-
- "--target-version=py38"
27+
- "--target-version=py39"
2828
- id: black
2929
alias: black-check
3030
stages: [manual]
3131
additional_dependencies: ['click==8.0.4']
3232
args:
3333
- "--line-length=99"
34-
- "--target-version=py38"
34+
- "--target-version=py39"
3535
- "--check"
3636
- "--diff"
3737
- repo: https://github.com/pycqa/flake8

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ WARNING: The parameters in your `test.env` file must link to a valid Snowflake a
7979
There are a few methods for running tests locally.
8080

8181
#### `tox`
82-
`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, Python 3.10, and `flake8` in parallel. Run `tox -e py38` to invoke tests on Python version 3.8 only (use py38, py39, or py310). Tox recipes are found in `tox.ini`.
82+
`tox` automatically runs unit tests against several Python versions using its own virtualenvs. Run `tox -p` to run unit tests for Python 3.9 and Python 3.10, and `flake8` in parallel. Run `tox -e py39` to invoke tests on Python version 3.9 only (use py39 or py310). Tox recipes are found in `tox.ini`.
8383

8484
#### `pytest`
8585
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:

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,22 @@ linecheck: ## Checks for all Python lines 100 characters or more
3232
find dbt -type f -name "*.py" -exec grep -I -r -n '.\{100\}' {} \;
3333

3434
.PHONY: unit
35-
unit: ## Runs unit tests with py38.
35+
unit: ## Runs unit tests with py39.
3636
@\
37-
tox -e py38
37+
tox -e py39
3838

3939
.PHONY: test
40-
test: ## Runs unit tests with py38 and code checks against staged changes.
40+
test: ## Runs unit tests with py39 and code checks against staged changes.
4141
@\
42-
tox -p -e py38; \
42+
tox -p -e py39; \
4343
pre-commit run black-check --hook-stage manual | grep -v "INFO"; \
4444
pre-commit run flake8-check --hook-stage manual | grep -v "INFO"; \
4545
pre-commit run mypy-check --hook-stage manual | grep -v "INFO"
4646

4747
.PHONY: integration
48-
integration: ## Runs snowflake integration tests with py38.
48+
integration: ## Runs snowflake integration tests with py39.
4949
@\
50-
tox -e py38-snowflake --
50+
tox -e py39-snowflake --
5151

5252
.PHONY: clean
5353
@echo "cleaning repo"

setup.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
import re
55

66
# require python 3.8 or newer
7-
if sys.version_info < (3, 8):
7+
if sys.version_info < (3, 9):
88
print("Error: dbt does not support this version of Python.")
9-
print("Please upgrade to Python 3.8 or higher.")
9+
print("Please upgrade to Python 3.9 or higher.")
1010
sys.exit(1)
1111

1212

@@ -77,10 +77,9 @@ def _get_dbt_core_version():
7777
"Operating System :: Microsoft :: Windows",
7878
"Operating System :: MacOS :: MacOS X",
7979
"Operating System :: POSIX :: Linux",
80-
"Programming Language :: Python :: 3.8",
8180
"Programming Language :: Python :: 3.9",
8281
"Programming Language :: Python :: 3.10",
8382
"Programming Language :: Python :: 3.11",
8483
],
85-
python_requires=">=3.8",
84+
python_requires=">=3.9",
8685
)

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[tox]
22
skipsdist = True
3-
envlist = py38,py39,py310,py311
3+
envlist = py39,py310,py311
44

5-
[testenv:{unit,py38,py39,py310,py311,py}]
5+
[testenv:{unit,py39,py310,py311,py}]
66
description = unit testing
77
skip_install = true
88
passenv =
@@ -13,7 +13,7 @@ deps =
1313
-rdev-requirements.txt
1414
-e.
1515

16-
[testenv:{integration,py38,py39,py310,py311,py}-{snowflake}]
16+
[testenv:{integration,py39,py310,py311,py}-{snowflake}]
1717
description = adapter plugin integration testing
1818
skip_install = true
1919
passenv =

0 commit comments

Comments
 (0)