Skip to content

Commit

Permalink
Merge branch '1.8.latest' into backport-853-to-1.8.latest
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-rogers-dbt authored Nov 4, 2024
2 parents bec5078 + a030df7 commit 188a7f2
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 26 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Breaking Changes-20241016-190600.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Breaking Changes
body: Drop support for Python 3.8
time: 2024-10-16T19:06:00.668396-04:00
custom:
Author: mikealfare
Issue: "931"
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20241023-104556.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: Pin build dependencies to final releases
time: 2024-10-23T10:45:56.816922-04:00
custom:
Author: mikealfare
Issue: "930"
6 changes: 2 additions & 4 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,8 @@ jobs:
max-parallel: 3
matrix:
os: [ubuntu-22.04, macos-12, windows-2022]
python-version: ["3.8"]
python-version: ["3.9"]
include:
- os: ubuntu-22.04
python-version: "3.9"
- os: ubuntu-22.04
python-version: "3.10"
- os: ubuntu-22.04
Expand Down Expand Up @@ -201,7 +199,7 @@ jobs:
fail-fast: false
max-parallel: 1
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11"]

env:
TOXENV: integration-redshift
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.9'

- name: Install python dependencies
run: |
Expand All @@ -70,7 +70,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11']

env:
TOXENV: "unit"
Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.9'

- name: Install python dependencies
run: |
Expand Down Expand Up @@ -174,7 +174,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-12, windows-2022]
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11']

steps:
- name: Set up Python ${{ matrix.python-version }}
Expand Down
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ repos:
- id: black
args:
- --line-length=99
- --target-version=py38
- --target-version=py39
- --target-version=py310
- --target-version=py311
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ $EDITOR test.env
There are a few methods for running tests locally.

#### `tox`
`tox` takes care of managing Python virtualenvs and installing 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 `flake8` checks in parallel with `tox -p`. Also, you can run unit tests for specific python versions with `tox -e py38`. The configuration of these tests are located in `tox.ini`.
`tox` takes care of managing Python virtualenvs and installing dependencies in order to run tests. You can also run tests in parallel. For example, you can run unit tests for Python 3.9 and Python 3.10, and `flake8` checks in parallel with `tox -p`. Also, you can run unit tests for specific python versions with `tox -e py39`. The configuration of these tests are located in `tox.ini`.

#### `pytest`
Finally, you can also run a specific test or group of tests using `pytest` directly. With a Python virtualenv active and dev dependencies installed you can do things like:
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,22 @@ linecheck: ## Checks for all Python lines 100 characters or more
find dbt -type f -name "*.py" -exec grep -I -r -n '.\{100\}' {} \;

.PHONY: unit
unit: ## Runs unit tests with py38.
unit: ## Runs unit tests with py39.
@\
tox -e py38
tox -e py39

.PHONY: test
test: ## Runs unit tests with py38 and code checks against staged changes.
test: ## Runs unit tests with py39 and code checks against staged changes.
@\
tox -p -e py38; \
tox -p -e py39; \
pre-commit run black-check --hook-stage manual | grep -v "INFO"; \
pre-commit run flake8-check --hook-stage manual | grep -v "INFO"; \
pre-commit run mypy-check --hook-stage manual | grep -v "INFO"

.PHONY: integration
integration: ## Runs redshift integration tests with py38.
integration: ## Runs redshift integration tests with py39.
@\
tox -e py38-redshift --
tox -e py39-redshift --

.PHONY: clean
@echo "cleaning repo"
Expand Down
13 changes: 6 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import re
import sys

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


Expand Down Expand Up @@ -59,14 +59,14 @@ def _plugin_version_trim() -> str:
packages=find_namespace_packages(include=["dbt", "dbt.*"]),
include_package_data=True,
install_requires=[
"dbt-common>=0.1.0a1,<2.0",
"dbt-adapters>=0.1.0a1,<2.0",
"dbt-common>=0.1.0,<2.0",
"dbt-adapters>=0.1.0,<2.0",
f"dbt-postgres~={_plugin_version_trim()}",
# dbt-redshift depends deeply on this package. it does not follow SemVer, therefore there have been breaking changes in previous patch releases
# Pin to the patch or minor version, and bump in each new minor version of dbt-redshift.
"redshift-connector<2.0.918,>=2.0.913,!=2.0.914",
# add dbt-core to ensure backwards compatibility of installation, this is not a functional dependency
"dbt-core>=1.8.0b3",
"dbt-core>=1.8.0",
# installed via dbt-core but referenced directly; don't pin to avoid version conflicts with dbt-core
"sqlparse>=0.5.0,<0.6.0",
"agate",
Expand All @@ -78,10 +78,9 @@ def _plugin_version_trim() -> str:
"Operating System :: Microsoft :: Windows",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
],
python_requires=">=3.8",
python_requires=">=3.9",
)
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[tox]
skipsdist = True
envlist = py38,py39,py310,py311
envlist = py39,py310,py311

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

[testenv:{integration,py38,py39,py310,py311,py}-{redshift}]
[testenv:{integration,py39,py310,py311,py}-{redshift}]
description = adapter plugin integration testing
skip_install = true
passenv =
Expand Down

0 comments on commit 188a7f2

Please sign in to comment.