diff --git a/.github/workflows/build_pypi.yml b/.github/workflows/build_pypi.yml index 261751e8..97c662d5 100644 --- a/.github/workflows/build_pypi.yml +++ b/.github/workflows/build_pypi.yml @@ -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 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0628d860..3f445095 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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 @@ -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 diff --git a/.github/workflows/follow-merge-upstream-repo-sync.yml b/.github/workflows/follow-merge-upstream-repo-sync.yml index 81def8d9..3dc9024c 100644 --- a/.github/workflows/follow-merge-upstream-repo-sync.yml +++ b/.github/workflows/follow-merge-upstream-repo-sync.yml @@ -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 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 58fc0bc8..6310ee7b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 @@ -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 @@ -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: diff --git a/Dockerfile.app b/Dockerfile.app index 946251c5..09509fa1 100644 --- a/Dockerfile.app +++ b/Dockerfile.app @@ -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 diff --git a/poetry.lock b/poetry.lock index bccb518f..6ab70941 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. [[package]] name = "aiohappyeyeballs" @@ -1425,7 +1425,8 @@ packaging = "*" pydantic = [ {version = ">=1.5.1,<2.4.0 || >2.4.0,<3.0", extras = ["email"], markers = "python_version < \"3.10\""}, {version = ">=1.9.0,<2.4.0 || >2.4.0,<3.0", extras = ["email"], markers = "python_version >= \"3.10\" and python_version < \"3.11\""}, - {version = ">=1.10.0,<2.4.0 || >2.4.0,<3.0", extras = ["email"], markers = "python_version >= \"3.11\" and python_version < \"4.0\""}, + {version = ">=1.10.0,<2.4.0 || >2.4.0,<3.0", extras = ["email"], markers = "python_version >= \"3.11\" and python_version < \"3.12\""}, + {version = ">=1.10.0,<2.0.0 || >2.0.0,<2.0.1 || >2.0.1,<2.4.0 || >2.4.0,<3.0", extras = ["email"], markers = "python_version >= \"3.12\" and python_version < \"4.0\""}, ] pyyaml = ">=6.0.1" toml = {version = ">=0.10.0,<1.0.0", markers = "python_version < \"3.11\""} @@ -5135,6 +5136,7 @@ files = [ numpy = [ {version = ">=1.22.4", markers = "python_version < \"3.11\""}, {version = ">=1.23.2", markers = "python_version == \"3.11\""}, + {version = ">=1.26.0", markers = "python_version >= \"3.12\""}, ] python-dateutil = ">=2.8.2" pytz = ">=2020.1" @@ -6298,6 +6300,7 @@ more-itertools = ">=8.14,<11.0" pydantic = ">=1.10.2,<3.0.0" python-ulid = ">=1.0.3,<2.0.0" redis = ">=3.5.3,<6.0.0" +setuptools = {version = ">=70.0,<73.0", markers = "python_version >= \"3.12\""} types-redis = ">=3.5.9,<5.0.0" typing-extensions = ">=4.4.0,<5.0.0" @@ -6718,23 +6721,19 @@ win32 = ["pywin32"] [[package]] name = "setuptools" -version = "75.1.0" +version = "72.2.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "setuptools-75.1.0-py3-none-any.whl", hash = "sha256:35ab7fd3bcd95e6b7fd704e4a1539513edad446c097797f2985e0e4b960772f2"}, - {file = "setuptools-75.1.0.tar.gz", hash = "sha256:d59a21b17a275fb872a9c3dae73963160ae079f1049ed956880cd7c09b120538"}, + {file = "setuptools-72.2.0-py3-none-any.whl", hash = "sha256:f11dd94b7bae3a156a95ec151f24e4637fb4fa19c878e4d191bfb8b2d82728c4"}, + {file = "setuptools-72.2.0.tar.gz", hash = "sha256:80aacbf633704e9c8bfa1d99fa5dd4dc59573efcf9e4042c13d3bcef91ac2ef9"}, ] [package.extras] -check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)", "ruff (>=0.5.2)"] -core = ["importlib-metadata (>=6)", "importlib-resources (>=5.10.2)", "jaraco.collections", "jaraco.functools", "jaraco.text (>=3.7)", "more-itertools", "more-itertools (>=8.8)", "packaging", "packaging (>=24)", "platformdirs (>=2.6.2)", "tomli (>=2.0.1)", "wheel (>=0.43.0)"] -cover = ["pytest-cov"] +core = ["importlib-metadata (>=6)", "importlib-resources (>=5.10.2)", "jaraco.text (>=3.7)", "more-itertools (>=8.8)", "ordered-set (>=3.1.1)", "packaging (>=24)", "platformdirs (>=2.6.2)", "tomli (>=2.0.1)", "wheel (>=0.43.0)"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier", "towncrier (<24.7)"] -enabler = ["pytest-enabler (>=2.2)"] -test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "jaraco.test", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-home (>=0.5)", "pytest-perf", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel (>=0.44.0)"] -type = ["importlib-metadata (>=7.0.2)", "jaraco.develop (>=7.21)", "mypy (==1.11.*)", "pytest-mypy"] +test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "jaraco.test", "mypy (==1.11.*)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (<0.4)", "pytest-ruff (>=0.2.1)", "pytest-ruff (>=0.3.2)", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] [[package]] name = "shellingham" @@ -8155,5 +8154,5 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" -python-versions = ">=3.9,<3.12" -content-hash = "5650ea760e9e0efc480850adefc5f833398823fd364d95898c7fe6688390d7f2" +python-versions = ">=3.9,<3.13" +content-hash = "4e4f4c553d9449fe306076b24b2b303ad57cb0525a05ebe588b2a991ba3aea0d" diff --git a/pyproject.toml b/pyproject.toml index 2d492158..bd53aef3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" diff --git a/server/utils.py b/server/utils.py index c40b290d..fb647121 100644 --- a/server/utils.py +++ b/server/utils.py @@ -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