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 79e3727121 [#10011] feat(python-client): drop python 3.9 support
(#10024)
79e3727121 is described below
commit 79e37271216ebed689b1b4ea592adb12d6173170
Author: AndreVale69 <[email protected]>
AuthorDate: Fri Feb 27 13:32:58 2026 +0100
[#10011] feat(python-client): drop python 3.9 support (#10024)
### What changes were proposed in this pull request?
- **build**: Updated pythonVersion from 3.9 to 3.12 in build
configuration
- **CI/CD**: Dropped Python 3.9
- **client-python**: Dropped Python 3.9 support, now requires >=3.10
- **filesystem**: Corrected parameter passing in mv operation for local
storage
- **docs**: Updated Python version requirements for Gravitino client
- **build**: Updated dependency versions in requirements files
- **pylint**: Disabled `too-many-positional-arguments` rule and cleaned
up test files ([introduced with
v3.3.9](https://pylint.readthedocs.io/en/v3.3.9/user_guide/messages/refactor/too-many-positional-arguments.html))
### Why are the changes needed?
[EOL python 3.9](https://devguide.python.org/versions/#versions)

Fix: #10011
### Does this PR introduce _any_ user-facing change?
Bump python client requirements:
- bump `fsspec` from 2024.3.1 to 2026.2.0
- bump `pyarrow` from 15.0.2 to 23.0.1
- bump `cachetools` from 6.2.1 to 7.0.1
- bump `gcsfs` from 2024.3.1 to 2026.2.0
- bump `s3fs` from 2024.3.1 to 2026.2.0
- bump `ossfs` from 2023.12.0 to 2025.5.0
- bump `adlfs` from 2023.12.0 to 2026.2.0
- bump `black` from 24.4.2 to 26.1.0
### How was this patch tested?
```bash
git clone [email protected]:apache/gravitino.git
# Now default is python 3.12
./gradlew :clients:client-python:build
./gradlew :clients:client-python:test -PskipITs
```
---------
Co-authored-by: Qi Yu <[email protected]>
---
.github/workflows/python-integration-test.yml | 2 +-
GETTING_STARTED.md | 2 +-
.../filesystem/gvfs_default_operations.py | 8 ++++----
clients/client-python/pylintrc | 1 +
clients/client-python/requirements-dev.txt | 22 ++++++++++------------
clients/client-python/requirements.txt | 16 ++++++++--------
clients/client-python/setup.py | 3 +--
.../integration/test_gvfs_with_abs_credential.py | 1 -
.../tests/integration/test_gvfs_with_oss.py | 1 -
.../tests/unittests/test_filesystem_cache.py | 1 +
.../tests/unittests/test_gvfs_with_local.py | 1 -
docs/how-to-use-python-client.md | 8 ++++----
gradle.properties | 2 +-
13 files changed, 32 insertions(+), 36 deletions(-)
diff --git a/.github/workflows/python-integration-test.yml
b/.github/workflows/python-integration-test.yml
index b1e6145828..e47fd590f1 100644
--- a/.github/workflows/python-integration-test.yml
+++ b/.github/workflows/python-integration-test.yml
@@ -77,7 +77,7 @@ jobs:
run: |
./gradlew compileDistribution -x test
- for pythonVersion in "3.9" "3.10" "3.11" "3.12"
+ for pythonVersion in "3.10" "3.11" "3.12"
do
echo "Use Python version ${pythonVersion} to test the Python
client."
./gradlew -PpythonVersion=${pythonVersion} -PskipDockerTests=false
:clients:client-python:test
diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md
index 27c39b521c..4111018e17 100644
--- a/GETTING_STARTED.md
+++ b/GETTING_STARTED.md
@@ -13,7 +13,7 @@ Before building Gravitino, ensure you have:
- Linux or macOS operating system
- Git installed
- Java Development Kit (JDK) 17 installed to launch Gradle
-- Python 3.8–3.12 to build the Gravitino Python client
+- Python 3.10–3.12 to build the Gravitino Python client
- Optionally, Docker to run integration tests
Full build instructions: [Gravitino How to
Build](https://gravitino.apache.org/docs/how-to-build/)
diff --git
a/clients/client-python/gravitino/filesystem/gvfs_default_operations.py
b/clients/client-python/gravitino/filesystem/gvfs_default_operations.py
index f405ce1ded..e6687b10c7 100644
--- a/clients/client-python/gravitino/filesystem/gvfs_default_operations.py
+++ b/clients/client-python/gravitino/filesystem/gvfs_default_operations.py
@@ -173,10 +173,10 @@ class DefaultGVFSOperations(BaseGVFSOperations):
if storage_handler.storage_type() == StorageType.LOCAL:
actual_fs.mv(
- storage_handler.strip_storage_protocol(src_actual_path),
- storage_handler.strip_storage_protocol(dst_actual_path),
- recursive,
- maxdepth,
+ path1=storage_handler.strip_storage_protocol(src_actual_path),
+ path2=storage_handler.strip_storage_protocol(dst_actual_path),
+ recursive=recursive,
+ maxdepth=maxdepth,
)
else:
actual_fs.mv(
diff --git a/clients/client-python/pylintrc b/clients/client-python/pylintrc
index 21bfe53e53..6977c28efd 100644
--- a/clients/client-python/pylintrc
+++ b/clients/client-python/pylintrc
@@ -39,6 +39,7 @@ disable=missing-class-docstring,
unnecessary-pass,
duplicate-code, #TODO-fix
too-many-arguments, #TODO-fix
+ too-many-positional-arguments, #TODO-fix
[LOGGING]
diff --git a/clients/client-python/requirements-dev.txt
b/clients/client-python/requirements-dev.txt
index e92ebbbc07..e4335e2a98 100644
--- a/clients/client-python/requirements-dev.txt
+++ b/clients/client-python/requirements-dev.txt
@@ -17,21 +17,19 @@
requests==2.32.5
dataclasses-json==0.6.7
-pylint==3.2.2
-black==24.4.2
-twine==5.1.1
-coverage==7.5.1
-pandas==2.2.3
-pyarrow==15.0.2
+pylint==4.0.5
+black==26.1.0
+twine==6.2.0
+coverage==7.13.4
+pandas==2.3.3
+pyarrow==23.0.1
llama-index==0.13.0
-tenacity==8.3.0
-cachetools==6.2.1
+tenacity==9.1.4
+cachetools==7.0.1
readerwriterlock==1.0.9
docker==7.1.0
-pyjwt[crypto]==2.10.1
+pyjwt[crypto]==2.11.0
jwcrypto==1.5.6
sphinx==7.1.2
furo==2024.8.6
-# banks 2.4.0 does not support python 3.9.* or lower, so we limit the version
here. We can also
-# consider upgrading the python version to 3.10.x or higher in the future to
avoid this issue.
-banks==2.3.0
+banks==2.4.1
diff --git a/clients/client-python/requirements.txt
b/clients/client-python/requirements.txt
index 638c51e0ee..6c63027267 100644
--- a/clients/client-python/requirements.txt
+++ b/clients/client-python/requirements.txt
@@ -20,13 +20,13 @@
requests==2.32.5
dataclasses-json==0.6.7
readerwriterlock==1.0.9
-fsspec==2024.3.1
-pyarrow==15.0.2
-cachetools==6.2.1
-gcsfs==2024.3.1
-s3fs==2024.3.1
-ossfs==2023.12.0
-adlfs==2023.12.0
-black==24.4.2
+fsspec==2026.2.0
+pyarrow==23.0.1
+cachetools==7.0.1
+gcsfs==2026.2.0
+s3fs==2026.2.0
+ossfs==2025.5.0
+adlfs==2026.2.0
+black==26.1.0
flake8==7.0.0
pre-commit==3.5.0
diff --git a/clients/client-python/setup.py b/clients/client-python/setup.py
index 5819d93da7..41ca10d431 100644
--- a/clients/client-python/setup.py
+++ b/clients/client-python/setup.py
@@ -36,7 +36,7 @@ setup(
maintainer_email="[email protected]",
license="Apache-2.0",
url="https://github.com/apache/gravitino",
- python_requires=">=3.9",
+ python_requires=">=3.10",
keywords="Data, AI, metadata, catalog",
packages=find_packages(exclude=["tests*", "scripts*"]),
project_urls={
@@ -49,7 +49,6 @@ setup(
classifiers=[
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
- "Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
diff --git
a/clients/client-python/tests/integration/test_gvfs_with_abs_credential.py
b/clients/client-python/tests/integration/test_gvfs_with_abs_credential.py
index 869a17c7c9..92caebf909 100644
--- a/clients/client-python/tests/integration/test_gvfs_with_abs_credential.py
+++ b/clients/client-python/tests/integration/test_gvfs_with_abs_credential.py
@@ -32,7 +32,6 @@ from gravitino import (
from gravitino.filesystem.gvfs_config import GVFSConfig
from tests.integration.test_gvfs_with_abs import TestGvfsWithABS
-
logger = logging.getLogger(__name__)
diff --git a/clients/client-python/tests/integration/test_gvfs_with_oss.py
b/clients/client-python/tests/integration/test_gvfs_with_oss.py
index 6227a34418..b7b6b5f6cc 100644
--- a/clients/client-python/tests/integration/test_gvfs_with_oss.py
+++ b/clients/client-python/tests/integration/test_gvfs_with_oss.py
@@ -33,7 +33,6 @@ from gravitino import (
from gravitino.exceptions.base import GravitinoRuntimeException
from gravitino.filesystem.gvfs_config import GVFSConfig
-
logger = logging.getLogger(__name__)
diff --git a/clients/client-python/tests/unittests/test_filesystem_cache.py
b/clients/client-python/tests/unittests/test_filesystem_cache.py
index 6a0a4be9c7..5e9b4f4a66 100644
--- a/clients/client-python/tests/unittests/test_filesystem_cache.py
+++ b/clients/client-python/tests/unittests/test_filesystem_cache.py
@@ -28,6 +28,7 @@ Test Coverage:
- Cache expiration: TTL-based eviction and recreation
- Cache key construction: Equality, inequality, process/thread isolation
"""
+
import os
import threading
import time
diff --git a/clients/client-python/tests/unittests/test_gvfs_with_local.py
b/clients/client-python/tests/unittests/test_gvfs_with_local.py
index 3967629107..46a7215d76 100644
--- a/clients/client-python/tests/unittests/test_gvfs_with_local.py
+++ b/clients/client-python/tests/unittests/test_gvfs_with_local.py
@@ -49,7 +49,6 @@ from tests.unittests.auth.mock_base import (
mock_authentication_invalid_grant_error,
)
-
# pylint: disable=protected-access,too-many-lines,too-many-locals
diff --git a/docs/how-to-use-python-client.md b/docs/how-to-use-python-client.md
index b5d760c0b8..5d03d72a7e 100644
--- a/docs/how-to-use-python-client.md
+++ b/docs/how-to-use-python-client.md
@@ -69,7 +69,7 @@ You can ues any IDE to develop Gravitino Python Client.
Directly open the client
### Prerequisites
-+ Python 3.9+
++ Python 3.10+
+ Refer to [How to build Gravitino](./how-to-build.md#prerequisites) to have
necessary build
environment ready for building.
@@ -84,11 +84,11 @@ You can ues any IDE to develop Gravitino Python Client.
Directly open the client
2. Build the Gravitino Python client module
```shell
- # Default Python version is 3.9
+ # Default Python version is 3.12
./gradlew :clients:client-python:build
# If you want to build Python client with specific Python version,
# add `-PpythonVersion` with version number:
- ./gradlew :clients:client-python:build -PpythonVersion=3.10
+ ./gradlew :clients:client-python:build -PpythonVersion=3.11
```
3. Run unit tests
@@ -146,7 +146,7 @@ SDK, you need to:
find $(pwd)/.gradle/python/*/Miniforge3/envs/*/bin/python
# example output
-
/Users/YOUR_USER_NAME/gravitino/.gradle/python/MacOSX/Miniforge3/envs/python-3.9/bin/python
+
/Users/YOUR_USER_NAME/gravitino/.gradle/python/MacOSX/Miniforge3/envs/python-3.12/bin/python
```
6. Follow steps in [Create a conda
environment](https://www.jetbrains.com/help/idea/configuring-python-sdk.html#gdizlj_44),
diff --git a/gradle.properties b/gradle.properties
index 13d97cb2bc..98e15862e2 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -33,7 +33,7 @@ SONATYPE_PASSWORD = password
defaultScalaVersion = 2.12
# pythonVersion is used to specify the version of Python to build and test
Gravitino python client.
-pythonVersion = 3.9
+pythonVersion = 3.12
# skipDockerTests is used to skip the tests that require Docker to be running.
skipDockerTests = true