You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Path.copy fails on filesystems where FICLONE returns EPERM instead of falling back #161241
Path.copy() on Linux tries FICLONE first. On filesystems where that ioctl is blocked it returns EPERM (e.g. overlayfs in containers; SELinux-blocked ioctl is a known precedent). pathlib/_os.py copyfileobj only falls back on EBADF, EOPNOTSUPP, ETXTBSY, EXDEV, so the copy fails with PermissionError even though a regular copy works — shutil.copy() succeeds on the same files.
Reproducer: build main, then Path('a.txt').copy('c.txt') on such a filesystem (also reproducible by making _ficlone raise EPERM).
Proposed fix: add EPERM to the _ficlone fallback list.
Activity
pythongh-161241: Fall back when FICLONE fails with EPERM in pathlib c…
pythongh-161241: Fall back when FICLONE fails with EPERM in pathlib c…
pythongh-161241: Fall back when FICLONE fails with EPERM in pathlib c…
pythongh-161241: Fall back when FICLONE fails with EPERM in pathlib c…
pythongh-161241: Fix test file indentation mangled by web editor
Merge branch 'main' into pythongh-161241-ficlone-eperm