bpo-43743 add comment stating _USE_CP_SENDFILE should not be removed (#26024)

This commit is contained in:
Giampaolo Rodola 2021-05-10 22:45:06 +02:00 committed by GitHub
parent 21fbbb98ba
commit c0190137ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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