diff --git a/.circleci/config.yml b/.circleci/config.yml index bb0ac29ff83..1d8087901a1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -121,6 +121,45 @@ jobs: - store_artifacts: path: ./logs + integration-postgres-py39: + docker: *test_and_postgres + steps: + - checkout + - run: *setupdb + - run: + name: Run tests + command: tox -e integration-postgres-py39 + - store_artifacts: + path: ./logs + integration-snowflake-py39: + docker: *test_only + steps: + - checkout + - run: + name: Run tests + command: tox -e integration-snowflake-py39 + no_output_timeout: 1h + - store_artifacts: + path: ./logs + integration-redshift-py39: + docker: *test_only + steps: + - checkout + - run: + name: Run tests + command: tox -e integration-redshift-py39 + - store_artifacts: + path: ./logs + integration-bigquery-py39: + docker: *test_only + steps: + - checkout + - run: + name: Run tests + command: tox -e integration-bigquery-py39 + - store_artifacts: + path: ./logs + workflows: version: 2 test-everything: @@ -150,6 +189,18 @@ workflows: - integration-snowflake-py38: requires: - integration-postgres-py38 + - integration-postgres-py39: + requires: + - unit + - integration-redshift-py39: + requires: + - integration-postgres-py39 + - integration-bigquery-py39: + requires: + - integration-postgres-py39 + # - integration-snowflake-py39: + # requires: + # - integration-postgres-py39 - build-wheels: requires: - unit @@ -161,3 +212,7 @@ workflows: - integration-redshift-py38 - integration-bigquery-py38 - integration-snowflake-py38 + - integration-postgres-py39 + - integration-redshift-py39 + - integration-bigquery-py39 + # - integration-snowflake-py39 diff --git a/.gitignore b/.gitignore index acb15d1f0c7..065a16487a4 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ __pycache__/ # Distribution / packaging .Python -env/ +env*/ dbt_env/ build/ develop-eggs/ diff --git a/CHANGELOG.md b/CHANGELOG.md index d3d08be0529..0859f87f225 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ - Add event tracking for project parser/load times ([#2823](https://github.com/fishtown-analytics/dbt/issues/2823),[#2893](https://github.com/fishtown-analytics/dbt/pull/2893)) - Bump cryptography version to be >= 3.2 and bump snowflake connector to 2.3.6 ([#2896](https://github.com/fishtown-analytics/dbt/issues/2896)) - Widen supported Google Cloud libraries dependencies ([#2794](https://github.com/fishtown-analytics/dbt/pull/2794), [#2877](https://github.com/fishtown-analytics/dbt/pull/2877)). +- Bump hologram to 0.0.12 and adding testing support for python3.9 ([#2822](https://github.com/fishtown-analytics/dbt/issues/2822),[#2960](https://github.com/fishtown-analytics/dbt/pull/2960)) Contributors: - [@feluelle](https://github.com/feluelle) ([#2841](https://github.com/fishtown-analytics/dbt/pull/2841)) diff --git a/core/dbt/flags.py b/core/dbt/flags.py index 053868399a7..498d174d72c 100644 --- a/core/dbt/flags.py +++ b/core/dbt/flags.py @@ -1,5 +1,8 @@ import os import multiprocessing +if os.name != 'nt': + # https://bugs.python.org/issue41567 + import multiprocessing.popen_spawn_posix # type: ignore from pathlib import Path from typing import Optional diff --git a/core/dbt/task/rpc/server.py b/core/dbt/task/rpc/server.py index 179a8e1ea50..e1babbb1d37 100644 --- a/core/dbt/task/rpc/server.py +++ b/core/dbt/task/rpc/server.py @@ -1,7 +1,8 @@ # import these so we can find them from . import sql_commands # noqa from . import project_commands # noqa -from . import deps # noqa +from . import deps # noqa +import multiprocessing.queues # noqa - https://bugs.python.org/issue41567 import json import os import signal diff --git a/core/setup.py b/core/setup.py index 2d5a6eb49b4..845545ef446 100644 --- a/core/setup.py +++ b/core/setup.py @@ -70,7 +70,7 @@ def read(fname): 'json-rpc>=1.12,<2', 'werkzeug>=0.15,<0.17', 'dataclasses==0.6;python_version<"3.7"', - 'hologram==0.0.11', + 'hologram==0.0.12', 'logbook>=1.5,<1.6', 'typing-extensions>=3.7.4,<3.8', # the following are all to match snowflake-connector-python @@ -91,6 +91,7 @@ def read(fname): 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', ], python_requires=">=3.6.3", ) diff --git a/plugins/bigquery/setup.py b/plugins/bigquery/setup.py index ed91f729d0c..377a30d1cb7 100644 --- a/plugins/bigquery/setup.py +++ b/plugins/bigquery/setup.py @@ -69,6 +69,7 @@ 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', ], python_requires=">=3.6.2", ) diff --git a/plugins/postgres/setup.py b/plugins/postgres/setup.py index ef74bc6c687..a1d0bc88c54 100644 --- a/plugins/postgres/setup.py +++ b/plugins/postgres/setup.py @@ -85,6 +85,7 @@ def _dbt_psycopg2_name(): 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', ], python_requires=">=3.6.2", ) diff --git a/plugins/redshift/setup.py b/plugins/redshift/setup.py index 3c0cd8f70e7..0a505e30852 100644 --- a/plugins/redshift/setup.py +++ b/plugins/redshift/setup.py @@ -65,6 +65,7 @@ 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', ], python_requires=">=3.6.2", ) diff --git a/tox.ini b/tox.ini index 52dd11e6498..c25f9a1e739 100644 --- a/tox.ini +++ b/tox.ini @@ -246,6 +246,72 @@ deps = -r ./editable_requirements.txt -r ./dev_requirements.txt +[testenv:unit-py39] +basepython = python3.9 +commands = /bin/bash -c '{envpython} -m pytest --durations 0 -v {posargs} -n4 test/unit' +deps = + -r ./requirements.txt + -r ./dev_requirements.txt + + +[testenv:integration-postgres-py39] +basepython = python3.9 +passenv = * +setenv = + HOME=/home/tox +commands = /bin/bash -c '{envpython} -m pytest --durations 0 -v -m profile_postgres {posargs} -n4 test/integration/*' + /bin/bash -c '{envpython} -m pytest --durations 0 -v {posargs} -n4 --profile=postgres test/rpc' +deps = + ./core + ./plugins/postgres + -r ./dev_requirements.txt + +[testenv:integration-snowflake-py39] +basepython = python3.9 +passenv = * +setenv = + HOME=/home/tox +commands = /bin/bash -c '{envpython} -m pytest --durations 0 -v -m profile_snowflake {posargs} -n4 test/integration/*' + /bin/bash -c '{envpython} -m pytest --durations 0 -v {posargs} -n4 --profile=snowflake test/rpc' +deps = + ./core + ./plugins/snowflake + -r ./dev_requirements.txt + +[testenv:integration-bigquery-py39] +basepython = python3.9 +passenv = * +setenv = + HOME=/home/tox +commands = /bin/bash -c '{envpython} -m pytest --durations 0 -v -m profile_bigquery {posargs} -n4 test/integration/*' +deps = + ./core + ./plugins/bigquery + -r ./dev_requirements.txt + +[testenv:integration-redshift-py39] +basepython = python3.9 +passenv = * +setenv = + HOME=/home/tox +commands = /bin/bash -c '{envpython} -m pytest --durations 0 -v -m profile_redshift {posargs} -n4 test/integration/*' +deps = + ./core + ./plugins/postgres + ./plugins/redshift + -r ./dev_requirements.txt + + +[testenv:explicit-py39] +basepython = python3.9 +passenv = * +setenv = + HOME=/home/tox +commands = /bin/bash -c '{envpython} -m pytest --durations 0 -v {posargs}' +deps = + -r ./editable_requirements.txt + -r ./dev_requirements.txt + [testenv:pywin] basepython = {env:PYTHON:}\python.exe passenv = *