From d068daf2e5ba7257c5f0d9bc0216763442406cb1 Mon Sep 17 00:00:00 2001 From: Mike Alfare Date: Wed, 31 Jul 2024 21:04:52 -0400 Subject: [PATCH 1/3] add support for python 3.12 --- .github/workflows/integration-tests.yml | 4 ++-- .github/workflows/release_prep_hatch.yml | 2 +- .github/workflows/unit-tests.yml | 2 +- .pre-commit-config.yaml | 1 + docker/Dockerfile | 2 +- pyproject.toml | 1 + 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 45fe8d4f..7310e50a 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -50,7 +50,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] services: postgres: @@ -107,7 +107,7 @@ jobs: fail-fast: false matrix: platform: [ubuntu-22.04, macos-12] - python-version: ["3.8", "3.11"] + python-version: ["3.8", "3.12"] steps: - name: "Check out repository" uses: actions/checkout@v4 diff --git a/.github/workflows/release_prep_hatch.yml b/.github/workflows/release_prep_hatch.yml index a97268c6..18d7637b 100644 --- a/.github/workflows/release_prep_hatch.yml +++ b/.github/workflows/release_prep_hatch.yml @@ -77,7 +77,7 @@ defaults: shell: bash env: - PYTHON_TARGET_VERSION: 3.11 + PYTHON_TARGET_VERSION: 3.12 NOTIFICATION_PREFIX: "[Release Prep]" jobs: diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index e171ff78..afb88136 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -23,7 +23,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - name: Check out repository diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c869fe86..0bd01f7c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,6 +27,7 @@ repos: - --target-version=py39 - --target-version=py310 - --target-version=py311 + - --target-version=py312 - repo: https://github.com/pycqa/flake8 rev: 7.0.0 diff --git a/docker/Dockerfile b/docker/Dockerfile index 7c8dc14e..b6a87dfc 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,5 +1,5 @@ # this image gets published to GHCR for production use -ARG py_version=3.11.2 +ARG py_version=3.12.4 FROM python:$py_version-slim-bullseye as base diff --git a/pyproject.toml b/pyproject.toml index 0fb7b885..e6848a4f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,6 +21,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ] dependencies = [ "psycopg2-binary>=2.9,<3.0", From 0b0dd2fe70ec4a7324d73a1335b1faec10c5c8b3 Mon Sep 17 00:00:00 2001 From: Mike Alfare Date: Wed, 31 Jul 2024 21:08:09 -0400 Subject: [PATCH 2/3] changelog --- .changes/unreleased/Features-20240731-210800.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changes/unreleased/Features-20240731-210800.yaml diff --git a/.changes/unreleased/Features-20240731-210800.yaml b/.changes/unreleased/Features-20240731-210800.yaml new file mode 100644 index 00000000..b2fc1f0a --- /dev/null +++ b/.changes/unreleased/Features-20240731-210800.yaml @@ -0,0 +1,6 @@ +kind: Features +body: Add support for Python 3.12 +time: 2024-07-31T21:08:00.170999-04:00 +custom: + Author: mikealfare + Issue: "17" From d3a3ce40759a572ee6b9c2842b8e3a6467ab65fc Mon Sep 17 00:00:00 2001 From: Mike Alfare Date: Wed, 31 Jul 2024 21:17:53 -0400 Subject: [PATCH 3/3] update release workflow to use python 3.12 and make it configurable for future updates --- .github/workflows/release.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1139380a..bbf36399 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,6 +19,10 @@ on: description: "Only release Docker image, skip GitHub & PyPI" type: boolean default: false + python_version: + description: "Python version for building and testing the build" + type: string + default: "3.12" permissions: contents: write # this is the permission that allows creating a new release @@ -53,6 +57,8 @@ jobs: - name: "Setup `hatch`" uses: dbt-labs/dbt-adapters/.github/actions/setup-hatch@main + with: + python-version: ${{ inputs.python_version }} - name: "Set archive name" id: archive