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.

Author eryksun
Recipients BreamoreBoy, dabrahams, eryksun, loewis, ncoghlan, piotr.dobrogost, pitrou, r.david.murray, sbt, steve.dower, tim.golden, zach.ware
Date 2015-03-24.18:04:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1427220289.46.0.69383230999.issue15244@psf.upfronthosting.co.za>
In-reply-to
Content
> you can't mix CRT methods with OS methods because the CRT does its 
> own buffering

Python 3's io uses the CRT's low I/O (ioinfo struct) in binary mode. It appears that the buffers pipech, pipech2, and dbcsbuffer are only used in text mode. So it should be generally OK to call get_osfhandle and use Win32 directly, if that's ever required. 

Of course, as this patch demonstrates, an io opener (3.3+) can call open_osfhandle immediately after CreateFile, and nothing else changes. This could be added to io / _pyio in 3.5. Initially it could simply be a pure-Python function that uses _winapi and msvcrt. 3.6 could get a C implementation in _iomodule.c.
History
Date User Action Args
2015-03-24 18:04:49eryksunsetrecipients: + eryksun, loewis, ncoghlan, pitrou, tim.golden, r.david.murray, dabrahams, BreamoreBoy, sbt, piotr.dobrogost, zach.ware, steve.dower
2015-03-24 18:04:49eryksunsetmessageid: <1427220289.46.0.69383230999.issue15244@psf.upfronthosting.co.za>
2015-03-24 18:04:49eryksunlinkissue15244 messages
2015-03-24 18:04:49eryksuncreate