mirror of
https://github.com/linuxserver/docker-python.git
synced 2026-02-19 17:24:19 +08:00
17 lines
649 B
Diff
17 lines
649 B
Diff
diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py
|
|
index f34a5b4b44..b1d0f1e61e 100644
|
|
--- a/Lib/asyncio/unix_events.py
|
|
+++ b/Lib/asyncio/unix_events.py
|
|
@@ -369,6 +369,11 @@ class _UnixSelectorEventLoop(selector_events.BaseSelectorEventLoop):
|
|
fut.set_result(total_sent)
|
|
return
|
|
|
|
+ # On 32-bit architectures truncate to 1GiB to avoid OverflowError,
|
|
+ # see bpo-38319.
|
|
+ if sys.maxsize < 2 ** 32:
|
|
+ blocksize = min(blocksize, 2 ** 30)
|
|
+
|
|
try:
|
|
sent = os.sendfile(fd, fileno, offset, blocksize)
|
|
except (BlockingIOError, InterruptedError):
|