diff --git a/.changes/unreleased/Breaking Changes-20230515-053148.yaml b/.changes/unreleased/Breaking Changes-20230515-053148.yaml new file mode 100644 index 00000000000..578fbed36b3 --- /dev/null +++ b/.changes/unreleased/Breaking Changes-20230515-053148.yaml @@ -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" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4320797dfcf..d910ce7a5e7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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" @@ -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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 893979fd9ac..7643483f3d6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 @@ -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` diff --git a/Dockerfile.test b/Dockerfile.test index 46effbf3c47..3cd4f083578 100644 --- a/Dockerfile.test +++ b/Dockerfile.test @@ -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 \ diff --git a/core/setup.py b/core/setup.py index 060befac620..53856f4648f 100644 --- a/core/setup.py +++ b/core/setup.py @@ -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) @@ -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", @@ -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", ) diff --git a/plugins/postgres/setup.py b/plugins/postgres/setup.py index 7642f24465a..553ad3a5dd6 100644 --- a/plugins/postgres/setup.py +++ b/plugins/postgres/setup.py @@ -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) @@ -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", ) diff --git a/tests/adapter/setup.py b/tests/adapter/setup.py index f387d557237..64ba26ae1c7 100644 --- a/tests/adapter/setup.py +++ b/tests/adapter/setup.py @@ -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) @@ -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", ) diff --git a/tox.ini b/tox.ini index e0f96bf3eda..87c0b14212c 100644 --- a/tox.ini +++ b/tox.ini @@ -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 @@ -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