From: Giampaolo Rodola Date: Mon, 10 May 2021 20:45:06 +0000 (+0200) Subject: bpo-43743 add comment stating _USE_CP_SENDFILE should not be removed (#26024) X-Git-Tag: v3.11.0a1~1163 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c0190137ca67014008c92f04926f0cdf22db84b3;p=thirdparty%2FPython%2Fcpython.git bpo-43743 add comment stating _USE_CP_SENDFILE should not be removed (#26024) --- diff --git a/Lib/shutil.py b/Lib/shutil.py index e29fe4d83e92..55cfe35ab069 100644 --- a/Lib/shutil.py +++ b/Lib/shutil.py @@ -40,6 +40,8 @@ elif _WINDOWS: 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