From 0aa6a9cf2752cd0ed1252ecbfc49dbddbcea430b Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Mon, 10 May 2021 22:12:10 +0200 Subject: [PATCH] bpo-43743 add comment stating _USE_CP_SENDFILE should not be removed Signed-off-by: Giampaolo Rodola --- Lib/shutil.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/shutil.py b/Lib/shutil.py index e29fe4d83e9277..55cfe35ab06977 100644 --- a/Lib/shutil.py +++ b/Lib/shutil.py @@ -40,6 +40,8 @@ import nt COPY_BUFSIZE = 1024 * 1024 if _WINDOWS else 64 * 1024 +# This should never be removed, see rationale in: +# https://bugs.python.org/issue43743#msg393429 _USE_CP_SENDFILE = hasattr(os, "sendfile") and sys.platform.startswith("linux") _HAS_FCOPYFILE = posix and hasattr(posix, "_fcopyfile") # macOS