Skip to content

Commit 4693918

Browse files
authored
Drop python 3.9 support (#12120)
* Update `setup.py` to drop support for python 3.9 * Update github issue templates to not use python 3.9 as an example * Update github workflows to no longer depend on or test python 3.9 * Drop python 3.9 from the test dockerfile * Update `CONTRIBUTING.md` to correctly list what python versions we test * Update comment about some code specifically needed for a python 3.9.7 issue * Update pre-commit python version comment * Add changie doc * Update imports from click as upgrading to python 3.10 changed some click items
1 parent 96738d5 commit 4693918

File tree

14 files changed

+55
-33
lines changed

14 files changed

+55
-33
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Dependencies
2+
body: Drop support for python 3.9
3+
time: 2025-10-27T16:25:02.435562-05:00
4+
custom:
5+
Author: QMalcolm
6+
Issue: "12118"

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ body:
6262
description: |
6363
examples:
6464
- **OS**: Ubuntu 24.04
65-
- **Python**: 3.9.12 (`python3 --version`)
65+
- **Python**: 3.10.12 (`python3 --version`)
6666
- **dbt-core**: 1.1.1 (`dbt --version`)
6767
value: |
6868
- OS:

.github/ISSUE_TEMPLATE/regression-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ body:
5656
description: |
5757
examples:
5858
- **OS**: Ubuntu 24.04
59-
- **Python**: 3.9.12 (`python3 --version`)
59+
- **Python**: 3.10.12 (`python3 --version`)
6060
- **dbt-core (working version)**: 1.1.1 (`dbt --version`)
6161
- **dbt-core (regression version)**: 1.2.0 (`dbt --version`)
6262
value: |

.github/workflows/main.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
- name: Set up Python
5555
uses: actions/setup-python@v6
5656
with:
57-
python-version: '3.9'
57+
python-version: '3.10'
5858

5959
- name: Install python dependencies
6060
run: |
@@ -77,7 +77,7 @@ jobs:
7777
strategy:
7878
fail-fast: false
7979
matrix:
80-
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
80+
python-version: ["3.10", "3.11", "3.12", "3.13" ]
8181

8282
env:
8383
TOXENV: "unit"
@@ -142,7 +142,7 @@ jobs:
142142
- name: generate include
143143
id: generate-include
144144
run: |
145-
INCLUDE=('"python-version":"3.9","os":"windows-latest"' '"python-version":"3.9","os":"macos-14"' )
145+
INCLUDE=('"python-version":"3.10","os":"windows-latest"' '"python-version":"3.10","os":"macos-14"' )
146146
INCLUDE_GROUPS="["
147147
for include in ${INCLUDE[@]}; do
148148
for group in $(seq 1 ${{ env.PYTHON_INTEGRATION_TEST_WORKERS }}); do
@@ -164,7 +164,7 @@ jobs:
164164
strategy:
165165
fail-fast: false
166166
matrix:
167-
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
167+
python-version: [ "3.10", "3.11", "3.12", "3.13" ]
168168
os: ["ubuntu-latest"]
169169
split-group: ${{ fromJson(needs.integration-metadata.outputs.split-groups) }}
170170
env:
@@ -361,7 +361,7 @@ jobs:
361361
- name: Set up Python
362362
uses: actions/setup-python@v6
363363
with:
364-
python-version: '3.9'
364+
python-version: '3.10'
365365

366366
- name: Install python dependencies
367367
run: |

.github/workflows/model_performance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ jobs:
150150
- name: Setup Python
151151
uses: actions/setup-python@v6
152152
with:
153-
python-version: "3.9"
153+
python-version: "3.10"
154154

155155
- name: Install dbt
156156
run: pip install dbt-postgres==${{ needs.set-variables.outputs.release_id }}

.github/workflows/schema-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- name: Set up Python
4444
uses: actions/setup-python@v6
4545
with:
46-
python-version: 3.9
46+
python-version: "3.10"
4747

4848
- name: Checkout dbt repo
4949
uses: actions/checkout@v4

.github/workflows/structured-logging-schema-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
- name: Setup Python
9797
uses: actions/setup-python@v6
9898
with:
99-
python-version: "3.9"
99+
python-version: "3.10"
100100

101101
- name: Install python dependencies
102102
run: |

.github/workflows/test-repeater.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ on:
2727
description: 'Version of Python to Test Against'
2828
type: choice
2929
options:
30-
- '3.9'
3130
- '3.10'
3231
- '3.11'
3332
os:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

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

6-
# Force all unspecified python hooks to run python 3.9
6+
# Force all unspecified python hooks to run python 3.10
77
default_language_version:
88
python: python3
99

CONTRIBUTING.md

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,34 @@
22

33
`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.
44

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

1534
## About this document
1635

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

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

58-
- [`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
77+
- [`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
5978
- [`pytest`](https://docs.pytest.org/en/latest/) to define, discover, and run tests
6079
- [`flake8`](https://flake8.pycqa.org/en/latest/) for code linting
6180
- [`black`](https://github.com/psf/black) for code formatting

0 commit comments

Comments
 (0)