From dd4ac1ba4a584faa77c6c2b19be492ef96bd1066 Mon Sep 17 00:00:00 2001 From: leahwicz <60146280+leahwicz@users.noreply.github.com> Date: Tue, 12 Apr 2022 09:52:44 -0500 Subject: [PATCH] Updating tests and doc to support Python 3.10 (#5025) * Updating tests and doc to support Python 3.10 * Single quotes needed for python version matrix * Adding changelog --- .changes/unreleased/Under the Hood-20220411-103724.yaml | 7 +++++++ .github/workflows/main.yml | 4 ++-- CONTRIBUTING.md | 4 ++-- Dockerfile.test | 3 +++ core/setup.py | 1 + plugins/postgres/setup.py | 1 + 6 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 .changes/unreleased/Under the Hood-20220411-103724.yaml diff --git a/.changes/unreleased/Under the Hood-20220411-103724.yaml b/.changes/unreleased/Under the Hood-20220411-103724.yaml new file mode 100644 index 00000000000..08bee4a33c6 --- /dev/null +++ b/.changes/unreleased/Under the Hood-20220411-103724.yaml @@ -0,0 +1,7 @@ +kind: Under the Hood +body: Updating tests and docs to show that we now support Python 3.10 +time: 2022-04-11T10:37:24.806649-04:00 +custom: + Author: leahwicz + Issue: "4974" + PR: "5025" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0eb06350d8a..17254d21733 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -68,7 +68,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.7, 3.8, 3.9] + python-version: ['3.7', '3.8', '3.9', '3.10'] env: TOXENV: "unit" @@ -112,7 +112,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.7, 3.8, 3.9] + python-version: ['3.7', '3.8', '3.9', '3.10'] os: [ubuntu-latest] include: - python-version: 3.8 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f2c03893938..7bcca181fb3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -103,7 +103,7 @@ There are some tools that will be helpful to you in developing locally. While th A short list of tools used in `dbt-core` testing that will be helpful to your understanding: -- [`tox`](https://tox.readthedocs.io/en/latest/) to manage virtualenvs across python versions. We currently target the latest patch releases for Python 3.7, Python 3.8, and Python 3.9 +- [`tox`](https://tox.readthedocs.io/en/latest/) to manage virtualenvs across python versions. We currently target the latest patch releases for Python 3.7, Python 3.8, Python 3.9, and Python 3.10 - [`pytest`](https://docs.pytest.org/en/latest/) to discover/run tests - [`make`](https://users.cs.duke.edu/~ola/courses/programming/Makefiles/Makefiles.html) - but don't worry too much, nobody _really_ understands how make works and our Makefile is super simple - [`flake8`](https://flake8.pycqa.org/en/latest/) for code linting @@ -203,7 +203,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, and Python 3.9 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.7, Python 3.8, Python 3.9, and Python 3.10 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`. #### `pytest` diff --git a/Dockerfile.test b/Dockerfile.test index 9c0afbcac08..0c7b28b6fd6 100644 --- a/Dockerfile.test +++ b/Dockerfile.test @@ -46,6 +46,9 @@ RUN apt-get update \ python3.9 \ python3.9-dev \ python3.9-venv \ + python3.10 \ + python3.10-dev \ + python3.10-venv \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* diff --git a/core/setup.py b/core/setup.py index 5a98521ca2b..68cc6165c81 100644 --- a/core/setup.py +++ b/core/setup.py @@ -82,6 +82,7 @@ "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", ], python_requires=">=3.7.2", ) diff --git a/plugins/postgres/setup.py b/plugins/postgres/setup.py index 01dd08673ad..f849feb00ad 100644 --- a/plugins/postgres/setup.py +++ b/plugins/postgres/setup.py @@ -82,6 +82,7 @@ def _dbt_psycopg2_name(): "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", ], python_requires=">=3.7", )