This is an automated email from the ASF dual-hosted git repository.

chaokunyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fury.git


The following commit(s) were added to refs/heads/main by this push:
     new 02d62788 feat(python): support 3.13 (#2046)
02d62788 is described below

commit 02d627887bfccadc266443adcaf04d63aa1d5235
Author: penguin_wwy <[email protected]>
AuthorDate: Sat Feb 8 19:53:25 2025 +0800

    feat(python): support 3.13 (#2046)
    
    ## What does this PR do?
    
    Adding support for Python 3.13 in CI. This can help us experiment with
    new features like no-GIL and JIT in the future.
    
    ## Related issues
    
    ## Does this PR introduce any user-facing change?
    
    - [ ] Does this PR introduce any public API change?
    - [ ] Does this PR introduce any binary protocol compatibility change?
    
    ## Benchmark
---
 .github/workflows/ci.yml          |  2 +-
 .github/workflows/release.yaml    |  2 +-
 bazel/arrow/pyarrow_configure.bzl |  4 +++-
 bazel/fury_deps_setup.bzl         |  4 ++--
 ci/deploy.sh                      | 17 +++++++++++++----
 ci/run_ci.sh                      |  2 +-
 python/setup.py                   |  2 +-
 7 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a877d862..f3319b53 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -218,7 +218,7 @@ jobs:
     runs-on: ${{ matrix.os }}
     strategy:
       matrix:
-        python-version: [3.8, 3.12]
+        python-version: [3.8, 3.12, 3.13]
         os: [ubuntu-20.04, macos-13, macos-14, windows-2022]
     steps:
       - uses: actions/checkout@v4
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index a419dcd4..17d8002a 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -28,7 +28,7 @@ jobs:
     runs-on: ${{ matrix.os }}
     strategy:
       matrix:
-        python-version: [3.8, 3.9, "3.10", 3.11, 3.12]
+        python-version: [3.8, 3.9, "3.10", 3.11, 3.12, 3.13]
         os: [ubuntu-latest, macos-13, macos-14, windows-2022] # macos-13: x86, 
macos-14: arm64
 
     steps:
diff --git a/bazel/arrow/pyarrow_configure.bzl 
b/bazel/arrow/pyarrow_configure.bzl
index 15c65a3d..ecb82c5f 100644
--- a/bazel/arrow/pyarrow_configure.bzl
+++ b/bazel/arrow/pyarrow_configure.bzl
@@ -37,10 +37,12 @@ def _execute(
       The result of repository_ctx.execute(cmdline).
     """
     result = repository_ctx.execute(cmdline)
-    if result.stderr or not (empty_stdout_fine or result.stdout):
+    if (result.return_code != 0) or not (empty_stdout_fine or result.stdout):
         _fail("\n".join([
             error_msg.strip() if error_msg else "Repository command failed",
+            "return code: " + str(result.return_code),
             result.stderr.strip(),
+            result.stdout.strip(),
             error_details if error_details else "",
         ]))
     return result
diff --git a/bazel/fury_deps_setup.bzl b/bazel/fury_deps_setup.bzl
index 32ffacb8..fe9ce47b 100644
--- a/bazel/fury_deps_setup.bzl
+++ b/bazel/fury_deps_setup.bzl
@@ -145,8 +145,8 @@ def setup_deps():
     auto_http_archive(
         name = "cython",
         build_file = "@com_github_grpc_grpc//third_party:cython.BUILD",
-        url = 
"https://github.com/cython/cython/releases/download/3.0.0/Cython-3.0.0.tar.gz";,
-        sha256 = 
"350b18f9673e63101dbbfcf774ee2f57c20ac4636d255741d76ca79016b1bd82",
+        url = 
"https://github.com/cython/cython/releases/download/3.1.0a1/cython-3.1.0a1.tar.gz";,
+        sha256 = 
"35b53f6947c3133452b84f0f9703f222deb9b02874861427a45e63c891379440",
     )
     auto_http_archive(
         name = "com_google_googletest",
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 4d5073f7..cbf37204 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -38,14 +38,16 @@ PYTHONS=("cp37-cp37m"
          "cp39-cp39"
          "cp310-cp310"
          "cp310-cp311"
-         "cp312-cp312")
+         "cp312-cp312"
+         "cp313-cp313")
 
 VERSIONS=("3.7"
           "3.8"
           "3.9"
           "3.10"
           "3.11"
-          "3.12")
+          "3.12"
+          "3.13")
 
 create_py_envs() {
   source $(conda info --base)/etc/profile.d/conda.sh
@@ -114,7 +116,7 @@ deploy_jars() {
 build_pyfury() {
   echo "Python version $(python -V), path $(which python)"
   install_pyarrow
-  pip install Cython wheel "numpy<2.0.0" pytest
+  pip install Cython wheel pytest
   pushd "$ROOT/python"
   pip list
   echo "Install pyfury"
@@ -157,7 +159,14 @@ deploy_python() {
 }
 
 install_pyarrow() {
-  pip install pyarrow==14.0.0
+  pyversion=$(python -V | cut -d' ' -f2)
+  if [[ $pyversion  ==  3.13* ]]; then
+    pip install pyarrow==18.0.0
+    pip install numpy
+  else
+    pip install pyarrow==14.0.0
+    pip install "numpy<2.0.0"
+  fi
 }
 
 deploy_scala() {
diff --git a/ci/run_ci.sh b/ci/run_ci.sh
index df44b4e9..1c96cafb 100755
--- a/ci/run_ci.sh
+++ b/ci/run_ci.sh
@@ -35,7 +35,7 @@ install_python() {
 install_pyfury() {
   echo "Python version $(python -V), path $(which python)"
   "$ROOT"/ci/deploy.sh install_pyarrow
-  pip install Cython wheel "numpy<2.0.0" pytest
+  pip install Cython wheel pytest
   pushd "$ROOT/python"
   pip list
   echo "Install pyfury"
diff --git a/python/setup.py b/python/setup.py
index e3c106a3..e6502b66 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -37,7 +37,7 @@ try:
 except FileExistsError:
     pass
 
-pyarrow_version = "14.0.0"
+pyarrow_version = "14.0.0" if sys.version_info.minor < 13 else "18.0.0"
 # Check if we're running 64-bit Python
 if not sys.maxsize > 2**32:
     raise RuntimeError("Not supported on 32-bit")


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to