Skip to content

Apply patch for Python 3.8 for sendfile for files over 2GB#95

Merged
pvizeli merged 1 commit intomasterfrom
patch-sendfile
Oct 27, 2020
Merged

Apply patch for Python 3.8 for sendfile for files over 2GB#95
pvizeli merged 1 commit intomasterfrom
patch-sendfile

Conversation

@ludeeus
Copy link
Copy Markdown
Member

@ludeeus ludeeus commented Oct 27, 2020

Applies patch for https://bugs.python.org/issue38319

Fixes home-assistant/supervisor#2047

20-10-27 14:35:48 INFO (MainThread) [supervisor.api.snapshots] Downloading snapshot 91fd5e56
20-10-27 14:35:48 ERROR (MainThread) [aiohttp.server] Unhandled exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 485, in start
    resp, reset = await task
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 440, in _handle_request
    reset = await self.finish_response(request, resp, start_time)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 591, in finish_response
    await prepare_meth(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_fileresponse.py", line 241, in prepare
    return await self._sendfile(request, fobj, offset, count)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_fileresponse.py", line 96, in _sendfile
    await loop.sendfile(transport, fobj, offset, count)
  File "/usr/local/lib/python3.8/asyncio/base_events.py", line 1120, in sendfile
    return await self._sendfile_native(transport, file,
  File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 578, in _sendfile_native
    return await self.sock_sendfile(transp._sock, file, offset, count,
  File "/usr/local/lib/python3.8/asyncio/base_events.py", line 838, in sock_sendfile
    return await self._sock_sendfile_native(sock, file,
  File "/usr/local/lib/python3.8/asyncio/unix_events.py", line 351, in _sock_sendfile_native
    return await fut
  File "/usr/local/lib/python3.8/asyncio/unix_events.py", line 373, in _sock_sendfile_native_impl
    sent = os.sendfile(fd, fileno, offset, blocksize)
OverflowError: Python int too large to convert to C ssize_t

@pvizeli pvizeli merged commit 30d9412 into master Oct 27, 2020
@delete-merged-branch delete-merged-branch bot deleted the patch-sendfile branch October 27, 2020 15:07
pvizeli added a commit that referenced this pull request Oct 27, 2020
pvizeli added a commit that referenced this pull request Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to download large snapshots on 32bit arm flatforms

3 participants