Issue 823672: os.strerror doesn't understand windows error codes (original) (raw)

Issue823672

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.

This issue has been migrated to GitHub: https://github.com/python/cpython/issues/39410

classification

Title: os.strerror doesn't understand windows error codes
Type: Stage:
Components: None Versions:

process

Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: jackjansen, loewis, theller
Priority: normal Keywords:

Created on 2003-10-14 20:04 by theller, last changed 2022-04-10 16:11 by admin. This issue is now closed.

Messages (3)
msg18637 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2003-10-14 20:04
For example, os.strerror(errno.EWOULDBLOCK) returns 'unknown error'.
msg18638 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-10-24 20:15
Logged In: YES user_id=21627 Why is this a bug in Python? os.strerror just calls the system's strerror(3). If that doesn't know its own errors, how should Python know?
msg18639 - (view) Author: Jack Jansen (jackjansen) * (Python committer) Date: 2003-12-07 22:33
Logged In: YES user_id=45365 That depends: if the C library returns EWOULDBLOCK in errno and then refuses to understand it in strerror() this is indeed not Python's problem. But if the C library never set errno to EWOULDBLOCK but we somehow generate it (and grepping on EWOULDBLOCK seems to indicate there could be something fishy going on with EWOULDBLOCK and WSAEWOULDBLOCK) we should have the courtesy to understand it in strerror(). I'll leave it to someone else to decide whether this makes sense and the bug should be reopened.
History
Date User Action Args
2022-04-10 16:11:44 admin set github: 39410
2003-10-14 20:04:53 theller create