[
https://issues.apache.org/jira/browse/ARROW-9347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17152793#comment-17152793
]
Joris Van den Bossche commented on ARROW-9347:
----------------------------------------------
[~mdurant] the last merged PR
(https://github.com/intake/filesystem_spec/pull/345) seems to have broken local
filesystem {{move}}. When moving an empty directory, the new directory is not
created:
{{code}}
In [22]: localfs = fsspec.filesystem("file")
In [23]: localfs.isdir("src")
Out[23]: False
In [24]: localfs.mkdir("src")
In [25]: localfs.isdir("src")
Out[25]: True
In [26]: localfs.move("src", "dest", recursive=True)
In [27]: localfs.isdir("src")
Out[27]: False
In [28]: localfs.isdir("dest")
Out[28]: False
In [29]: localfs.info("dest")
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
<ipython-input-29-6c85f2047d6b> in <module>
----> 1 localfs.info("dest")
~/scipy/repos/filesystem_spec/fsspec/implementations/local.py in info(self,
path, **kwargs)
57 def info(self, path, **kwargs):
58 path = self._strip_protocol(path)
---> 59 out = os.stat(path, follow_symlinks=False)
60 dest = False
61 if os.path.islink(path):
FileNotFoundError: [Errno 2] No such file or directory: '/home/joris/scipy/dest'
{code}
This was working before that PR.
> [Python] Tests fail with latest fsspec
> --------------------------------------
>
> Key: ARROW-9347
> URL: https://issues.apache.org/jira/browse/ARROW-9347
> Project: Apache Arrow
> Issue Type: Bug
> Components: Python
> Reporter: Antoine Pitrou
> Priority: Major
>
> Using the latest fsspec from upstream git repo (changeset
> 656be423ef36ac533fd3319850e107c2669cce3d), I get this error when running the
> tests:
> {code}
> Traceback (most recent call last):
> File "/home/antoine/arrow/dev/python/pyarrow/tests/test_fs.py", line 778,
> in test_move_directory
> fs.move(s, t)
> File "pyarrow/_fs.pyx", line 519, in pyarrow._fs.FileSystem.move
> check_status(self.fs.Move(source, destination))
> File "pyarrow/_fs.pyx", line 1024, in pyarrow._fs._cb_move
> handler.move(frombytes(src), frombytes(dest))
> File "/home/antoine/arrow/dev/python/pyarrow/fs.py", line 173, in move
> self.fs.mv(src, dest)
> File
> "/home/antoine/miniconda3/envs/pyarrow/lib/python3.7/site-packages/fsspec/spec.py",
> line 743, in mv
> self.rm(path1, recursive=recursive)
> File
> "/home/antoine/miniconda3/envs/pyarrow/lib/python3.7/site-packages/fsspec/implementations/local.py",
> line 108, in rm
> os.remove(path)
> IsADirectoryError: [Errno 21] Is a directory:
> '/tmp/pytest-of-antoine/pytest-0/test_move_directory_PyFileSyst1/source-dir'
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)