Skip to content

Commit

Permalink
Dropped support for Python 3.7 (#7623)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdebruyn authored May 30, 2023
1 parent 9c7e01d commit fd301a3
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 27 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Breaking Changes-20230515-053148.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Breaking Changes
body: Dropped support for Python 3.7
time: 2023-05-15T05:31:48.375649+02:00
custom:
Author: sdebruyn
Issue: "7082"
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11"]

env:
TOXENV: "unit"
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-20.04]
include:
- python-version: 3.8
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ There are some tools that will be helpful to you in developing locally. While th

These are the tools used in `dbt-core` development and testing:

- [`tox`](https://tox.readthedocs.io/en/latest/) to manage virtualenvs across python versions. We currently target the latest patch releases for Python 3.7, 3.8, 3.9, 3.10 and 3.11
- [`tox`](https://tox.readthedocs.io/en/latest/) to manage virtualenvs across python versions. We currently target the latest patch releases for Python 3.8, 3.9, 3.10 and 3.11
- [`pytest`](https://docs.pytest.org/en/latest/) to define, discover, and run tests
- [`flake8`](https://flake8.pycqa.org/en/latest/) for code linting
- [`black`](https://github.com/psf/black) for code formatting
Expand Down Expand Up @@ -163,7 +163,7 @@ suites.

#### `tox`

[`tox`](https://tox.readthedocs.io/en/latest/) takes care of managing virtualenvs and install 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, Python 3.10 and Python 3.11 checks in parallel with `tox -p`. Also, you can run unit tests for specific python versions with `tox -e py37`. The configuration for these tests in located in `tox.ini`.
[`tox`](https://tox.readthedocs.io/en/latest/) takes care of managing virtualenvs and install 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 Python 3.11 checks in parallel with `tox -p`. Also, you can run unit tests for specific python versions with `tox -e py38`. The configuration for these tests in located in `tox.ini`.

#### `pytest`

Expand Down
7 changes: 0 additions & 7 deletions Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,6 @@ RUN apt-get update \
python \
python-dev \
python3-pip \
python3.6 \
python3.6-dev \
python3-pip \
python3.6-venv \
python3.7 \
python3.7-dev \
python3.7-venv \
python3.8 \
python3.8-dev \
python3.8-venv \
Expand Down
10 changes: 4 additions & 6 deletions core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import os
import sys

if sys.version_info < (3, 7, 2):
if sys.version_info < (3, 8):
print("Error: dbt does not support this version of Python.")
print("Please upgrade to Python 3.7.2 or higher.")
print("Please upgrade to Python 3.8 or higher.")
sys.exit(1)


Expand Down Expand Up @@ -55,8 +55,7 @@
"logbook>=1.5,<1.6",
"mashumaro[msgpack]==3.6",
"minimal-snowplow-tracker==0.0.2",
"networkx>=2.3,<2.8.1;python_version<'3.8'",
"networkx>=2.3,<3;python_version>='3.8'",
"networkx>=2.3,<3",
"packaging>20.9",
"sqlparse>=0.2.3,<0.4.4",
"dbt-extractor~=0.4.1",
Expand All @@ -79,11 +78,10 @@
"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",
"Programming Language :: Python :: 3.11",
],
python_requires=">=3.7.2",
python_requires=">=3.8",
)
7 changes: 3 additions & 4 deletions plugins/postgres/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import os
import sys

if sys.version_info < (3, 7):
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 @@ -79,11 +79,10 @@ def _dbt_psycopg2_name():
"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",
"Programming Language :: Python :: 3.11",
],
python_requires=">=3.7",
python_requires=">=3.8",
)
9 changes: 5 additions & 4 deletions tests/adapter/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import os
import sys

if sys.version_info < (3, 7):
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 @@ -48,9 +48,10 @@
"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",
"Programming Language :: Python :: 3.11",
],
python_requires=">=3.7",
python_requires=">=3.8",
)
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
skipsdist = True
envlist = unit,integration

[testenv:{unit,py37,py38,py39,py310,py311,py}]
[testenv:{unit,py38,py39,py310,py311,py}]
description = unit testing
download = true
skip_install = true
Expand All @@ -16,7 +16,7 @@ deps =
-rdev-requirements.txt
-reditable-requirements.txt

[testenv:{integration,py37-integration,py38-integration,py39-integration,py310-integration,py311-integration,py-integration}]
[testenv:{integration,py38-integration,py39-integration,py310-integration,py311-integration,py-integration}]
description = functional testing
download = true
skip_install = true
Expand Down

0 comments on commit fd301a3

Please sign in to comment.