Skip to content

Commit

Permalink
Merge pull request #2960 from fishtown-analytics/feature/python-39
Browse files Browse the repository at this point in the history
Test python3.9
  • Loading branch information
Kyle Wigley authored Dec 17, 2020
2 parents 97ab130 + 43ed29c commit cfb50ae
Show file tree
Hide file tree
Showing 10 changed files with 133 additions and 3 deletions.
55 changes: 55 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ __pycache__/

# Distribution / packaging
.Python
env/
env*/
dbt_env/
build/
develop-eggs/
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
- Add event tracking for project parser/load times ([#2823](https:/fishtown-analytics/dbt/issues/2823),[#2893](https:/fishtown-analytics/dbt/pull/2893))
- Bump cryptography version to be >= 3.2 and bump snowflake connector to 2.3.6 ([#2896](https:/fishtown-analytics/dbt/issues/2896))
- Widen supported Google Cloud libraries dependencies ([#2794](https:/fishtown-analytics/dbt/pull/2794), [#2877](https:/fishtown-analytics/dbt/pull/2877)).
- Bump hologram to 0.0.12 and adding testing support for python3.9 ([#2822](https:/fishtown-analytics/dbt/issues/2822),[#2960](https:/fishtown-analytics/dbt/pull/2960))

Contributors:
- [@feluelle](https:/feluelle) ([#2841](https:/fishtown-analytics/dbt/pull/2841))
Expand Down
3 changes: 3 additions & 0 deletions core/dbt/flags.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
3 changes: 2 additions & 1 deletion core/dbt/task/rpc/server.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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",
)
1 change: 1 addition & 0 deletions plugins/bigquery/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
1 change: 1 addition & 0 deletions plugins/postgres/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
1 change: 1 addition & 0 deletions plugins/redshift/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
66 changes: 66 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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 = *
Expand Down

0 comments on commit cfb50ae

Please sign in to comment.