Neil Schemenauer added the comment:

I just tested on Windows.  fdtype() fails with:
OSError: [WinError 10022] An invalid argument was supplied

The getsockname() call fails with WSAGetLastError() == 10022.  getsockname() is 
used to find the address family.  Perhaps there is some other way to get it on 
Windows.

The easiest fix would be to #ifdef MS_WINDOWS out the whole socket_fdtype() 
function.  Passing file descriptors around is not a thing on Windows anyhow.

There is still the issue of unexpected errors getting returned inside fdtype() 
(e.g. as suggested by Martin).  One idea is to commit the code as is and fix 
errors as they appear.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27377>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to