This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Implement os.readv() / os.writev() in Windows port
Type: enhancement Stage:
Components: IO, Library (Lib), Windows Versions: Python 3.10, Python 3.9, Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: eryksun, paul.moore, socketpair, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2016-06-18 09:39 by socketpair, last changed 2022-04-11 14:58 by admin.

Messages (6)
msg268782 - (view) Author: Марк Коренберг (socketpair) * Date: 2016-06-18 09:39
These functions are not implemented natively in Windows, but
the Windows API has analogous functions ReadFileScatter and WriteFileGather.
msg268785 - (view) Author: Марк Коренберг (socketpair) * Date: 2016-06-18 09:41
Also do not forget to fix documentation: issue27021
msg268788 - (view) Author: Марк Коренберг (socketpair) * Date: 2016-06-18 09:59
however, unlike the POSIX functions, they require the alignment of each buffer on a memory page
msg268799 - (view) Author: Eryk Sun (eryksun) * (Python triager) Date: 2016-06-18 12:31
ReadFileScatter and WriteFileGather also require a handle for a file that's opened with FILE_FLAG_OVERLAPPED (asynchronous access; the file pointer is not updated) and FILE_FLAG_NO_BUFFERING (buffers must be a multiple of the physical sector size and aligned to the physical sector size). So Python wouldn't be able to use the C runtime's POSIX (low) I/O implementation. ISTM this requires resolving issue 12939, with support for overlapped I/O.
msg388781 - (view) Author: Eryk Sun (eryksun) * (Python triager) Date: 2021-03-15 22:26
The need for asynchronous I/O (i.e. FILE_FLAG_OVERLAPPED) with ReadFileScatter() and WriteFileGather() makes them a poor fit for POSIX os.readv() and os.writev(), since we can't open the file with open() or os.open(). Python's socket module opens sockets in asynchronous mode, but ReadFileScatter() and WriteFileGather() don't support sockets, and there are socket-specific alternatives (e.g. WSASend with multiple buffers). If these Windows API functions are supported at all, I expect it will be in _winapi or _overlapped, and only if needed by the standard library.

I'm changing the status of this enhancement request to pending, awaiting feedback from Марк and the core developers.
msg388797 - (view) Author: Марк Коренберг (socketpair) * Date: 2021-03-16 02:16
I'm not interested in Windows platform anymore.
History
Date User Action Args
2022-04-11 14:58:32adminsetstatus: pending -> open
github: 71533
2021-03-16 02:28:13eryksunsetstatus: open -> pending
2021-03-16 02:16:36socketpairsetstatus: pending -> open

messages: + msg388797
2021-03-15 22:26:17eryksunsetstatus: open -> pending

messages: + msg388781
versions: + Python 3.8, Python 3.9, Python 3.10, - Python 3.6
2016-07-26 19:31:02socketpairsettitle: Implement os.readv() / os.writev() -> Implement os.readv() / os.writev() in Windows port
2016-06-18 12:32:39eryksunsetcomponents: + Library (Lib), - Extension Modules
2016-06-18 12:31:07eryksunsetnosy: + eryksun
messages: + msg268799
2016-06-18 09:59:08socketpairsetmessages: + msg268788
2016-06-18 09:43:56martin.pantersetnosy: + paul.moore, tim.golden, zach.ware, steve.dower
components: + Extension Modules, Windows, - Library (Lib)
2016-06-18 09:41:17socketpairsetmessages: + msg268785
2016-06-18 09:40:03socketpairsettitle: Implement os.readv() / os.readv() -> Implement os.readv() / os.writev()
2016-06-18 09:39:53socketpaircreate