diff --git a/python/3.11/asynctio_unix_events.patch b/python/3.11/asynctio_unix_events.patch new file mode 100644 index 0000000..626198d --- /dev/null +++ b/python/3.11/asynctio_unix_events.patch @@ -0,0 +1,16 @@ +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): \ No newline at end of file