Issue 5165: os.rename and other raise WindowsError (original) (raw)

Issue5165

Created on 2009-02-06 10:20 by kristjan.jonsson, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg81256 - (view) Author: Kristján Valur Jónsson (kristjan.jonsson) * (Python committer) Date: 2009-02-06 10:20
in lib/test/test_os.py, there is a test class, Win32ErrorTests, that tests that certain functions return a WindowsError on failure. And indeed they do that, but that is in contradiction with the documentation. From the 2.6 docs: Note All functions in this module raise OSError in the case of invalid or inaccessible file names and paths, or other arguments that have the correct type, but are not accepted by the operating system.
msg81265 - (view) Author: Matthew Barnett (mrabarnett) * (Python triager) Date: 2009-02-06 13:32
WindowsError is a subclass of OSError, so it's not entirely contradictory, just a little misleading... :-)
msg81266 - (view) Author: Kristján Valur Jónsson (kristjan.jonsson) * (Python committer) Date: 2009-02-06 13:36
ah, well, silly me. then I'll just close this as "Invalid".
History
Date User Action Args
2022-04-11 14:56:45 admin set github: 49415
2009-02-06 13:36:40 kristjan.jonsson set status: open -> closedresolution: not a bugmessages: +
2009-02-06 13:32:06 mrabarnett set nosy: + mrabarnettmessages: +
2009-02-06 10:20:33 kristjan.jonsson create