summaryrefslogtreecommitdiffstats
path: root/Lib/shutil.py
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2021-05-10 20:45:06 (GMT)
committerGitHub <noreply@github.com>2021-05-10 20:45:06 (GMT)
commitc0190137ca67014008c92f04926f0cdf22db84b3 (patch)
treee602ab91ed9262dc4cf2237bc794d7be7aec1680 /Lib/shutil.py
parent21fbbb98bac8bfe56f8b931258c36750e84f9285 (diff)
downloadcpython-c0190137ca67014008c92f04926f0cdf22db84b3.zip
cpython-c0190137ca67014008c92f04926f0cdf22db84b3.tar.gz
cpython-c0190137ca67014008c92f04926f0cdf22db84b3.tar.bz2
bpo-43743 add comment stating _USE_CP_SENDFILE should not be removed (#26024)
Diffstat (limited to 'Lib/shutil.py')
-rw-r--r--Lib/shutil.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py
index e29fe4d..55cfe35 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