Author eryksun
Recipients Jonas Binding, Marcus.Smith, dstufft, eryksun, ncoghlan, paul.moore, pradyunsg, steve.dower, tim.golden, zach.ware
Date 2019-08-05.22:44:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1565045072.24.0.57198748091.issue37769@roundup.psfhosted.org>
In-reply-to
Content
> First it seems the error is being raised incorrectly - winerror 2 is 
> for file not found, but it's being passed as errno 2. 

I think this only happens with open(). The _io module could use the CRT's _doserrno value to call PyErr_SetExcFromWindowsErrWithFilenameObject. We can rely on _doserrno if _wopen fails.

Otherwise this is the expected mapping from Windows ERROR_PATH_NOT_FOUND (3) or ERROR_FILENAME_EXCED_RANGE (206) to POSIX ENOENT (2). The Windows error in the case of path that's too long is not ERROR_FILE_NOT_FOUND (2).
History
Date User Action Args
2019-08-05 22:44:32eryksunsetrecipients: + eryksun, paul.moore, ncoghlan, tim.golden, zach.ware, steve.dower, dstufft, pradyunsg, Marcus.Smith, Jonas Binding
2019-08-05 22:44:32eryksunsetmessageid: <1565045072.24.0.57198748091.issue37769@roundup.psfhosted.org>
2019-08-05 22:44:32eryksunlinkissue37769 messages
2019-08-05 22:44:32eryksuncreate