This is an automated email from the ASF dual-hosted git repository.
jshao pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/main by this push:
new e818d3a4cb [#6636] feat(client-py): add Python 3.12 support for client
testing (#6637)
e818d3a4cb is described below
commit e818d3a4cb5fbad6716b5ef3ffc36382d1e5677c
Author: AndreVale69 <[email protected]>
AuthorDate: Thu Mar 20 13:37:23 2025 +0100
[#6636] feat(client-py): add Python 3.12 support for client testing (#6637)
### What changes were proposed in this pull request?
Tests could not be performed with Python 3.12, although the client
supports version 3.12.
### Why are the changes needed?
It's important to test the Python client with all supported versions.
Fix: #6636
### Does this PR introduce _any_ user-facing change?
No at all. It only updates some dependecies:
- Patch:
- `requests` from `2.32.2` to
[`2.32.3`](https://github.com/psf/requests/releases/tag/v2.32.3)
(latest)
- `dataclasses-json` from `0.6.6` to
[`0.6.7`](https://github.com/lidatong/dataclasses-json/releases/tag/v0.6.7)
(latest)
- Minor:
- `llama-index` from `0.10.40` to
[`0.11.18`](https://github.com/run-llama/llama_index/blob/main/CHANGELOG.md#llama-index-core-01118)
(this version supports python 3.13)
- `cachetools` from `5.3.3` to
[`5.5.2`](https://github.com/tkem/cachetools/blob/master/CHANGELOG.rst#v552-2025-02-20)
(latest)
- `pandas` from `2.0.3` to
[`2.2.3`](https://github.com/pandas-dev/pandas/releases/tag/v2.2.3) (if
py version > 3.8)
### How was this patch tested?
[how-to-use-python-client.md](https://github.com/apache/gravitino/blob/main/docs/how-to-use-python-client.md)
### Note
I also tried Python 3.13, but it's not supported by `pandas`. See:
https://github.com/pandas-dev/pandas/issues/59057
---
.github/workflows/python-integration-test.yml | 2 +-
clients/client-python/requirements-dev.txt | 14 +++++++++-----
clients/client-python/requirements.txt | 6 +++---
docs/how-to-build.md | 10 ++++++++--
4 files changed, 21 insertions(+), 11 deletions(-)
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