STINNER Victor added the comment:
I'm unable to reproduce the bug on Python 3.6:
---
from pathlib import Path
import shutil
import os
def touch(name):
with open(name, "x"):
pass
os.mkdir('a')
touch('a/x')
touch('a/y')
touch('a/z')
os.mkdir('b')
source_path = Path('a')
Serhiy Storchaka added the comment:
Is this issue outdated since implementing a file system path protocol (PEP 519)
in 3.6?
--
nosy: +serhiy.storchaka
status: open -> pending
___
Python tracker
R. David Murray added the comment:
This is a specific example of a global discussion about handling of paths in
the stdlib. So far we have elected not to provide special handling. The
correct thing to do is call str. I'm not sure if shutil is special enough to
be a special case, but it
New submission from Michael Kesper:
source_path = Path('../data')
destination_path = Path('//file_server/work/whatever')
for file_name in source_path.glob('xyz-*'):
shutil.copyfile(source_path / file_name, destination_path / file_name)
leads to:
Traceback (most recent call last):
File