From 951dace6cab0731c41c198f1c29a12cf7193425f Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Tue, 30 Apr 2024 09:29:14 +0200 Subject: [PATCH 1/2] GH-40342: [Python] Fix pickling of LocalFileSystem for cython 2 --- python/pyarrow/_fs.pyx | 1 + 1 file changed, 1 insertion(+) diff --git a/python/pyarrow/_fs.pyx b/python/pyarrow/_fs.pyx index 0e635b2c8a2..b480004b843 100644 --- a/python/pyarrow/_fs.pyx +++ b/python/pyarrow/_fs.pyx @@ -421,6 +421,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 From 47a93687dad0dd46fc4b534c71b1c7709a905a97 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Tue, 30 Apr 2024 10:13:31 +0200 Subject: [PATCH 2/2] missing import --- python/pyarrow/_fs.pyx | 1 + 1 file changed, 1 insertion(+) diff --git a/python/pyarrow/_fs.pyx b/python/pyarrow/_fs.pyx index b480004b843..dbfb6ed1145 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