Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,29 +28,30 @@ jobs:
fail-fast: false
matrix:
python-version:
- '3.14'
- '3.13'
- '3.12'
- '3.11'
- '3.10'
airflow-version:
# Latest release as of 2025-12-27
# Latest release as of 2026-05-24
# See: https://airflow.apache.org/docs/apache-airflow/stable/release_notes.html
- '3.1.5'
# GCP Cloud Composer latest as of 2025-12-27
- '3.2.1'
# GCP Cloud Composer latest as of 2026-05-24
# See: https://docs.cloud.google.com/composer/docs/composer-versions
# TODO: Uncomment once 'SUPERVISOR_COMMS' import bug is figured out
# This is fixed in later versions of Airflow.
# - '3.1.0'
# AWS MWAA latest as of 2025-12-27
- '3.1.7'
# AWS MWAA latest as of 2026-05-24
# See: https://docs.aws.amazon.com/mwaa/latest/userguide/airflow-versions.html
- '3.0.6'
# TODO: Uncomment once latest stable no longer matches MWAA latest. At the
# time of check, they are the same.
# - '3.2.1'
dbt-version:
- '1.11.2'
- '1.11.11'
- '1.10.17'
exclude:
# Airflow added 3.13 support in >=3.1
- airflow-version: '3.0.6'
python-version: '3.13'
# Airflow added 3.14 support in >=3.2
- airflow-version: '3.1.7'
python-version: '3.14'

runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -82,7 +83,7 @@ jobs:

- run: |
sudo apt-get update
sudo apt-get install --yes --no-install-recommends postgresql
sudo apt-get install --yes --no-install-recommends postgresql unixodbc-dev

- name: Checkout
uses: actions/checkout@v6
Expand Down Expand Up @@ -147,6 +148,7 @@ jobs:
allowed-endpoints: >
files.pythonhosted.org:443
github.com:443
raw.githubusercontent.com:443
release-assets.githubusercontent.com:443
api.github.com:443
pypi.org:443
Expand Down
36 changes: 11 additions & 25 deletions airflow_dbt_python/utils/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,17 @@
These are only used to ensure backwards compatibility with older versions of dbt.
"""

try:
from dbt.semver import Matchers, VersionSpecifier
except ImportError:
from dbt_common.semver import Matchers, VersionSpecifier

from dbt.version import installed

DBT_1_8 = VersionSpecifier(
major="1", minor="8", patch="0", matcher=Matchers.GREATER_THAN_OR_EQUAL
)
DBT_1_9 = VersionSpecifier(
major="1", minor="9", patch="0", matcher=Matchers.GREATER_THAN_OR_EQUAL
)
DBT_1_10_7 = VersionSpecifier(
major="1", minor="10", patch="7", matcher=Matchers.GREATER_THAN_OR_EQUAL
)
DBT_2_0 = VersionSpecifier(
major="2", minor="0", patch="0", matcher=Matchers.GREATER_THAN_OR_EQUAL
)

DBT_INSTALLED_GTE_1_9 = installed.compare(DBT_1_9) == 1
DBT_INSTALLED_GTE_1_10_7 = installed.compare(DBT_1_10_7) == 1

DBT_INSTALLED_1_8 = DBT_1_8 < installed < DBT_1_9
DBT_INSTALLED_1_9 = DBT_1_9 < installed < DBT_2_0
from importlib.metadata import version

from packaging.version import Version

DBT_VERSION = Version(version("dbt-core"))

DBT_INSTALLED_GTE_1_9 = DBT_VERSION >= Version("1.9.0")
DBT_INSTALLED_GTE_1_10_7 = DBT_VERSION >= Version("1.10.7")

DBT_INSTALLED_1_8 = Version("1.8.0") <= DBT_VERSION < Version("1.9.0")
DBT_INSTALLED_1_9 = Version("1.9.0") <= DBT_VERSION < Version("2.0.0")


def _get_base_airflow_version_tuple() -> tuple[int, int, int]:
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "A collection of Airflow operators, hooks, and utilities to execut
authors = [{ name = "Tomás Farías Santana", email = "tomas@tomasfarias.dev" }]
license = "MIT"
readme = "README.md"
requires-python = ">=3.10,<3.14"
requires-python = ">=3.10,<3.15"
classifiers = [
"Development Status :: 5 - Production/Stable",

Expand All @@ -24,6 +24,7 @@ dependencies = [
"apache-airflow>=3.1,<4.0; python_version>='3.13'",
"contextlib-chdir==1.0.2;python_version<'3.11'",
"dbt-core>=1.8.0,<2.0.0",
"packaging>=20.0",
]

[project.urls]
Expand Down
Loading
Loading