Skip to content

Commit

Permalink
drop support for python 3.7 (dbt-labs#793)
Browse files Browse the repository at this point in the history
* drop support for python 3.7

* add changelog entry

* missed change
  • Loading branch information
McKnight-42 authored May 30, 2023
1 parent ed31892 commit 1ecd8e9
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20230530-162533.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: drop support for python 3.7
time: 2023-05-30T16:25:33.109326-05:00
custom:
Author: McKnight-42
Issue: "792"
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", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10"]

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", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10"]

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 @@ -66,7 +66,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
3 changes: 0 additions & 3 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-tests-adapter&subdirectory=
black~=23.3
bumpversion~=0.6.0
click~=8.1
flake8~=5.0;python_version=="3.7"
flake8~=6.0;python_version>="3.8"
flaky~=3.7
freezegun~=1.2
ipdb~=0.13.13
mypy==1.2.0 # patch updates have historically introduced breaking changes
pip-tools~=6.13
pre-commit~=2.21;python_version=="3.7"
pre-commit~=3.2;python_version>="3.8"
pre-commit-hooks~=4.4
pytest~=7.3
Expand All @@ -24,7 +22,6 @@ pytest-dotenv~=0.5.2
pytest-logbook~=1.2
pytest-xdist~=3.2
pytz~=2023.3
tox~=3.0;python_version=="3.7"
tox~=4.4;python_version>="3.8"
types-pytz~=2023.3
types-requests~=2.28
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.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)


Expand Down Expand Up @@ -90,10 +90,9 @@ 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",
],
python_requires=">=3.7",
python_requires=">=3.8",
)
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
skipsdist = True
envlist = unit, flake8, integration-spark-thrift

[testenv:{unit,py37,py38,py39,py310,py}]
[testenv:{unit,py38,py39,py310,py}]
allowlist_externals =
/bin/bash
commands = /bin/bash -c '{envpython} -m pytest -v {posargs} tests/unit'
Expand Down

0 comments on commit 1ecd8e9

Please sign in to comment.