aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/pathlib/_os.py
diff options
context:
space:
mode:
authorBarney Gale <barney.gale@gmail.com>2025-03-13 21:56:59 +0000
committerGitHub <noreply@github.com>2025-03-13 21:56:59 +0000
commit45c2ef48ca8be4d5fe6fe0373961e04da813475b (patch)
treedddd8a750ed0fa59cc8b084f266ac0f5a5847476 /Lib/pathlib/_os.py
parent1a8e5742cdcf3dba7fc592d036adab49877c42ba (diff)
downloadcpython-45c2ef48ca8be4d5fe6fe0373961e04da813475b.tar.gz
cpython-45c2ef48ca8be4d5fe6fe0373961e04da813475b.zip
GH-130614: pathlib ABCs: parametrize test suite for path copying (#131168)
Test copying from `Path` and `ReadableZipPath` (types of `_ReadablePath`) to `Path` and `WritableZipPath` (types of `_WritablePath`).
Diffstat (limited to 'Lib/pathlib/_os.py')
-rw-r--r--Lib/pathlib/_os.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/pathlib/_os.py b/Lib/pathlib/_os.py
index c8cb4be548d..121b6d656a8 100644
--- a/Lib/pathlib/_os.py
+++ b/Lib/pathlib/_os.py
@@ -248,7 +248,7 @@ def copy_file(source, target, follow_symlinks=True, preserve_metadata=False):
"""
info = source.info
if not follow_symlinks and info.is_symlink():
- target.symlink_to(source.readlink(), info.is_dir())
+ target.symlink_to(str(source.readlink()), info.is_dir())
if preserve_metadata:
target._write_info(info, follow_symlinks=False)
elif info.is_dir():