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')
destination_path = Path('b')
for file_name in source_path.glob('*'):
    file_name = file_name.name
    src = source_path / file_name
    dst = destination_path / file_name
    print("%r -> %r" % (src, dst))
    shutil.copyfile(src, dst)
---

Output:
---
PosixPath('a/y') -> PosixPath('b/y')
PosixPath('a/x') -> PosixPath('b/x')
PosixPath('a/z') -> PosixPath('b/z')
---

Thank you PEP 519 ;-)

----------
nosy: +haypo
resolution:  -> fixed
stage:  -> resolved
status: pending -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23241>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to