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 masamoto
Recipients erik.bray, masamoto
Date 2016-10-20.22:03:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1477001006.29.0.791459197414.issue28459@psf.upfronthosting.co.za>
In-reply-to
Content
I agree to use setmode() at _pyio module for Cygwin. However, I have two reasons that I disagree to the implementation of os.setmode().
First, FreeBSD has another setmode() that operate file permission bits [1]. Therefore the implementation of os.setmode() will be confused to those users.
Second, msvcrt.setmode() isn't used almost in standard library, the function is just used by _pyio module and subprocess test. Thus I think there aren't much need that implements setmode() to os module.

Easy way for a solution of import error on Cygwin, setmode() is implemented on _pyio using ctypes. then Cygwin CPython forget setmode().
Otherwise it's hard way, For avoiding confliction to other platforms, I'd propose to create the cygwin module. I thought a solution implementing imitation msvcrt module, but it is unreasonable because Cygwin doesn't have other Windows API.

I tried written the patch of easy way that implements setmode() into _pyio. This patch is included parts to succeed import _pyio.

[1] https://www.freebsd.org/cgi/man.cgi?query=setmode&sektion=3
History
Date User Action Args
2016-10-20 22:03:26masamotosetrecipients: + masamoto, erik.bray
2016-10-20 22:03:26masamotosetmessageid: <1477001006.29.0.791459197414.issue28459@psf.upfronthosting.co.za>
2016-10-20 22:03:26masamotolinkissue28459 messages
2016-10-20 22:03:26masamotocreate