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

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


The following commit(s) were added to refs/heads/main by this push:
     new b609de374c GH-40342: [Python] Fix pickling of LocalFileSystem for 
cython 2 (#41459)
b609de374c is described below

commit b609de374c7c00e1537eb8092e1ff2db718d2b61
Author: Joris Van den Bossche <[email protected]>
AuthorDate: Tue Apr 30 13:42:31 2024 +0200

    GH-40342: [Python] Fix pickling of LocalFileSystem for cython 2 (#41459)
    
    Small follow-up fix for the failure introduced by 
https://github.com/apache/arrow/pull/40356
    * GitHub Issue: #40342
    
    Authored-by: Joris Van den Bossche <[email protected]>
    Signed-off-by: Joris Van den Bossche <[email protected]>
---
 python/pyarrow/_fs.pyx | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/python/pyarrow/_fs.pyx b/python/pyarrow/_fs.pyx
index 0e635b2c8a..dbfb6ed114 100644
--- a/python/pyarrow/_fs.pyx
+++ b/python/pyarrow/_fs.pyx
@@ -18,6 +18,7 @@
 # cython: language_level = 3
 
 from cpython.datetime cimport datetime, PyDateTime_DateTime
+from cython cimport binding
 
 from pyarrow.includes.common cimport *
 from pyarrow.includes.libarrow_python cimport PyDateTime_to_TimePoint
@@ -421,6 +422,7 @@ cdef class FileSystem(_Weakrefable):
                         "SubTreeFileSystem")
 
     @staticmethod
+    @binding(True)  # Required for cython < 3
     def _from_uri(uri):
         fs, _path = FileSystem.from_uri(uri)
         return fs

Reply via email to