Skip to content

Commit

Permalink
[Backport 1.0.latest] Dropping support for py37 (#742) (#798)
Browse files Browse the repository at this point in the history
* Drop support for py37 (#742) (#797)

* drop support for py37

* drop support for py37

* drop support for py37

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Removing 3.9 from verify package CI

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
leahwicz and github-actions[bot] committed Jun 28, 2023
1 parent abdb50c commit cb3141b
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 12 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Breaking Changes-20230530-174051.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion .github/scripts/integration-test-matrix.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = ({ context }) => {
const defaultPythonVersion = "3.8";
const supportedPythonVersions = ["3.7", "3.8"];
const supportedPythonVersions = ["3.8", "3.9"];
const supportedAdapters = ["bigquery"];

// if PR, generate matrix based on files changed and PR labels
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8]
python-version: [3.8, 3.9]

env:
TOXENV: "unit"
Expand Down Expand Up @@ -177,7 +177,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.7, 3.8]
python-version: [3.8] # only testing 3.8 since v1.0 of dbt is deprecated but we are still running with 3.8 in Cloud

steps:
- name: Set up Python ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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, 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:
Expand Down
9 changes: 4 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import sys
import re

# require python 3.6 or newer
if sys.version_info < (3, 7):
print('Error: dbt does not support this version of Python.')
print('Please upgrade to Python 3.7 or higher.')
# 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.8 or higher.")
sys.exit(1)


Expand Down Expand Up @@ -90,7 +90,6 @@ def _get_dbt_core_version():
'Operating System :: MacOS :: MacOS X',
'Operating System :: POSIX :: Linux',

'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
],
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
skipsdist = True
envlist = py37,py38,flake8
envlist = py38,py39,flake8

[testenv:flake8]
description = flake8 code checks
Expand All @@ -11,7 +11,7 @@ commands = flake8 --select=E,W,F --ignore=W504,E741 --max-line-length 99 \
deps =
-rdev_requirements.txt

[testenv:{unit,py37,py38,py}]
[testenv:{unit,py38,py39,py}]
description = unit testing
skip_install = true
passenv =
Expand All @@ -22,7 +22,7 @@ deps =
-rdev_requirements.txt
-e.

[testenv:{integration,py37,py38,py}-{bigquery}]
[testenv:{integration,py38,py39,py}-{bigquery}]
description = adapter plugin integration testing
skip_install = true
passenv =
Expand Down

0 comments on commit cb3141b

Please sign in to comment.