Skip to content

fs.copy.copy_file: Breaking changes between Python 3.7 and Python 3.8 #496

Open
@avivace

Description

@avivace

On Python 3.7.1 with fs==2.4.12, this doesn't work:

import fs
my_fs = fs.open_fs("/")
fs.copy.copy_file(
   src_fs=my_fs,
   dst_fs=my_fs,
   src_path="/tmp/1.txt",
   dst_path="/tmp/42"
)

raising IsADirectoryError: [Errno 21] Is a directory: '/tmp/42'.

However, the same snippet succeds in Python 3.8.0 with the same version of fs. It appears that while running on Python 3.7.x the dst path must have the file name, while on 3.8.0 it can be a directory. Is this expected?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions