Skip to content

Commit b609de3

Browse files
apacheGH-40342: [Python] Fix pickling of LocalFileSystem for cython 2 (apache#41459)
Small follow-up fix for the failure introduced by apache#40356 * GitHub Issue: apache#40342 Authored-by: Joris Van den Bossche <[email protected]> Signed-off-by: Joris Van den Bossche <[email protected]>
1 parent 97e169a commit b609de3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

python/pyarrow/_fs.pyx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
# cython: language_level = 3
1919

2020
from cpython.datetime cimport datetime, PyDateTime_DateTime
21+
from cython cimport binding
2122

2223
from pyarrow.includes.common cimport *
2324
from pyarrow.includes.libarrow_python cimport PyDateTime_to_TimePoint
@@ -421,6 +422,7 @@ cdef class FileSystem(_Weakrefable):
421422
"SubTreeFileSystem")
422423

423424
@staticmethod
425+
@binding(True) # Required for cython < 3
424426
def _from_uri(uri):
425427
fs, _path = FileSystem.from_uri(uri)
426428
return fs

0 commit comments

Comments
 (0)