We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import fs import fs_s3fs from fs import open_fs from fs_s3fs import S3FS def copy_to_latest(): print(f"{fs.__version__=}") print(f"{fs_s3fs.__version__=}") target_fs: S3FS = open_fs(f's3://my-bucket/some/path/') print(f"{target_fs=}") src_path = "2022-06-27/08:05:10/" print(f"{src_path=}") dst_path = "latest" print(f"{dst_path=}") target_fs.copydir( src_path=src_path, dst_path=dst_path, create=True, ) if __name__ == "__main__": copy_to_latest()
fs.__version__='2.4.16' fs_s3fs.__version__='1.1.1' target_fs=[..] src_path='2022-06-27/08:05:10/' dst_path='latest' Traceback (most recent call last): File "/[..]/copydir_bug.py", line 28, in <module> copy_to_latest() File "/[..]/copydir_bug.py", line 20, in copy_to_latest target_fs.copydir( File "/opt/venv/lib/python3.8/site-packages/fs/base.py", line 464, in copydir copy.copy_dir(self, src_path, self, dst_path, preserve_time=preserve_time) File "/opt/venv/lib/python3.8/site-packages/fs/copy.py", line 346, in copy_dir copy_dir_if( File "/opt/venv/lib/python3.8/site-packages/fs/copy.py", line 450, in copy_dir_if copier.copy(_src_fs, dir_path, _dst_fs, copy_path) File "/opt/venv/lib/python3.8/site-packages/fs/_bulk.py", line 144, in copy copy_file_internal( File "/opt/venv/lib/python3.8/site-packages/fs/copy.py", line 263, in copy_file_internal src_fs.copy(src_path, dst_path, overwrite=True, preserve_time=preserve_time) TypeError: copy() got an unexpected keyword argument 'preserve_time'
The text was updated successfully, but these errors were encountered:
Make copydir work again - fixes issue PyFilesystem#90
959f732
I've submitted a PR to fix this issue.
Anyone who needs to work around this issue before my PR is merged can install fs-s3fs from my branch.
E.g. if you're using pipenv you can add a line like this in your Pipfile:
pipenv
Pipfile
fs-s3fs = {git = "https://github.com/i18n-tribe/s3fs.git", ref = "make_copydir_work_again---fixes_issue-90"}
Sorry, something went wrong.
e9ee191
No branches or pull requests
The text was updated successfully, but these errors were encountered: