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 kristjan.jonsson
Recipients alexis, brian.curtin, eric.araujo, jackjansen, kristjan.jonsson, loewis, mark.dickinson, mhammond, sable, santoso.wijaya, sbt, tarek, tim.golden, vstinner
Date 2012-04-26.15:19:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1335453588.69.0.993263820903.issue13210@psf.upfronthosting.co.za>
In-reply-to
Content
> Except that Microsoft's C library also uses some of the non-WSA
> versions.  For instance read() (or _read()) is documented to set
> errno to EBADF or EINVAL on error.  So EBADF and EINVAL are just as
> "native" as WSAEBADF and WSAEINVAL.
read() is a posix function, so of course they set errno for it.  You'll probably find that GetLastError() will some native error codes.


> It is also quite common for python's C code to do stuff like
>    errno = EINVAL;
>    PyErr_SetFromErrno(PyExc_OSError);
This doesn't change that, and as far as I know, this has worked and continues to work.  "errno" is supported.

> errnomap in Objects/exceptions.c is used to convert some OSError
> exceptions to subclasses like PermissionError.  It shouldn't be hard
> to use it to also convert WSAEINVAL to EINVAL etc.
Why would we get different errors codes for e.g. connection reset events because we build with a different compiler?
Python has always used the native error codes for socket io on windows, why change that?
History
Date User Action Args
2012-04-26 15:19:48kristjan.jonssonsetrecipients: + kristjan.jonsson, loewis, mhammond, jackjansen, mark.dickinson, vstinner, sable, tim.golden, tarek, eric.araujo, brian.curtin, santoso.wijaya, alexis, sbt
2012-04-26 15:19:48kristjan.jonssonsetmessageid: <1335453588.69.0.993263820903.issue13210@psf.upfronthosting.co.za>
2012-04-26 15:19:48kristjan.jonssonlinkissue13210 messages
2012-04-26 15:19:48kristjan.jonssoncreate