未验证 提交 92817f80 编写于 作者: 1 123malin 提交者: GitHub

test=develop, rm pathlib (#28658)

* test=develop, rm pathlib
上级 4fd4095d
......@@ -61,7 +61,6 @@ requirements:
- graphviz
- protobuf
- py-cpuinfo==5.0.0
- pathlib
- astor
- gast>=0.3.3
- matplotlib
......@@ -79,7 +78,6 @@ requirements:
- graphviz
- protobuf
- astor
- pathlib
- gast>=0.3.3
- py-cpuinfo==5.0.0
"""
......
......@@ -29,7 +29,6 @@ import paddle.fluid as fluid
from paddle.fluid import core
import functools
from pathlib import PurePosixPath, Path
import shutil
__all__ = ['LocalFS', 'HDFSClient']
......@@ -322,7 +321,7 @@ class LocalFS(FS):
return
raise FSFileExistsError
return Path(fs_path).touch(exist_ok=True)
os.system("touch {}".format(fs_path))
def mv(self, src_path, dst_path, overwrite=False, test_exists=False):
"""
......@@ -554,11 +553,11 @@ class HDFSClient(FS):
if len(arr) != 8:
continue
p = PurePosixPath(arr[7])
p = os.path.basename(arr[7])
if arr[0][0] == 'd':
dirs.append(p.name)
dirs.append(p)
else:
files.append(p.name)
files.append(p)
return dirs, files
......
......@@ -30,7 +30,6 @@ from .fs import FS, LocalFS, FSFileExistsError, FSFileNotExistsError, ExecuteErr
from paddle.fluid import core
import functools
from pathlib import PurePosixPath, Path
import shutil
__all__ = ["HDFSClient"]
......@@ -137,11 +136,11 @@ class HDFSClient(FS):
if len(arr) != 8:
continue
p = PurePosixPath(arr[7])
p = os.path.basename(arr[7])
if arr[0][0] == 'd':
dirs.append(p.name)
dirs.append(p)
else:
files.append(p.name)
files.append(p)
return dirs, files
......
......@@ -12,4 +12,3 @@ Pillow
six
decorator
astor
pathlib
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册