https://bugs.winehq.org/show_bug.cgi?id=55897
Bug ID: 55897 Summary: cpython 3.12.0 crashes due to unimplemented CopyFile2 Product: Wine Version: 8.20 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: kernel32 Assignee: wine-bugs@winehq.org Reporter: tobias-winehq@23.gs Distribution: ---
Newer Python versions (starting with 3.12.0) contain an optimized implementation of shutil.copy2 (https://devdocs.io/python~3.11/library/shutil#shutil.copy2), which uses kernel32.CopyFile2 in the background (Implementation: https://github.com/python/cpython/pull/105086/files#diff-db8ac59326160713929...). This leads to crashes if this method is used. Unfortunatly, this method is used by pip in some cases, so a random `wine pip install pysftp` leads to a crash...
To reproduce: 1. Install Python 3.12.0 from https://www.python.org/ 2. Run `wine python -c 'import shutil; shutil.copy2("a", "b")'`