Skip to content

Commit

Permalink
ci: PLT-600: migrate to python 3.12 (#278)
Browse files Browse the repository at this point in the history
  • Loading branch information
farioas authored Dec 13, 2024
1 parent e016f5e commit dc54ace
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
id: setup_python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'
cache: 'poetry'

- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
id: setup_python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'
cache: 'poetry'

- name: Install Python dependencies
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
id: setup_python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'
cache: 'poetry'

- name: Install Python dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/follow-merge-upstream-repo-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
id: setup_python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'
cache: 'poetry'

- name: Commit submodule
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
id: setup_python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'
cache: 'poetry'

- name: Install Python dependencies
Expand All @@ -59,7 +59,7 @@ jobs:
matrix:
os: [ ubuntu-latest, windows-latest ]
# python-version: ['3.9', '3.10', '3.11']
python-version: ['3.11']
python-version: ['3.12']

steps:
- uses: actions/checkout@v4
Expand All @@ -83,12 +83,12 @@ jobs:
- name: Run tests with coverage
if: matrix.os == 'ubuntu-latest'
run: |
poetry run pytest tests/ -vv ${{ matrix.python-version == '3.11' && '--cov=. --cov-report=xml' || '' }}
poetry run pytest tests/ -vv ${{ matrix.python-version == '3.12' && '--cov=. --cov-report=xml' || '' }}
- name: Upload to Codecov
if: |
matrix.os == 'ubuntu-latest' &&
matrix.python-version == '3.11' &&
matrix.python-version == '3.12' &&
github.event.pull_request.user.login != 'dependabot[bot]'
uses: codecov/codecov-action@v5.1.1
with:
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.app
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
ARG PYTHON_VERSION=3.11
ARG POETRY_VERSION=1.8.1
ARG PYTHON_VERSION=3.12
ARG POETRY_VERSION=1.8.5

################################ Overview

Expand Down
25 changes: 12 additions & 13 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ classifiers = [
]

[tool.poetry.dependencies]
python = ">=3.9,<3.12"
python = ">=3.9,<3.13"
pandas = "*"
openai = "^1.47.1"
guidance = "0.0.64"
Expand Down
5 changes: 5 additions & 0 deletions server/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import sys
# fix for https://github.com/dpkp/kafka-python/issues/2412
if sys.version_info >= (3, 12, 0):
import six
sys.modules['kafka.vendor.six.moves'] = six.moves
from pydantic_settings import BaseSettings, SettingsConfigDict
from typing import List, Union
import logging
Expand Down

0 comments on commit dc54ace

Please sign in to comment.