From 23d31a830bf762ed2eca6eb884a1a5a5001bcbe2 Mon Sep 17 00:00:00 2001 From: Parshva Daftari <89991302+parshvadaftari@users.noreply.github.com> Date: Wed, 13 Aug 2025 01:31:41 +0530 Subject: [PATCH] Added support for python 3.12 (#3295) --- .github/workflows/ci.yml | 4 ++-- CONTRIBUTING.md | 2 ++ Makefile | 3 +++ pyproject.toml | 10 ++++++++++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60c27fc26..bd9e811b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.10", "3.11"] + python-version: ["3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} @@ -71,7 +71,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 28dad2a7a..c27d3a023 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,6 +25,7 @@ We use `hatch` for managing development environments. To set up: hatch shell dev_py_3_9 # Python 3.9 hatch shell dev_py_3_10 # Python 3.10 hatch shell dev_py_3_11 # Python 3.11 +hatch shell dev_py_3_12 # Python 3.12 # The environment will automatically install all dev dependencies # Run tests within the activated shell: @@ -51,6 +52,7 @@ make test make test-py-3.9 # Python 3.9 environment make test-py-3.10 # Python 3.10 environment make test-py-3.11 # Python 3.11 environment +make test-py-3.12 # Python 3.12 environment # When using hatch shells, run tests with: make test # After activating a shell with hatch shell test_XX diff --git a/Makefile b/Makefile index a8173a39f..bd75e5638 100644 --- a/Makefile +++ b/Makefile @@ -50,3 +50,6 @@ test-py-3.10: test-py-3.11: hatch run dev_py_3_11:test + +test-py-3.12: + hatch run dev_py_3_12:test diff --git a/pyproject.toml b/pyproject.toml index d92df0935..8653842df 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -114,6 +114,16 @@ features = [ "extras", ] +[tool.hatch.envs.dev_py_3_12] +python = "3.12" +features = [ + "test", + "graph", + "vector_stores", + "llms", + "extras", +] + [tool.hatch.envs.default.scripts] format = [ "ruff format",