Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

[#6636] feat(client-py): add Python 3.12 support for client testing (#6637)

AndreVale69e818d3a4cb5f
diff --git a/.github/workflows/python-integration-test.yml b/.github/workflows/python-integration-test.yml
index e8c43d0c12..662f204b0d 100644
--- a/.github/workflows/python-integration-test.yml
+++ b/.github/workflows/python-integration-test.yml
@@ -73,7 +73,7 @@ jobs:
run: |
./gradlew compileDistribution -x test -PjdkVersion=${{ matrix.java-version }}
- for pythonVersion in "3.8" "3.9" "3.10" "3.11"
+ for pythonVersion in "3.8" "3.9" "3.10" "3.11" "3.12"
do
echo "Use Python version ${pythonVersion} to test the Python client."
./gradlew -PjdkVersion=${{ matrix.java-version }} -PpythonVersion=${pythonVersion} -PskipDockerTests=false :clients:client-python:test
diff --git a/clients/client-python/requirements-dev.txt b/clients/client-python/requirements-dev.txt
index a268278321..1110222158 100644
--- a/clients/client-python/requirements-dev.txt
+++ b/clients/client-python/requirements-dev.txt
@@ -15,17 +15,21 @@
# specific language governing permissions and limitations
# under the License.
-requests==2.32.2
-dataclasses-json==0.6.6
+requests==2.32.3
+dataclasses-json==0.6.7
pylint==3.2.2
black==24.4.2
twine==5.1.1
coverage==7.5.1
-pandas==2.0.3
+# pandas 2.0.3 is the last version that supports Python 3.8,
+# use it if you need to run tests on Python 3.8;
+# otherwise, use the version that also supports Python 3.12.
+pandas==2.0.3 ; python_version == '3.8'
+pandas==2.2.3 ; python_version > '3.8'
pyarrow==15.0.2
-llama-index==0.10.40
+llama-index==0.11.18
tenacity==8.3.0
-cachetools==5.3.3
+cachetools==5.5.2
readerwriterlock==1.0.9
docker==7.1.0
pyjwt[crypto]==2.8.0
diff --git a/clients/client-python/requirements.txt b/clients/client-python/requirements.txt
index 217687ea82..70699bc672 100644
--- a/clients/client-python/requirements.txt
+++ b/clients/client-python/requirements.txt
@@ -17,12 +17,12 @@
# the tools to publish the python client to Pypi
-requests==2.32.2
-dataclasses-json==0.6.6
+requests==2.32.3
+dataclasses-json==0.6.7
readerwriterlock==1.0.9
fsspec==2024.3.1
pyarrow==15.0.2
-cachetools==5.3.3
+cachetools==5.5.2
gcsfs==2024.3.1
s3fs==2024.3.1
ossfs==2023.12.0
diff --git a/docs/how-to-build.md b/docs/how-to-build.md
index 9b45ecc736..d277c80938 100644
--- a/docs/how-to-build.md
+++ b/docs/how-to-build.md
@@ -13,7 +13,7 @@ license: "This software is licensed under the Apache License version 2."
+ Linux or macOS operating system
+ Git
+ A Java Development Kit, version 8 to 17, installed in your environment to launch Gradle
-+ Python 3.8, 3.9, 3.10, or 3.11 to build the Gravitino Python client
++ Python 3.8, 3.9, 3.10, 3.11, or 3.12 to build the Gravitino Python client
+ Optionally, Docker to run integration tests
:::info Please read the following notes before trying to build Gravitino.
@@ -59,7 +59,7 @@ license: "This software is licensed under the Apache License version 2."
The `./gradlew build` command builds all the Gravitino components, including the Gravitino server, Java and Python clients, Trino and Spark connectors, and more.
- For the Python client, the `./gradlew build` command builds the Python client with Python 3.8 by default. If you want to use Python 3.9, 3.10, or 3.11 to build, please modify the property `pythonVersion` to 3.9, 3.10, or 3.11 in the `gradle.properties` file, or specify the version with `-P` like:
+ For the Python client, the `./gradlew build` command builds the Python client with Python 3.8 by default. If you want to use Python 3.9, 3.10, 3.11, or 3.12 to build, please modify the property `pythonVersion` to 3.9, 3.10, 3.11, or 3.12 in the `gradle.properties` file, or specify the version with `-P` like:
```shell
./gradlew build -PpythonVersion=3.9
@@ -77,6 +77,12 @@ license: "This software is licensed under the Apache License version 2."
./gradlew build -PpythonVersion=3.11
```
+ Or:
+
+ ```shell
+ ./gradlew build -PpythonVersion=3.12
+ ```
+
If you want to build a module on its own, like the Spark connector, you can use Gradle to build a module with a specific name, like so:
```shell