diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e555fd43..ab9905e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: 3.11 + python-version: 3.12 - name: Install uv uses: astral-sh/setup-uv@v4 with: @@ -49,7 +49,7 @@ jobs: run: ./tools/lint.sh -c java_tests: - name: ut-java [${{ matrix.os }}] [java-${{ matrix.java-version}}] + name: ut-java [${{ matrix.os }}] [java-${{ matrix.java-version}}] [python-3.12] runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -66,7 +66,7 @@ jobs: - name: Install python uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: '3.12' - name: Install uv uses: astral-sh/setup-uv@v4 with: @@ -85,13 +85,13 @@ jobs: tools/ut.sh -j python_tests: - name: ut-python [${{ matrix.os }}] [python-${{ matrix.python-version}}] + name: ut-python [${{ matrix.os }}] [java-17] [python-${{ matrix.python-version}}] runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [ 'macos-latest', 'ubuntu-latest' ] - python-version: [ '3.10', '3.11' ] + python-version: [ '3.10', '3.11', '3.12' ] steps: - uses: actions/checkout@v4 - name: Install java @@ -113,14 +113,24 @@ jobs: run: tools/ut.sh -p python_it_tests: - name: it-python [${{ matrix.os }}] [python-${{ matrix.python-version}}] [flink-${{ matrix.flink-version}}] + name: it-python [${{ matrix.os }}] [java-17] [python-${{ matrix.python-version}}] [flink-${{ matrix.flink-version}}] runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: [ 'ubuntu-latest' ] - python-version: [ '3.11' ] - flink-version: [ "1.20", "2.0", "2.1", "2.2" ] + include: + - os: 'ubuntu-latest' + python-version: '3.11' + flink-version: "1.20" + - os: 'ubuntu-latest' + python-version: '3.11' + flink-version: "2.0" + - os: 'ubuntu-latest' + python-version: '3.12' + flink-version: "2.1" + - os: 'ubuntu-latest' + python-version: '3.12' + flink-version: "2.2" steps: - uses: actions/checkout@v4 - name: Install java @@ -144,7 +154,7 @@ jobs: run: tools/ut.sh -p -e -f ${{ matrix.flink-version }} java_it_tests: - name: it-java [${{ matrix.os }}] [java-${{ matrix.java-version}}] [flink-${{ matrix.flink-version}}] + name: it-java [${{ matrix.os }}] [java-${{ matrix.java-version}}] [flink-${{ matrix.flink-version}}] runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -200,7 +210,7 @@ jobs: fail-fast: false matrix: os: [ 'ubuntu-latest' ] - python-version: [ '3.11' ] + python-version: [ '3.12' ] java-version: [ '21' ] steps: - uses: actions/checkout@v4 diff --git a/README.md b/README.md index e3c98c3d..ea0b172b 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,8 @@ Prerequisites for building Flink Agents: * Unix-like environment (we use Linux, Mac OS X, Cygwin, WSL) * Git * Maven -* Java 11 -* Python 3 (3.10, 3.11) +* Java 11+ +* Python 3 (3.10, 3.11, 3.12) To clone from git, enter: diff --git a/docs/content/docs/faq/faq.md b/docs/content/docs/faq/faq.md index b46733ab..6931ec3c 100644 --- a/docs/content/docs/faq/faq.md +++ b/docs/content/docs/faq/faq.md @@ -29,7 +29,11 @@ This page describes the solutions to some common questions for Flink Agents user To ensure stability and compatibility when running Flink Agents jobs, please be aware of the following Python environment guidelines: -- **Recommended Python versions**: It is advised to use officially supported Python versions such as Python 3.10 or 3.11. These versions have been thoroughly tested and offer the best compatibility with Flink Agents. +- **Recommended Python versions**: It is advised to use officially supported Python versions such as Python 3.10, 3.11 or 3.12. These versions have been thoroughly tested and offer the best compatibility with Flink Agents. + + {{< hint info >}} + **Note**: Python 3.12 must work with Flink above 2.1 (including 2.1). + {{< /hint >}} - **Installation recommendations**: - **For Linux users**: We recommend installing Python via your system package manager (e.g., using `apt`: `sudo apt install python3`). diff --git a/docs/content/docs/get-started/installation.md b/docs/content/docs/get-started/installation.md index 5bf8ce6c..5a504b8c 100644 --- a/docs/content/docs/get-started/installation.md +++ b/docs/content/docs/get-started/installation.md @@ -56,11 +56,15 @@ cp $FLINK_HOME/opt/flink-python-${FLINK_VERSION}.jar $FLINK_HOME/lib/ **Note:** For more detailed Flink installation instructions, refer to the [Flink local installation guide](https://nightlies.apache.org/flink/flink-docs-release-1.20/docs/try-flink/local_installation/). {{< /hint >}} +{{< hint info >}} +**Note**: If you want to use python 3.12, you need install Flink above 2.1 (including 2.1). +{{< /hint >}} + ## Install Flink Agents ### Prerequisites -* Python 3.10 or 3.11 +* Python 3.10, 3.11 or 3.12 * For building from source, you also need: - Unix-like environment (Linux, Mac OS X, Cygwin, or WSL) - Git diff --git a/docs/content/docs/get-started/quickstart/react_agent.md b/docs/content/docs/get-started/quickstart/react_agent.md index dda03435..5a1cafca 100644 --- a/docs/content/docs/get-started/quickstart/react_agent.md +++ b/docs/content/docs/get-started/quickstart/react_agent.md @@ -209,7 +209,7 @@ reviewAnalysisResStream.print(); * Unix-like environment (we use Linux, Mac OS X, Cygwin, WSL) * Git * Java 11+ -* Python 3.10 or 3.11 +* Python 3.10, 3.11 or 3.12 ### Preparation diff --git a/docs/content/docs/get-started/quickstart/workflow_agent.md b/docs/content/docs/get-started/quickstart/workflow_agent.md index 082684a3..5b94a759 100644 --- a/docs/content/docs/get-started/quickstart/workflow_agent.md +++ b/docs/content/docs/get-started/quickstart/workflow_agent.md @@ -338,8 +338,8 @@ agentsEnv.execute(); * Unix-like environment (we use Linux, Mac OS X, Cygwin, WSL) * Git -* Java 11 -* Python 3.10 or 3.11 +* Java 11+ +* Python 3.10, 3.11 or 3.12 ### Preparation diff --git a/docs/content/docs/operations/deployment.md b/docs/content/docs/operations/deployment.md index 103cd5a8..bfe609c2 100644 --- a/docs/content/docs/operations/deployment.md +++ b/docs/content/docs/operations/deployment.md @@ -112,9 +112,13 @@ The output data is a list of dictionaries `List[Dict[str, Any]]` where each dict ### Prerequisites - **Operating System**: Unix-like environment (Linux, macOS, Cygwin, or WSL) -- **Python**: Version 3.10 or 3.11 +- **Python**: Version 3.10, 3.11 or 3.12 - **Flink**: A running Flink cluster with version above 1.20.3 (including 1.20.3) and the Flink Agents dependency installed +{{< hint info >}} +**Note**: Python 3.12 requires Flink above 2.1 (including 2.1). +{{< /hint >}} + ### Prepare Flink Agents We recommend creating a Python virtual environment to install the Flink Agents Python library. diff --git a/python/pyproject.toml b/python/pyproject.toml index ce9ebf61..9d50421b 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -29,7 +29,7 @@ version = "0.3.dev0" description = "Flink Agents Python API" license-files = ["LICENSE"] -requires-python = ">=3.10,<3.12" +requires-python = ">=3.10,<3.13" authors = [ { name = "Apache Software Foundation", email = "dev@flink.apache.org" }, ] @@ -39,6 +39,7 @@ classifiers = [ 'Development Status :: 5 - Production/Stable', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', ] dependencies = [