Skip to content

Commit

Permalink
Drop support for Python 3.8 (#1121)
Browse files Browse the repository at this point in the history
* drop support for python 3.8

* drop support for python 3.8
  • Loading branch information
mikealfare authored Oct 17, 2024
1 parent 805a08e commit 45ab21a
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 19 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Breaking Changes-20241016-184157.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-16T18:41:57.721002-04:00
custom:
Author: mikealfare
Issue: "1121"
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.9'

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

steps:
- name: Check out the repository
Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.9'

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

steps:
- name: Set up Python ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-internal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ defaults:
shell: "bash"

env:
PYTHON_TARGET_VERSION: 3.8
PYTHON_TARGET_VERSION: 3.9

jobs:
run-unit-tests:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-prep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ defaults:
shell: bash

env:
PYTHON_TARGET_VERSION: 3.8
PYTHON_TARGET_VERSION: 3.9
NOTIFICATION_PREFIX: "[Release Preparation]"

jobs:
Expand Down Expand Up @@ -448,7 +448,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- name: Check out the repository
Expand Down
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ repos:
- id: black
args:
- --line-length=99
- --target-version=py38
- --target-version=py39
- --target-version=py310
- --target-version=py311
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ lint: ## Runs flake8 and mypy code checks against staged changes.
pre-commit run --all-files

.PHONY: unit
unit: ## Runs unit tests with py38.
unit: ## Runs unit tests with py39.
@\
python -m pytest tests/unit

.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.
@\
python -m pytest tests/unit; \
python dagger/run_dbt_spark_tests.py --profile spark_session \
Expand Down
2 changes: 1 addition & 1 deletion dagger/run_dbt_spark_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ async def test_spark(test_args):
platform = dagger.Platform("linux/amd64")
tst_container = (
client.container(platform=platform)
.from_("python:3.8-slim")
.from_("python:3.9-slim")
.with_mounted_cache("/var/cache/apt/archives", os_reqs_cache)
.with_mounted_cache("/root/.cache/pip", pip_cache)
# install OS deps first so any local changes don't invalidate the cache
Expand Down
3 changes: 1 addition & 2 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ git+https://github.com/dbt-labs/dbt-adapters.git#subdirectory=dbt-tests-adapter

# dev
ipdb~=0.13.13
pre-commit~=3.7.0;python_version>="3.9"
pre-commit~=3.5.0;python_version<"3.9"
pre-commit~=3.7.0
pytest~=7.4
pytest-csv~=3.0
pytest-dotenv~=0.5.2
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# this image gets published to GHCR for production use
ARG py_version=3.11.2

FROM python:$py_version-slim-bullseye as base
FROM python:$py_version-slim-bullseye AS base

RUN apt-get update \
&& apt-get dist-upgrade -y \
Expand Down Expand Up @@ -29,7 +29,7 @@ ENV LANG=C.UTF-8
RUN python -m pip install --upgrade "pip==24.0" "setuptools==69.2.0" "wheel==0.43.0" --no-cache-dir


FROM base as dbt-spark
FROM base AS dbt-spark

ARG commit_ref=main
ARG extras=all
Expand Down
7 changes: 3 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import re

# require python 3.8 or newer
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)

# require version of setuptools that supports find_namespace_packages
Expand Down Expand Up @@ -83,11 +83,10 @@ def _get_plugin_version_dict():
"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",
"Programming Language :: Python :: 3.12",
],
python_requires=">=3.8",
python_requires=">=3.9",
)

0 comments on commit 45ab21a

Please sign in to comment.