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 terry.reedy
Recipients eryksun, paul.moore, r.david.murray, raylu, serhiy.storchaka, steve.dower, terry.reedy, tim.golden, zach.ware
Date 2017-01-27.19:17:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1485544646.82.0.869058864889.issue29366@psf.upfronthosting.co.za>
In-reply-to
Content
This is a feature-change 'enhancement' issue.  There is no violation of the doc at https://docs.python.org/3/library/os.html#os.listdir and as Raylu noted, the current behavior is accommodated in tests.

I presume that regardless of what system calls are made, FileNotFoundError and anything else could be caught and NotADirectoryError raised instead, with the message containing the Windows error message.  This would only break Windows-specific code that only catches FileNotFoundError and not NotADirectoryError.

I am not sure what our general policy is and whether this should be fixed at this point.  I personally like Python smoothing over OS differences when easily possible.
History
Date User Action Args
2017-01-27 19:17:26terry.reedysetrecipients: + terry.reedy, paul.moore, tim.golden, r.david.murray, zach.ware, serhiy.storchaka, eryksun, steve.dower, raylu
2017-01-27 19:17:26terry.reedysetmessageid: <1485544646.82.0.869058864889.issue29366@psf.upfronthosting.co.za>
2017-01-27 19:17:26terry.reedylinkissue29366 messages
2017-01-27 19:17:26terry.reedycreate