Message159378
> 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? |
|
Date |
User |
Action |
Args |
2012-04-26 15:19:48 | kristjan.jonsson | set | recipients:
+ 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:48 | kristjan.jonsson | set | messageid: <1335453588.69.0.993263820903.issue13210@psf.upfronthosting.co.za> |
2012-04-26 15:19:48 | kristjan.jonsson | link | issue13210 messages |
2012-04-26 15:19:48 | kristjan.jonsson | create | |
|