◐ Shell
clean mode source ↗

Message 280203 - Python tracker

Hi Masayuki, thanks for the response (I thought I replied to this earlier but maybe I only imagined it--I've been on vacation).

I agree with just about everything you write here.

I'm aware of the FreeBSD setmode(), but I figured os.setmode() could do different things on different platforms as applicable.  But that would also be very confusing.

Your patch using ctypes looks fine to me--I considered doing the same, but what I'm not sure is if it's kosher to use ctypes here, given that it's techically an optional module.  Since _pyio is, as I understand it, mainly used for testing it's probably fine?  But I think we'll need some core maintainers' comments here...

Implementing a cygwin module would be really nice, actually, even if it isn't included in the stdlib.  There are a few other cygwin-specific APIs that it is useful to have wrappers around: https://cygwin.com/cygwin-api/cygwin-functions.html  But that would be outside the scope of fixing this issue.