Skip to content
Merged
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
6 changes: 6 additions & 0 deletions .changes/unreleased/Dependencies-20251027-162502.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Dependencies
body: Drop support for python 3.9
time: 2025-10-27T16:25:02.435562-05:00
custom:
Author: QMalcolm
Issue: "12118"
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ body:
description: |
examples:
- **OS**: Ubuntu 24.04
- **Python**: 3.9.12 (`python3 --version`)
- **Python**: 3.10.12 (`python3 --version`)
- **dbt-core**: 1.1.1 (`dbt --version`)
value: |
- OS:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/regression-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ body:
description: |
examples:
- **OS**: Ubuntu 24.04
- **Python**: 3.9.12 (`python3 --version`)
- **Python**: 3.10.12 (`python3 --version`)
- **dbt-core (working version)**: 1.1.1 (`dbt --version`)
- **dbt-core (regression version)**: 1.2.0 (`dbt --version`)
value: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.9'
python-version: '3.10'

- name: Install python dependencies
run: |
Expand All @@ -77,7 +77,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
python-version: ["3.10", "3.11", "3.12", "3.13" ]

env:
TOXENV: "unit"
Expand Down Expand Up @@ -142,7 +142,7 @@ jobs:
- name: generate include
id: generate-include
run: |
INCLUDE=('"python-version":"3.9","os":"windows-latest"' '"python-version":"3.9","os":"macos-14"' )
INCLUDE=('"python-version":"3.10","os":"windows-latest"' '"python-version":"3.10","os":"macos-14"' )
INCLUDE_GROUPS="["
for include in ${INCLUDE[@]}; do
for group in $(seq 1 ${{ env.PYTHON_INTEGRATION_TEST_WORKERS }}); do
Expand All @@ -164,7 +164,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
python-version: [ "3.10", "3.11", "3.12", "3.13" ]
os: ["ubuntu-latest"]
split-group: ${{ fromJson(needs.integration-metadata.outputs.split-groups) }}
env:
Expand Down Expand Up @@ -361,7 +361,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.9'
python-version: '3.10'

- name: Install python dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/model_performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.9"
python-version: "3.10"

- name: Install dbt
run: pip install dbt-postgres==${{ needs.set-variables.outputs.release_id }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/schema-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: 3.9
python-version: "3.10"

- name: Checkout dbt repo
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/structured-logging-schema-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.9"
python-version: "3.10"

- name: Install python dependencies
run: |
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test-repeater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ on:
description: 'Version of Python to Test Against'
type: choice
options:
- '3.9'
- '3.10'
- '3.11'
os:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

exclude: ^(core/dbt/docs/build/|core/dbt/common/events/types_pb2.py|core/dbt/adapters/events/adapter_types_pb2.py)

# Force all unspecified python hooks to run python 3.9
# Force all unspecified python hooks to run python 3.10
default_language_version:
python: python3

Expand Down
39 changes: 29 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,34 @@

`dbt-core` is open source software. It is what it is today because community members have opened issues, provided feedback, and [contributed to the knowledge loop](https://www.getdbt.com/dbt-labs/values/). Whether you are a seasoned open source contributor or a first-time committer, we welcome and encourage you to contribute code, documentation, ideas, or problem statements to this project.

1. [About this document](#about-this-document)
2. [Getting the code](#getting-the-code)
3. [Setting up an environment](#setting-up-an-environment)
4. [Running dbt-core in development](#running-dbt-core-in-development)
5. [Testing dbt-core](#testing)
6. [Debugging](#debugging)
7. [Adding or modifying a changelog entry](#adding-or-modifying-a-changelog-entry)
8. [Submitting a Pull Request](#submitting-a-pull-request)
9. [Troubleshooting Tips](#troubleshooting-tips)
- [Contributing to `dbt-core`](#contributing-to-dbt-core)
- [About this document](#about-this-document)
- [Notes](#notes)
- [Getting the code](#getting-the-code)
- [Installing git](#installing-git)
- [External contributors](#external-contributors)
- [dbt Labs contributors](#dbt-labs-contributors)
- [Setting up an environment](#setting-up-an-environment)
- [Tools](#tools)
- [Virtual environments](#virtual-environments)
- [Docker and `docker-compose`](#docker-and-docker-compose)
- [Postgres (optional)](#postgres-optional)
- [Running `dbt-core` in development](#running-dbt-core-in-development)
- [Installation](#installation)
- [Running `dbt-core`](#running-dbt-core)
- [Testing](#testing)
- [Initial setup](#initial-setup)
- [Test commands](#test-commands)
- [Makefile](#makefile)
- [`pre-commit`](#pre-commit)
- [`tox`](#tox)
- [`pytest`](#pytest)
- [Unit, Integration, Functional?](#unit-integration-functional)
- [Debugging](#debugging)
- [Assorted development tips](#assorted-development-tips)
- [Adding or modifying a CHANGELOG Entry](#adding-or-modifying-a-changelog-entry)
- [Submitting a Pull Request](#submitting-a-pull-request)
- [Troubleshooting Tips](#troubleshooting-tips)

## About this document

Expand Down Expand Up @@ -55,7 +74,7 @@ There are some tools that will be helpful to you in developing locally. While th

These are the tools used in `dbt-core` development and testing:

- [`tox`](https://tox.readthedocs.io/en/latest/) to manage virtualenvs across python versions. We currently target the latest patch releases for Python 3.8, 3.9, 3.10 and 3.11
- [`tox`](https://tox.readthedocs.io/en/latest/) to manage virtualenvs across python versions. We currently target the latest patch releases for Python 3.10, 3.11, 3.12, and 3.13
- [`pytest`](https://docs.pytest.org/en/latest/) to define, discover, and run tests
- [`flake8`](https://flake8.pycqa.org/en/latest/) for code linting
- [`black`](https://github.com/psf/black) for code formatting
Expand Down
3 changes: 0 additions & 3 deletions Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ RUN apt-get update \
python-is-python3 \
python-dev-is-python3 \
python3-pip \
python3.9 \
python3.9-dev \
python3.9-venv \
python3.10 \
python3.10-dev \
python3.10-venv \
Expand Down
6 changes: 3 additions & 3 deletions core/dbt/cli/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import click
from click import Context
from click.parser import OptionParser, ParsingState
from click.parser import _OptionParser, _ParsingState

from dbt.cli.option_types import ChoiceTuple

Expand Down Expand Up @@ -33,8 +33,8 @@ def __init__(self, *args, **kwargs) -> None:
else:
assert isinstance(option_type, ChoiceTuple), msg

def add_to_parser(self, parser: OptionParser, ctx: Context):
def parser_process(value: str, state: ParsingState):
def add_to_parser(self, parser: _OptionParser, ctx: Context):
def parser_process(value: str, state: _ParsingState):
# method to hook to the parser.process
done = False
value_list = str.split(value, " ")
Expand Down
4 changes: 3 additions & 1 deletion core/dbt/config/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ def __init__(
threads: int,
credentials: Credentials,
) -> None:
"""Explicitly defining `__init__` to work around bug in Python 3.9.7
"""
TODO: Is this no longer needed now that 3.9 is no longer supported?
Explicitly defining `__init__` to work around bug in Python 3.9.7
https://bugs.python.org/issue45081
"""
self.profile_name = profile_name
Expand Down
7 changes: 3 additions & 4 deletions core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import os
import sys

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


Expand Down Expand Up @@ -92,11 +92,10 @@
"Operating System :: Microsoft :: Windows",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
],
python_requires=">=3.9",
python_requires=">=3.10",
)
Loading